/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* ================= BODY ================= */
body {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #1e293b;
  padding: 30px;
  min-height: 100vh;
}

/* ================= HEADER ================= */
header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 1px;
}

/* ================= SECTION CARD ================= */
section {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.1);
  transition: all 0.3s ease;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(30, 64, 175, 0.15);
}

section h2 {
  margin-bottom: 20px;
  color: #1e40af;
}

/* ================= FORM ================= */
form div {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  transition: all 0.3s ease;
}

input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

/* ================= BUTTON GLOBAL ================= */
button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Submit Button */
#bookFormSubmit {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

#bookFormSubmit:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Search Button */
#searchSubmit {
  background: #1e40af;
  color: white;
}

#searchSubmit:hover {
  background: #1d4ed8;
}

/* ================= BOOK CARD ================= */
[data-testid="bookItem"] {
  background: #ffffff;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 18px;
  border-left: 6px solid #3b82f6;
  transition: all 0.3s ease;
}

[data-testid="bookItem"]:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
}

[data-testid="bookItemTitle"] {
  margin-bottom: 8px;
  font-size: 18px;
  color: #1e3a8a;
}

[data-testid="bookItemAuthor"],
[data-testid="bookItemYear"] {
  font-size: 14px;
  color: #475569;
  margin-bottom: 4px;
}

/* Book Buttons */
[data-testid="bookItemIsCompleteButton"] {
  background: #3b82f6;
  color: white;
  margin-right: 6px;
}

[data-testid="bookItemIsCompleteButton"]:hover {
  background: #2563eb;
}

[data-testid="bookItemDeleteButton"] {
  background: #ef4444;
  color: white;
}

[data-testid="bookItemDeleteButton"]:hover {
  background: #dc2626;
}

/* ================= RESPONSIVE ================= */
@media (min-width: 900px) {
  main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  section:first-child,
  section:nth-child(2) {
    grid-column: span 2;
  }
}