* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  flex-direction: column;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, #4a6fa5, #3a5a86);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Navigation Styles */
nav {
    background-color: #3a5a86;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #ffd166;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffd166;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Active navigation item */
nav a.active {
    color: #ffd166;
}

nav a.active::after {
    width: 100%;
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.search-bar input {
  width: 70%;
  max-width: 500px;
  padding: 0.8rem 1.5rem;
  border: 2px solid #e1e5eb;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: #4a6fa5;
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.search-bar button {
  background-color: #4a6fa5;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0 1.5rem;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background-color: #3a5a86;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

/* Book Card Styles */
.book-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.book-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-bottom: 1px solid #f0f0f0;
}

.book-info {
  padding: 1.5rem;
}

.book-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.book-info p {
  color: #7f8c8d;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.book-rating {
  color: #ffc107;
  margin: 0.5rem 0;
}

.book-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: #4a6fa5;
  color: white;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #3a5a86;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #4a6fa5;
  color: #4a6fa5;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: #4a6fa5;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav li {
    margin: 0.5rem 0;
  }
  
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .search-bar input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2rem;
  }
  
  .books-grid {
    grid-template-columns: 1fr;
  }
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #4a6fa5, #3a5a86);
  color: white;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-content {
  flex: 1;
  padding-right: 3rem;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn-hero {
  display: inline-block;
  background-color: #ffd166;
  color: #333;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-hero:hover {
  background-color: #ffc145;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 209, 102, 0.3);
}

.hero-image {
  flex: 1;
}

.hero-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Quick Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto;
  text-align: center;
}

.stat-item {
  background: white;
  padding: 2rem 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-item i {
  font-size: 2.5rem;
  color: #4a6fa5;
  margin-bottom: 1rem;
}

.stat-item h3 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: #7f8c8d;
  font-size: 1rem;
}

/* Categories Section */
.categories {
  max-width: 1200px;
  margin: 3rem auto;
  text-align: center;
}

.categories h2 {
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 2rem;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-btn {
  background: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  color: #4a6fa5;
  font-weight: 600;
  border: 2px solid #e1e5eb;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background-color: #4a6fa5;
  color: white;
  border-color: #4a6fa5;
}

/* Filter Section */
.filter-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-options select {
  padding: 0.7rem 1rem;
  border: 2px solid #e1e5eb;
  border-radius: 5px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
}

.filter-btn {
  background-color: #4a6fa5;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: #3a5a86;
}

.reset-btn {
  background-color: transparent;
  border: 1px solid #dc3545;
  color: #dc3545;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background-color: #dc3545;
  color: white;
}

.results-info {
  border-top: 1px solid #e1e5eb;
  padding-top: 1rem;
}

/* Featured Books Section */
.featured-section {
  max-width: 1200px;
  margin: 3rem auto;
}

.featured-section h2 {
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 2rem;
}

/* Login/User Button */
.user-menu {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.user-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.user-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Updates */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }
  
  .hero-content {
    padding-right: 0;
    margin-bottom: 2rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .category-list {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  
  .user-menu {
    position: static;
    transform: none;
    text-align: center;
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
  
  .filter-options {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-options select,
  .filter-btn,
  .reset-btn {
    width: 100%;
  }
}

/* Header Container */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Logo Styling */
.header-logo {
  width: 100px;   /* Container 80px */
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
 /*background-color: rgba(255, 255, 255, 0.1); /* Transparan putih */
  padding: 8px;
  backdrop-filter: blur(5px); /* Efek blur untuk transparansi */
  /*border: 1px solid rgba(255, 255, 255, 0.2); /* Border transparan */
}

.header-logo img {
  width: 120%;
  height: 120%;
  object-fit: contain;
  filter: brightness(0.9); /* Sedikit gelapkan jika perlu */
}

.left-logo {
  margin-right: 2rem;
}

.right-logo {
  margin-left: 2rem;
}

/* Header Text */
.header-text {
  flex: 1;
  text-align: center;
}

/* Responsive Header */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .header-logo {
    width: 60px;
    height: 60px;
    margin: 0.5rem 0;
  }
  
  .left-logo, .right-logo {
    margin: 0.5rem 0;
  }
  
  .header-text {
    margin: 1rem 0;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header-logo {
    width: 50px;
    height: 50px;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #3a5a86, #2c3e50);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    width: 100%;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    justify-content: center;
    max-width: 100%;
    left: 0;
    right: 0;
    position: absolute;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.footer-links {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #ffd166;
}

.social-icons {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin: 0 0.5rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: #ffd166;
  transform: translateY(-3px);
}

.copyright {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

html, body {
    margin: 0;
    height: 100%;
}