/* ========================================
   EMILY L BANKS - AUTHOR WEBSITE
   Purple Theme with Dark/Light Mode
   Enhanced Animations & Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ========================================
   CSS VARIABLES - DARK/LIGHT THEME
   ======================================== */
:root {
    /* Purple Base Colors */
    --purple: #6B2D7A;
    --purple-light: #9B4FA8;
    --purple-dark: #4A1A56;
    --purple-glow: #C77DDB;
    
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: rgba(107, 45, 122, 0.3);
    
    /* Gradients */
    --purple-gradient: linear-gradient(135deg, #6B2D7A 0%, #9B4FA8 50%, #4A1A56 100%);
    --purple-gradient-radial: radial-gradient(circle at 30% 30%, rgba(107, 45, 122, 0.15) 0%, transparent 50%);
    
    /* Fonts */
    --font-display: 'Cinzel', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-soft: 0 10px 40px rgba(107, 45, 122, 0.15);
    --shadow-medium: 0 20px 60px rgba(107, 45, 122, 0.2);
    --shadow-glow: 0 0 40px rgba(155, 79, 168, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f5fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #8a8a9a;
    --border-color: rgba(107, 45, 122, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-medium), color var(--transition-medium);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-light);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Label Text */
.label-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 500;
    color: var(--purple-light);
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--bg-primary);
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(107, 45, 122, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(155, 79, 168, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 40% 40%, rgba(74, 26, 86, 0.06) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(-1%, 3%) rotate(-1deg); }
    75% { transform: translate(-2%, -1%) rotate(0.5deg); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--purple-light);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s infinite linear;
    box-shadow: 0 0 10px var(--purple-glow);
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; width: 6px; height: 6px; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 22s; width: 8px; height: 8px; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; animation-duration: 20s; width: 5px; height: 5px; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; animation-duration: 19s; width: 7px; height: 7px; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; animation-duration: 21s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; animation-duration: 17s; width: 5px; height: 5px; }
.particle:nth-child(8) { left: 5%; animation-delay: 4.5s; animation-duration: 23s; width: 6px; height: 6px; }
.particle:nth-child(9) { left: 15%; animation-delay: 6s; animation-duration: 25s; }
.particle:nth-child(10) { left: 45%; animation-delay: 1.5s; animation-duration: 20s; width: 8px; height: 8px; }
.particle:nth-child(11) { left: 70%; animation-delay: 7s; animation-duration: 18s; }
.particle:nth-child(12) { left: 85%; animation-delay: 3.5s; animation-duration: 24s; width: 4px; height: 4px; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg) scale(1); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ========================================
   THEME TOGGLE
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--purple-light);
    box-shadow: var(--shadow-glow);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--purple-light);
    transition: var(--transition-fast);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-medium);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 5%;
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--purple-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple-gradient);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--purple-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--purple-light);
}

.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--purple-light);
    transition: var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav a {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
}

.mobile-nav a:hover {
    color: var(--purple-light);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    font-family: var(--font-body);
    border-radius: 8px;
}

.btn-primary {
    background: var(--purple-gradient);
    color: #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--purple-light);
    border: 2px solid var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-black {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-black:hover {
    background: var(--purple);
    transform: translateY(-3px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 5% 4rem;
    overflow: hidden;
    background: var(--purple-gradient-radial);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

/* FIXED: Hero Book Logo - Mobile Responsive */
.hero-book {
    width: 350px;
    height: 350px;
    margin: 0 auto 2rem;
    position: relative;
    perspective: 1000px;
    animation: bookFloat 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-book img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 60px rgba(155, 79, 168, 0.5);
    border-radius: 15px;
    transition: var(--transition-medium);
}

.hero-book:hover img {
    transform: rotateY(20deg) rotateX(15deg);
    box-shadow: 0 0 80px rgba(155, 79, 168, 0.7);
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero h1 {
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
    background: var(--purple-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--purple-light);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.2s;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    border: 2px solid var(--purple);
    border-radius: 15px;
    position: relative;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--purple-light);
    border-radius: 50%;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 28px; opacity: 0.3; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    padding: 6rem 5%;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header .label-text {
    display: block;
    margin-bottom: 1rem;
}

.purple-line {
    width: 80px;
    height: 3px;
    background: var(--purple-gradient);
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* ========================================
   BOOKS SECTION
   ======================================== */
.books-section {
    background: var(--bg-secondary);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.book-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-medium);
    position: relative;
    border: 1px solid var(--border-color);
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium), var(--shadow-glow);
    border-color: var(--purple-light);
}

.book-cover {
    height: 400px;
    overflow: hidden;
    position: relative;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 2rem;
}

.book-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.book-info .series {
    font-size: 0.85rem;
    color: var(--purple-light);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.book-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   TROPES SECTION
   ======================================== */
.tropes-section {
    background: var(--bg-primary);
}

.tropes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.trope-tag {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: default;
}

.trope-tag:hover {
    background: var(--purple);
    border-color: var(--purple-light);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   MOOD BOARD SECTION
   ======================================== */
.mood-board-section {
    background: var(--bg-secondary);
    padding: 5rem 5%;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.mood-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
}

.mood-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-medium);
    border-color: var(--purple-light);
}

.mood-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.mood-item:hover img {
    transform: scale(1.1);
}

.mood-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition-medium);
}

.mood-item:hover .mood-overlay {
    opacity: 1;
}

.mood-overlay h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.mood-overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

/* ========================================
   GALLERY/SELFIES SECTION
   ======================================== */
.gallery-section {
    background: var(--bg-primary);
    padding: 5rem 5%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--purple-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(107, 45, 122, 0.95) 0%, transparent 100%);
    transform: translateY(100%);
    transition: var(--transition-medium);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption p {
    color: #fff;
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   REVIEWS SECTION
   ======================================== */
.reviews-section {
    background: var(--bg-secondary);
    padding: 5rem 5%;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.review-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    position: relative;
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--purple-light);
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-family: var(--font-display);
    font-size: 5rem;
    color: var(--purple);
    opacity: 0.3;
    line-height: 1;
}

.review-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--purple);
}

