/* Modern CSS Reset */
:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #4cc9f0;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4bb543;
  --warning: #ffd60a;
  --danger: #ef476f;
  --card-bg: #ffffff15;
  --card-hover: #ffffff25;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: var(--light);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  background-attachment: fixed;
}

/* Header Styles */
header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
  text-align: center;
}

.header-right {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-left h1 {
  margin: 0;
  font-size: 1.8rem;
  background: linear-gradient(90deg, #4cc9f0, #4361ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-right {
  display: flex;
  gap: 1rem;
}

.header-right button {
  background: rgba(67, 97, 238, 0.2);
  border: none;
  color: var(--light);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: 10px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-right button i {
  font-size: 1rem;
}

.header-right button:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.3);
}

.header-right button.active {
  background-color: #e94560;
  color: white;
}

/* Main Content */
main {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Styles */
section {
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

section.active {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  color: var(--accent);
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px;
}

#searchSection {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

#searchBook {
  margin: 0 auto 30px;
  background: rgba(26, 26, 46, 0.7);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(233, 69, 96, 0.3);
  backdrop-filter: blur(5px);
  max-width: 600px;
}

#searchBook .form-group {
  margin-bottom: 20px;
  max-width: 100%;
  width: 100%;
}

#searchBook label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: #f8b739;
  font-size: 1.1rem;
}

#searchBook input[type="text"] {
  padding: 12px 18px;
  width: 100%;
  max-width: 100%;
  border: 2px solid #e94560;
  background-color: rgba(26, 26, 46, 0.8);
  color: #eaeaea;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#searchBook input[type="text"]:focus {
  outline: none;
  border-color: #f8b739;
  box-shadow: 0 0 0 3px rgba(248, 183, 57, 0.2);
}

#searchBook input[type="text"]::placeholder {
  color: #6c757d;
}

#searchBook button[type="submit"] {
  background-color: #e94560;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  min-width: 120px;
}

#searchBook button[type="submit"]:hover {
  background-color: #d13454;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

#searchBook button[type="submit"] i {
  font-size: 1rem;
}

/* Style untuk tampilan mobile */
@media (max-width: 768px) {
  .header-left h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .header-right {
    width: 100%;
  }

  .header-right button {
    font-size: 0.8rem;
    padding: 5px 10px;
    max-width: 120px;
  }

  h2 {
    font-size: 1.3rem;
  }

  #incompleteBookList > div,
  #completeBookList > div {
    padding: 15px;
    margin-bottom: 15px;
  }

  #incompleteBookList button,
  #completeBookList button {
    width: 100%;
    margin-bottom: 8px;
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  #bookForm input[type="text"],
  #bookForm input[type="number"] {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  #bookForm button[type="submit"] {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* Search Section */
#searchSection {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#searchBook {
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#searchBook .form-group {
  margin-bottom: 1.5rem;
}

#searchBook label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--light);
  font-size: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.2);
}

.search-button {
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin-top: 1rem;
}

.search-button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.3);
}

.search-button i {
  margin-right: 8px;
}

/* Search Results */
.search-results {
  margin-top: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.search-results h3 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.no-results {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  border: 1px dashed var(--accent);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin: 2rem 0;
  backdrop-filter: blur(5px);
}

.no-results i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #eaeaea; /* Warna teks label */
}

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="search"] {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--light);
  font-size: 1rem;
  margin-bottom: 1.2rem;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.2);
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  margin-right: 10px;
  position: relative;
  top: 4px;
  cursor: pointer;
  transition: var(--transition);
}

input[type="checkbox"]:checked {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Button Styles */
button {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 5px 5px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button i {
  font-size: 0.9em;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.3);
  background: var(--secondary);
}

#searchSubmit {
  background-color: #0f3460; /* Warna tombol pencarian */
}

#searchSubmit:hover {
  background-color: #1a1a2e; /* Warna hover tombol pencarian */
}

/* Book List Styles */
#incompleteBookList,
#completeBookList,
.search-results .book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

[data-testid="bookItem"] {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.6;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-testid="bookItem"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: var(--transition);
}

[data-testid="bookItem"]:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(67, 97, 238, 0.3);
}

[data-testid="bookItem"]:hover::before {
  width: 6px;
  background: var(--accent);
}

[data-testid="bookItem"] h3 {
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  font-weight: 600;
}

[data-testid="bookItem"] p {
  margin: 0.5rem 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

[data-testid="bookItem"] p strong {
  color: var(--accent);
  font-weight: 500;
}

[data-testid="bookItem"] > div {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

[data-testid^="bookItem"] button {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  margin: 2px;
}

[data-testid$="IsCompleteButton"] {
  background: var(--success);
}

[data-testid$="IsCompleteButton"]:hover {
  background: #3aa033;
}

[data-testid$="DeleteButton"] {
  background: var(--danger);
}

[data-testid$="DeleteButton"]:hover {
  background: #d63a5f;
}

[data-testid$="EditButton"] {
  background: var(--warning);
  color: var(--dark);
}

[data-testid$="EditButton"]:hover {
  background: #e6c209;
  color: var(--dark);
}

[data-testid="bookItem"] button {
  margin-right: 0.5rem;
  background-color: #e94560; /* Warna tombol di item buku */
}

[data-testid="bookItem"] button:hover {
  background-color: #f8b739; /* Warna hover tombol di item buku */
}

/* Footer Styles */
.main-footer {
  background: rgba(15, 23, 42, 0.8);
  color: var(--light);
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: #a0a0a0;
}



/* Responsive Styles */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  header {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }
  
  .header-right {
    margin-top: 1rem;
    justify-content: center;
    width: 100%;
  }
  
  .header-right button {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  main {
    width: 95%;
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  section {
    padding: 1.5rem 1rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  #incompleteBookList,
  #completeBookList,
  .search-results .book-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  [data-testid="bookItem"] {
    padding: 1.25rem;
  }
  
  [data-testid="bookItem"] > div {
    flex-direction: column;
  }
  
  [data-testid^="bookItem"] button {
    width: 100%;
    margin: 2px 0;
  }
}