/* ===== AUTUMN BOOKS WEBSITE STYLES ===== */

/* CSS Variables - Warm Autumn Palette */
:root {
  --pumpkin: #e0812a;      /* Primary brand color */
  --maple: #f2b705;        /* Accent gold */
  --cocoa: #8b4513;        /* Dark brown */
  --dark-brown: #2d1810;   /* Deep background */
  --parchment: #f6efe7;    /* Light text */
  --oat: #cdb9a5;          /* Muted text */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--parchment);
  background: var(--dark-brown);
  position: relative;
  min-height: 100vh;
}

/* Background Image with Blur & Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/Users/aleksandrakhilova/Downloads/fall%20books/Autumn Elements Pattern.webp') center center / cover no-repeat;
  filter: blur(8px) brightness(0.6);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(45, 24, 16, 0.8), rgba(139, 69, 19, 0.6));
  z-index: -1;
}

/* Fallback background */
@supports not (filter: blur()) {
  body::before {
    background: url('./Autumn Elements Pattern.webp') center center / cover no-repeat;
    filter: brightness(0.4);
  }
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--pumpkin);
  color: var(--dark-brown);
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1000;
  transform: translateX(400px);
  transition: var(--transition);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: #dc3545;
  color: white;
}

/* Header & Hero */
.hero {
  background: linear-gradient(135deg, rgba(224, 129, 42, 0.95), rgba(139, 69, 19, 0.9));
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  margin: 40px 20px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--dark-brown);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero .intro {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--dark-brown);
  line-height: 1.7;
}

/* Mood Bar - Support both old and new structure */
.mood-bar,
#mood-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.mood-btn,
#mood-bar .btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark-brown);
  border: 2px solid transparent;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.mood-btn:hover,
#mood-bar .btn:hover {
  background: var(--pumpkin);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.mood-btn[aria-selected="true"],
.mood-btn.active,
#mood-bar .btn[aria-selected="true"],
#mood-bar .btn.active {
  background: var(--pumpkin);
  color: white;
  border-color: var(--maple);
}

/* Main Content */
main {
  padding: 40px 0;
}

/* Sections - Support both old and new structure */
.top-picks,
#picks,
.bookshelf,
#bookshelf {
  margin-bottom: 60px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--parchment);
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--oat);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--parchment);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.filter-btn:hover {
  background: rgba(224, 129, 42, 0.3);
  border-color: var(--pumpkin);
}

.filter-btn.active,
.filter-btn[aria-selected="true"] {
  background: var(--pumpkin);
  color: var(--dark-brown);
  border-color: var(--maple);
}

/* Grid Layouts - Support both old and new structure */
.picks-grid,
#picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Book Cards - Support both old and new structure */
.book-card,
.book {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-card:hover,
.book:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Support both old and new header structures */
.book-card h3,
.book h3,
.book header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark-brown);
  line-height: 1.3;
}

.book-card .author,
.book .by {
  color: var(--cocoa);
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Support both old and new mood structures */
.book-card .moods,
.book .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.book .meta {
  list-style: none;
}

.mood-tag,
.book .tag {
  background: var(--maple);
  color: var(--dark-brown);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* Support both old and new description structures */
.book-card .description,
.book .desc {
  color: var(--cocoa);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* Support both old and new action structures */
.book .actions {
  margin: 0;
}

/* Support both old and new button structures */
.amazon-btn,
.book .link {
  background: var(--pumpkin);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
  transition: var(--transition);
  text-align: center;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.amazon-btn:hover,
.book .link:hover {
  background: #d47322;
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--oat);
}

.loading p {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--parchment);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin: 16px 0;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.drag-hint {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 16px;
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--oat);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    margin: 20px 10px;
    padding: 32px 20px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .intro {
    font-size: 1rem;
  }
  
  .mood-bar,
  #mood-bar {
    gap: 8px;
  }
  
  .mood-btn,
  #mood-bar .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .picks-grid,
  #picks-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .books-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .book-card,
  .book {
    padding: 20px;
  }
  
  .wrap {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 24px 16px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .mood-btn,
  #mood-bar .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Focus States for Accessibility */
.mood-btn:focus,
#mood-bar .btn:focus,
.filter-btn:focus,
.amazon-btn:focus,
.book .link:focus,
.btn-secondary:focus {
  outline: 2px solid var(--maple);
  outline-offset: 2px;
}

/* Smooth Animations */
.book-card,
.book,
.mood-btn,
#mood-bar .btn,
.filter-btn,
.amazon-btn,
.book .link {
  will-change: transform;
}

/* Print Styles */
@media print {
  body::before,
  body::after {
    display: none;
  }
  
  .hero {
    background: white;
    color: black;
  }
  
  .book-card,
  .book {
    background: white;
    color: black;
    border: 1px solid #ccc;
  }
}
/* Navigation Menu */
.nav-center {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 129, 42, 0.2);
  padding: 16px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-center a {
  color: var(--dark-brown);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin: 0 20px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-center a:hover {
  color: var(--pumpkin);
  background: rgba(224, 129, 42, 0.1);
  transform: translateY(-2px);
}

.nav-center a:focus {
  outline: 2px solid var(--maple);
  outline-offset: 2px;
}

.nav-center a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--pumpkin);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-center a:hover::after {
  width: 80%;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-center {
    padding: 12px 0;
  }
  
  .nav-center a {
    margin: 0 10px;
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .nav-center {
    padding: 10px 0;
  }
  
  .nav-center a {
    margin: 0 8px;
    padding: 5px 10px;
    font-size: 0.85rem;
  }
}