/* ==========================================================================
   1. DESIGN SYSTEM & TYPOGRAPHIC SCALE
   ========================================================================== */
   @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

   :root {
       /* Color Palette */
       --surface-page: #F5EBEB;
       --surface-card: #FFFFFF;
       --surface-dark: #1E0A15;
       --surface-accent: #FAF0F2;
       
       --color-plum: #260C1A;
       --color-mauve: #4A323B;
       --color-earth: #6B524B;
       --color-rose: #C29B93;
       --color-pink: #F3D2D7;
       
       --text-primary: #1E0A15;
       --text-secondary: #4A323B;
       --text-muted: #7A625B;
       
       /* Typography */
       --font-heading: 'Cinzel', serif;
       --font-body: 'Plus Jakarta Sans', sans-serif;
       
       /* Strict 8px Spatial Grid Units */
       --space-xs: 8px;
       --space-sm: 16px;
       --space-md: 24px;
       --space-lg: 32px;
       --space-xl: 48px;
       --space-2xl: 64px;
       
       /* Design Tokens */
       --radius-sm: 8px;
       --radius-md: 16px;
       --radius-lg: 24px;
       --radius-pill: 999px;
       
       --shadow-sm: 0 2px 8px rgba(30, 10, 21, 0.04);
       --shadow-md: 0 8px 24px rgba(30, 10, 21, 0.08);
       --shadow-lg: 0 16px 40px rgba(30, 10, 21, 0.12);
       
       --transition-fast: all 0.15s ease;
       --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
   }
   
   /* Base Reset */
   *, *::before, *::after {
       box-sizing: border-box;
       margin: 0;
       padding: 0;
   }
   
   body {
       font-family: var(--font-body);
       background-color: var(--surface-page);
       color: var(--text-secondary);
       font-size: 1rem;
       line-height: 1.6;
       padding-top: 110px;
       padding-bottom: var(--space-2xl);
       -webkit-font-smoothing: antialiased;
   }
   
   /* ==========================================================================
      2. TYPOGRAPHIC HIERARCHY
      ========================================================================== */
   h1, h2, h3, h4 {
       font-family: var(--font-heading);
       color: var(--text-primary);
       line-height: 1.15;
       letter-spacing: -0.02em;
   }
   
   h1, .gradient-title {
       font-size: clamp(2.25rem, 5vw, 3.25rem);
       font-weight: 800;
       text-align: center;
       margin-bottom: var(--space-xs);
   }
   
   h2 {
       font-size: clamp(1.5rem, 3vw, 2rem);
       font-weight: 700;
       margin-top: var(--space-lg);
       margin-bottom: var(--space-md);
       position: relative;
   }
   
   h3 {
       font-size: 1.25rem;
       font-weight: 700;
       margin-bottom: var(--space-xs);
   }
   
   p {
       font-size: 0.95rem;
       color: var(--text-secondary);
       line-height: 1.65;
       margin-bottom: var(--space-sm);
   }
   
   p:last-child {
       margin-bottom: 0;
   }
   
   .sub-badge {
       display: block;
       text-align: center;
       color: var(--color-earth);
       font-size: 0.75rem;
       font-weight: 700;
       text-transform: uppercase;
       letter-spacing: 0.15em;
       margin-bottom: var(--space-xs);
   }
   
   /* ==========================================================================
      3. NAVIGATION BAR (Structure & Alignment)
      ========================================================================== */
   nav {
       background: rgba(30, 10, 21, 0.92);
       backdrop-filter: blur(12px);
       -webkit-backdrop-filter: blur(12px);
       padding: var(--space-xs) var(--space-sm);
       display: flex;
       justify-content: center;
       align-items: center;
       gap: var(--space-xs);
       border-radius: var(--radius-pill);
       position: fixed;
       top: var(--space-md);
       left: 50%;
       transform: translateX(-50%);
       width: calc(100% - var(--space-md) * 2);
       max-width: 480px;
       z-index: 1000;
       border: 1px solid rgba(243, 210, 215, 0.15);
       box-shadow: var(--shadow-lg);
   }
   
   nav a {
       color: var(--color-pink);
       text-decoration: none;
       font-size: 0.875rem;
       font-weight: 600;
       padding: var(--space-xs) var(--space-md);
       border-radius: var(--radius-pill);
       transition: var(--transition-fast);
   }
   
   nav a:hover {
       background-color: rgba(243, 210, 215, 0.15);
       color: #FFFFFF;
   }
   
   /* ==========================================================================
      4. BUTTON & CONTROLS SYSTEM
      ========================================================================== */
   .btn-primary, button[type="submit"], .btn-sparkle {
       display: inline-flex;
       align-items: center;
       justify-content: center;
       gap: var(--space-xs);
       padding: var(--space-sm) var(--space-md);
       background-color: var(--color-plum);
       color: var(--color-pink);
       border: 1px solid var(--color-mauve);
       border-radius: var(--radius-pill);
       font-family: var(--font-body);
       font-size: 0.875rem;
       font-weight: 700;
       letter-spacing: 0.02em;
       cursor: pointer;
       text-decoration: none;
       transition: var(--transition-smooth);
       box-shadow: var(--shadow-sm);
   }
   
   .btn-primary:hover, button[type="submit"]:hover, .btn-sparkle:hover {
       background-color: var(--surface-dark);
       color: #FFFFFF;
       transform: translateY(-2px);
       box-shadow: var(--shadow-md);
   }
   
   .btn-primary:active, button[type="submit"]:active, .btn-sparkle:active {
       transform: translateY(0);
       box-shadow: var(--shadow-sm);
   }
   
   .filter-btn {
       background-color: var(--surface-accent);
       border: 1px solid rgba(194, 155, 147, 0.2);
       color: var(--color-earth);
       padding: 8px var(--space-sm);
       border-radius: var(--radius-pill);
       font-size: 0.8125rem;
       font-weight: 600;
       cursor: pointer;
       transition: var(--transition-fast);
   }
   
   .filter-btn:hover {
       background-color: var(--color-pink);
       color: var(--color-plum);
   }
   
   .filter-btn.active {
       background-color: var(--color-plum);
       color: #FFFFFF;
       border-color: var(--color-plum);
   }
   
   /* ==========================================================================
      5. CONTAINERS & COMPONENT LAYOUTS
      ========================================================================== */
   main, .home-container, .news-container {
       max-width: 960px;
       margin: 0 auto;
       padding: var(--space-xl);
       background: var(--surface-card);
       border-radius: var(--radius-lg);
       box-shadow: var(--shadow-md);
       border: 1px solid rgba(194, 155, 147, 0.2);
   }
   
   /* Hero Section */
   .hero-section {
       text-align: center;
       margin-bottom: var(--space-xl);
   }
   
   .hero-desc {
       max-width: 580px;
       margin: 0 auto var(--space-md) auto;
       color: var(--text-muted);
       font-size: 1.05rem;
   }
   
   /* Trope Generator Container */
   .trope-generator-box {
       background: var(--surface-dark);
       padding: var(--space-md) var(--space-lg);
       border-radius: var(--radius-md);
       max-width: 540px;
       margin: var(--space-md) auto 0 auto;
       border: 1px solid rgba(243, 210, 215, 0.1);
   }
   
   #trope-display {
       color: #FFFFFF;
       font-size: 1rem;
       font-weight: 500;
       margin-bottom: var(--space-sm);
   }
   
   /* Spotlight Card Layout */
   .current-read-card {
       background-color: var(--surface-accent);
       border: 1px solid rgba(194, 155, 147, 0.3);
       border-radius: var(--radius-md);
       padding: var(--space-lg);
       display: grid;
       grid-template-columns: 140px 1fr;
       gap: var(--space-lg);
       align-items: center;
       margin-bottom: var(--space-xl);
   }
   
   .book-cover-placeholder {
       width: 140px;
       height: 195px;
       background: var(--surface-dark);
       border-radius: var(--radius-sm);
       display: flex;
       align-items: center;
       justify-content: center;
       box-shadow: var(--shadow-md);
   }
   
   .cover-icon {
       font-size: 2.75rem;
   }
   
   .card-header-flex {
       display: flex;
       justify-content: space-between;
       align-items: center;
       margin-bottom: var(--space-xs);
   }
   
   .tag {
       font-size: 0.6875rem;
       font-weight: 700;
       text-transform: uppercase;
       letter-spacing: 0.1em;
       color: var(--color-earth);
   }
   
   .author {
       font-style: italic;
       color: var(--text-muted);
       font-size: 0.875rem;
       margin-bottom: var(--space-sm);
   }
   
   .summary {
       font-size: 0.925rem;
       margin-bottom: var(--space-md);
   }
   
   /* Grid & Cards */
   .filter-bar {
       display: flex;
       gap: var(--space-xs);
       justify-content: center;
       margin-bottom: var(--space-md);
       flex-wrap: wrap;
   }
   
   .shelves-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
       gap: var(--space-md);
   }
   
   .shelf-card {
       background: var(--surface-card);
       border: 1px solid rgba(194, 155, 147, 0.25);
       border-radius: var(--radius-md);
       padding: var(--space-md);
       display: flex;
       flex-direction: column;
       justify-content: space-between;
       transition: var(--transition-smooth);
   }
   
   .shelf-card:hover {
       transform: translateY(-4px);
       box-shadow: var(--shadow-md);
       border-color: var(--color-rose);
   }
   
   .card-actions {
       display: flex;
       justify-content: space-between;
       align-items: center;
       margin-top: var(--space-md);
       padding-top: var(--space-sm);
       border-top: 1px solid rgba(194, 155, 147, 0.15);
   }
   
   /* ==========================================================================
      6. RESPONSIVE LAYOUT ADJUSTMENTS
      ========================================================================== */
   @media (max-width: 768px) {
       body {
           padding-top: 90px;
       }
   
       main, .home-container, .news-container {
           padding: var(--space-md);
       }
   
       .current-read-card {
           grid-template-columns: 1fr;
           text-align: center;
           padding: var(--space-md);
           gap: var(--space-md);
       }
   
       .book-cover-placeholder {
           margin: 0 auto;
       }
   
       .card-header-flex {
           flex-direction: column;
           gap: var(--space-xs);
       }
   }


   /* Form Container */
form {
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #AF8D86;
    box-shadow: 0 4px 12px rgba(67, 46, 54, 0.08);
    width: 100%;
    max-width: 500px;
    padding: 32px;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5F4842;
    display: inline-block;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid #AF8D86;
    border-radius: 6px;
    background-color: #ffffff;
    color: #260C1A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #432E36;
    box-shadow: 0 0 0 3px rgba(67, 46, 54, 0.2);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

button[type="submit"], .btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #432E36;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button[type="submit"]:hover, .btn-primary:hover {
    background-color: #260C1A;
}