@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #f8f9fa, #eef2f3);
}

.container {
  margin: 30px;
}

.container h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
  color: #764ba2;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.card {
  background: #fafafa;
  border-left: 6px solid #764ba2;
  border-radius: 8px;
  padding: 12px;
  flex: 0 0 280px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.card p {
  margin: 4px 0;
}

.status {
  display: inline-block;
  margin-left:6px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: bold;
}

.status.read {
  background: #d4edda;
  color: #155724;
}

.status.unread {
  background: #f8d7da;
  color: #721c24;
}

.card button {
  margin: 5px 5px 0 0;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.card .remove-book {
  background: #e74c3c;
  color: white;
}

.card .toggle-read {
  background: #3498db;
  color: white;
}

.open-dialog {
  background: #764ba2;
  background-size: 300% 300%;
  color: #fff;
  padding: 12px 24px;
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.open-dialog:hover {
  background: #6b46c1;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.open-dialog:active {
  background: #667eea; 
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.add-book {
  width: 380px;
  border: none;
  border-radius: 12px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.add-book::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.modal-header {
  position: relative;
  background: #764ba2;
  color: white;
  font-weight: bold;
  padding: 14px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-title {
  flex: 1; 
  text-align: center;
}

.close-dialog {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.close-dialog:hover {
  transform: scale(1.2);
  color: #ffdddd;
}

.modal-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.modal-content > div {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.modal-content label {
  font-weight: 600;
  color: #444;
  width: 90px;
}

.modal-content input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.modal-content input:focus {
  border-color: #667eea;
  box-shadow: 0 0 6px rgba(102,126,234,0.4);
}

.modal-content input[type="checkbox"] {
  transform: scale(1.2);
  accent-color: #667eea;
  cursor: pointer;
}

.modal-content button {
  background: #764ba2;
  color: white;
  font-weight: 600;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 150px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-content button:hover {
  background: #6b46c1;
  transform: translateY(-2px);
}

.modal-content button:active {
  background: #667eea; 
  transform: translateY(0);
}