.review-info h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.review-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   ARTWORK SECTION
   ======================================== */
.artwork-section {
    background: var(--bg-primary);
    padding: 5rem 5%;
}

.artwork-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.artwork-tab {
    padding: 1rem 2.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.artwork-tab:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

.artwork-tab.active {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.artwork-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 3/4;
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.artwork-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--purple-light);
}

.artwork-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.artwork-item:hover img {
    transform: scale(1.05);
}

.artwork-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    transform: translateY(100%);
    transition: var(--transition-medium);
}

.artwork-item:hover .artwork-info {
    transform: translateY(0);
}

.artwork-info h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.artwork-info span {
    color: var(--purple-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   PLAYLIST SECTION - ENHANCED
   ======================================== */
.playlist-section {
    background: var(--bg-primary);
    padding: 5rem 5%;
}

.playlist-hero {
    background: var(--purple-gradient);
    color: #fff;
    text-align: center;
    padding: 6rem 5%;
    position: relative;
    overflow: hidden;
}

.playlist-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.playlist-hero h1 {
    color: #fff;
    position: relative;
    z-index: 1;
}

.playlist-hero p {
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 1rem auto 0;
}

.playlist-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.playlist-card-enhanced {
    background: var(--bg-card);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-card), 0 0 60px rgba(107, 45, 122, 0.2);
    border: 1px solid var(--border-color);
    transition: var(--transition-medium);
}

.playlist-card-enhanced:hover {
    box-shadow: var(--shadow-medium), 0 0 80px rgba(107, 45, 122, 0.3);
}

.playlist-header {
    background: linear-gradient(135deg, rgba(107, 45, 122, 0.3) 0%, rgba(74, 26, 86, 0.5) 100%);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.playlist-icon {
    width: 100px;
    height: 100px;
    background: var(--purple-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.playlist-icon svg {
    width: 50px;
    height: 50px;
    color: #fff;
}

.playlist-meta h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.playlist-meta p {
    color: var(--purple-light);
    font-size: 1rem;
}

.playlist-description {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.playlist-description p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.playlist-embed-container {
    padding: 2rem 2.5rem;
    background: var(--bg-secondary);
}

.playlist-embed-container iframe {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.playlist-footer {
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.playlist-vibes {
    background: var(--bg-secondary);
    padding: 4rem 5%;
}

.playlist-vibes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.vibe-tag {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vibe-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--purple-light);
    border-radius: 50%;
}

.vibe-tag:hover {
    background: var(--purple);
    border-color: var(--purple-light);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
    background: var(--bg-secondary);

}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-form-wrapper {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 15px rgba(107, 45, 122, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-links {
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.contact-link:hover {
    border-color: var(--purple-light);
    transform: translateX(10px);
}

.contact-link svg {
    width: 24px;
    height: 24px;
    color: var(--purple-light);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-column h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--purple-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Admin Link */
.admin-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.admin-link:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Glow animation */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(155, 79, 168, 0.3); }
    50% { box-shadow: 0 0 40px rgba(155, 79, 168, 0.6); }
}

/* Float animation */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Shimmer effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--purple-light);
}

/* ========================================
   RESPONSIVE - ENHANCED FOR MOBILE
   ======================================== */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-book {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* FIXED: Hero Book Logo for Mobile */
    .hero-book {
        width: 250px;
        height: 250px;
        margin: 0 auto 1.5rem;
    }
    
    .hero-book img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        box-shadow: 0 0 40px rgba(155, 79, 168, 0.4);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Grid layouts handled above */
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .theme-toggle {
        top: 1rem;
        right: 4rem;
        width: 40px;
        height: 40px;
    }
    
    section {
        padding: 4rem 5%;
    }
    
    .hero {
        padding: 7rem 5% 3rem;
        min-height: auto;
        padding-top: 8rem;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Playlist mobile fixes */
    .playlist-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .playlist-icon {
        width: 80px;
        height: 80px;
    }
    
    .playlist-meta h3 {
        font-size: 1.5rem;
    }
    
    .playlist-description,
    .playlist-embed-container,
    .playlist-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* FIXED: Smaller hero book for very small screens */
    .hero-book {
        width: 200px;
        height: 200px;
        margin: 0 auto 1rem;
    }
    
    .hero-book img {
        box-shadow: 0 0 30px rgba(155, 79, 168, 0.3);
    }
    
    .mood-grid,
    .gallery-grid,
    .artwork-grid {
        grid-template-columns: 1fr;
    }
    
    .trope-tag {
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .hero {
        padding-top: 7rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .navbar {
        padding: 1rem 4%;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .mobile-nav a {
        font-size: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .hero-book {
        width: 180px;
        height: 180px;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
}

/* ========================================
   KENEXAR WATERMARK
   ======================================== */
#kenexar-watermark {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    opacity: 0.85;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    line-height: 0;
    display: block;
}

#kenexar-watermark img {
    width: clamp(120px, 15vw, 180px);
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

#kenexar-watermark:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

#kenexar-watermark:hover img {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

@media (max-width: 768px) {
    #kenexar-watermark {
        bottom: 15px !important;
        right: 15px !important;
    }
    #kenexar-watermark img {
        width: 100px;
    }
}

@media print {
    #kenexar-watermark {
        display: none !important;
    }
}
