* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 50%, #B0E0E6 100%);
  min-height: 100vh;
  color: #2C3E50;
}

header {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  text-align: center;
  padding: 2rem 0;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
}

section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

section h2 {
  color: #4A90E2;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: 600;
  border-bottom: 3px solid #87CEEB;
  padding-bottom: 0.5rem;
}

form {
  display: grid;
  gap: 1.5rem;
}

form > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
  color: #2C3E50;
  font-size: 1rem;
}

input[type="text"],
input[type="number"] {
  padding: 0.8rem;
  border: 2px solid #B0E0E6;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
  background: white;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #4A90E2;
}

button {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  background: linear-gradient(135deg, #357ABD 0%, #2E6BA8 100%);
}

button:active {
  transform: translateY(0);
}

.book-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.book-item {
  background: linear-gradient(135deg, #F8FDFF 0%, #E8F4FD 100%);
  border: 2px solid #B0E0E6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.book-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4A90E2, #87CEEB);
}

.book-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
  border-color: #4A90E2;
}

.book-item h3 {
  color: #2C3E50;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.book-item p {
  color: #5A6C7D;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.book-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.book-actions button {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  flex: 1;
  min-width: 80px;
}

.complete-btn {
  background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
}

.complete-btn:hover {
  background: linear-gradient(135deg, #229954 0%, #1E8449 100%);
}

.incomplete-btn {
  background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%);
}

.incomplete-btn:hover {
  background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
}

.delete-btn {
  background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
}

.delete-btn:hover {
  background: linear-gradient(135deg, #C0392B 0%, #A93226 100%);
}

.edit-btn {
  background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
}

.edit-btn:hover {
  background: linear-gradient(135deg, #8E44AD 0%, #7D3C98 100%);
}

.search-form {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.search-input {
  flex: 1;
}

.no-books {
  text-align: center;
  color: #7F8C8D;
  font-style: italic;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border: 2px dashed #B0E0E6;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

.notification-modal .modal-content {
  max-width: 400px;
  text-align: center;
  padding: 2.5rem 2rem;
}

.confirmation-modal .modal-content {
  max-width: 450px;
  text-align: center;
  padding: 2.5rem 2rem;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #7F8C8D;
  transition: color 0.3s ease;
}

.close:hover {
  color: #E74C3C;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.modal-title {
  color: #2C3E50;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-message {
  color: #5A6C7D;
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-buttons button {
  min-width: 100px;
  padding: 0.8rem 1.5rem;
}

.btn-confirm {
  background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
}

.btn-confirm:hover {
  background: linear-gradient(135deg, #C0392B 0%, #A93226 100%);
}

.btn-cancel {
  background: linear-gradient(135deg, #95A5A6 0%, #7F8C8D 100%);
}

.btn-cancel:hover {
  background: linear-gradient(135deg, #7F8C8D 0%, #6C7B7D 100%);
}

.btn-ok {
  background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
}

.btn-ok:hover {
  background: linear-gradient(135deg, #229954 0%, #1E8449 100%);
}

.success-icon {
  color: #27AE60;
}

.error-icon {
  color: #E74C3C;
}

.warning-icon {
  color: #F39C12;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  section h2 {
    font-size: 1.3rem;
  }

  .book-lists {
    grid-template-columns: 1fr;
  }
  
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .book-actions {
    flex-direction: column;
  }
  
  .book-actions button {
    flex: none;
  }
}
