/* Modern Elegant Color System - Black/Grey/White/Light Pink */
:root {
    /* Primary Colors - Modern Monochrome */
    --primary-dark: #1a1a1a;
    --primary-medium: #404040;
    --primary-light: #666666;
    
    /* Accent Colors - Elegant Light Pink */
    --accent-gold: #f8e8f0;
    --accent-amber: #e8d1dc;
    --accent-sage: #d1bcc7;
    --accent-burgundy: #1a1a1a;
    --accent-cream: #ffffff;
    
    /* Background Colors - Clean Neutrals */
    --background-primary: #ffffff;
    --background-secondary: #ffffff;
    --background-tertiary: #ffffff;
    --background-overlay: rgba(26, 26, 26, 0.05);
    
    /* Text Colors - Sharp & Readable */
    --text-primary: #1a1a1a;
    --text-secondary: #404040;
    --text-muted: #666666;
    --text-light: #ffffff;
    --text-accent: #e8d1dc;
    
    /* Shadows & Effects - Removed */
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-glow: none;
    
    /* Beautiful Gradients - Modern Theme */
    --gradient-primary: linear-gradient(135deg, #f8e8f0 0%, #e8d1dc 100%);
    --gradient-secondary: linear-gradient(135deg, #ffffff 0%, #f8e8f0 50%, #e8d1dc 100%);
    --gradient-tertiary: linear-gradient(135deg, #1a1a1a 0%, #e8d1dc 100%);
    --gradient-dark: #ffffff;
    --gradient-warm: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    
    /* Smooth Animations */
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Modern Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Legacy Compatibility */
    --primary-brown: #1a1a1a;
    --secondary-brown: #1a1a1a;
    --dark-text: #1a1a1a;
    --light-text: #ffffff;
    --cream: #ffffff;
    --parchment: #ffffff;
    --accent-purple: #e8d1dc;
    
    /* Beautiful Pink Gradients */
    --pink-gradient-primary: linear-gradient(135deg, #c287a3, #b4316a, #a52a5c);
    --pink-gradient-secondary: linear-gradient(135deg, #c287a3, #b4316a);
    
}

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

/* Prevent Safari from auto-adjusting text size */
html {
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

body {
    font-family: 'Faruma', 'Noto Sans Dhivehi', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    direction: ltr;
    text-align: left;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 18px; /* Increased base font size */
    font-display: swap;
    /* Prevent text shrinking on mobile */
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}


/* RTL styling specifically for Dhivehi content - Enhanced */
.faruma, [lang="dv"] {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
    font-feature-settings: "liga" 1, "kern" 1;
    -webkit-font-feature-settings: "liga" 1, "kern" 1;
    unicode-bidi: plaintext;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Clean White Background */
body::before {
    display: none;
}

/* Header Styles */
header {
    background: #ffffff;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: none;
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideInDown 0.8s ease-out;
    transition: var(--transition-fast);
}

header::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 20"><path d="M0,10 Q25,0 50,10 T100,10" stroke="rgba(232,209,220,0.3)" stroke-width="1" fill="none"/></svg>') repeat-x;
    opacity: 0.6;
    animation: bookPattern 10s linear infinite;
}

/* Enhanced Navigation Bar Animations */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-gold) 20%, 
        var(--accent-amber) 40%, 
        var(--accent-sage) 60%, 
        var(--accent-gold) 80%, 
        transparent 100%
    );
    animation: navBarLine 4s ease-in-out infinite;
}

/* Animated decorative lines */
header {
    overflow: hidden;
}

header nav::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -100%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(184, 51, 106, 0.5) 30%, 
        rgba(184, 51, 106, 0.8) 50%, 
        rgba(184, 51, 106, 0.5) 70%, 
        transparent 100%
    );
    animation: sweepLine 6s ease-in-out infinite;
}

header nav::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -100%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(232, 209, 220, 0.5) 30%, 
        rgba(232, 209, 220, 0.8) 50%, 
        rgba(232, 209, 220, 0.5) 70%, 
        transparent 100%
    );
    animation: sweepLineReverse 8s ease-in-out infinite;
}

.site-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.site-title img {
    height: 65px !important;
    width: 65px !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: none;
    transition: var(--transition-normal);
    object-fit: cover;
}

.site-title img:hover {
    transform: scale(1.05);
    box-shadow: none;
}
/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #ffffff;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.mobile-nav-close:hover {
    background: var(--accent-gold);
}

.mobile-nav-links {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 2px solid var(--accent-gold);
    text-align: center;
    transition: all 0.3s ease;
    background: var(--gradient-primary);
}

.mobile-nav-links a:hover {
    background: var(--accent-gold);
    transform: translateX(5px);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    background: var(--gradient-soft);
    transition: var(--transition-normal);
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 2px 6px rgba(252, 228, 236, 0.25);
}

.main-nav a:hover {
    color: var(--text-primary);
    background: var(--gradient-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(248, 187, 217, 0.4);
    border-color: var(--accent-rose);
}

.main-nav a.active {
    color: var(--accent-purple);
    font-weight: 600;
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.2) 50%, 
        transparent 100%
    );
    transition: left 0.6s ease;
}

.main-nav a:hover {
    color: var(--dark-text);
    background: var(--accent-gold);
    border-color: var(--light-text);
    transform: translateY(-2px);
    box-shadow: none;
}

.main-nav a:hover::before {
    left: 100%;
}

/* Enhanced Navigation Link Animations */
.main-nav a {
    position: relative;
    overflow: hidden;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-amber));
    transition: width 0.3s ease, box-shadow 0.3s ease;
    border-radius: 2px;
}

.main-nav a:hover::after {
    width: 100%;
    box-shadow: 0 0 10px var(--accent-gold);
}

/* Pulsing border animation for nav links */
.main-nav a:nth-child(1) {
    animation: navPulse1 3s ease-in-out infinite;
}

.main-nav a:nth-child(2) {
    animation: navPulse2 3s ease-in-out infinite 1.5s;
}

/* Icon-like decorations for nav links */
.main-nav a:before {
    content: '✦';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-gold);
}

.main-nav a:hover:before {
    opacity: 1;
    top: -20px;
    animation: sparkleRotate 1s linear infinite;
}

.main-nav a.lang-toggle {
    float: right;
    font-weight: bold;
    background: var(--cream);
    color: var(--dark-text);
    border: 2px solid var(--accent-gold);
    margin-left: 2em;
    animation: pulse 2s infinite;
}

.main-nav a.lang-toggle:hover {
    background: var(--accent-gold);
    color: var(--dark-text);
    transform: scale(1.05);
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 1em 0 0.5em 0;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    color: var(--text-primary);
    text-shadow: none;
    position: relative;
}

h1 {
    font-size: 3em;
    font-weight: 900;
    color: #1a1a1a;
    text-shadow: none;
}

h2 {
    font-size: 2.2em;
    font-weight: 700;
    border-bottom: 3px solid var(--accent-gold);
    padding-bottom: 0.3em;
    display: inline-block;
}

h3 {
    font-size: 1.6em;
    font-weight: 600;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 1em;
    position: relative;
    padding-right: 20px;
}

li::before {
    content: '📜';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.7;
}
/* Story Cards */
.story-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5em;
    padding: 2em 0;
    perspective: 1000px;
}

.story-card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    box-shadow: none;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    position: relative;
    border: 2px solid var(--accent-gold);
    overflow: hidden;
    color: var(--text-primary);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: var(--accent-amber);
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: var(--border-radius);
    padding: 3px;
    animation: borderGlow 4s ease-in-out infinite;
}

.story-card::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: var(--background-secondary);
    border-radius: calc(var(--border-radius) - 3px);
    z-index: -1;
}

.story-card:hover {
    transform: translateY(-12px) rotateY(5deg) scale(1.05);
    box-shadow: none;
    border-color: var(--accent-gold);
}

.story-card:nth-child(even):hover {
    transform: translateY(-12px) rotateY(-5deg) scale(1.05);
}
.story-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5em;
    box-shadow: none;
    border: 3px solid var(--accent-gold);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.story-cover:hover {
    transform: scale(1.02);
    box-shadow: none;
}
.story-info {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.story-info h2 {
    font-size: 1.5em;
    margin: 0.8em 0;
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: none;
    position: relative;
}

.story-info h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: underlineGrow 2s ease-in-out infinite;
}

.story-info p {
    font-size: 1.1em;
    color: var(--text-primary);
    margin-bottom: 1.5em;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.9;
}
/* Modern Buttons */
.btn {
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(252, 228, 236, 0.3);
    border: 2px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    letter-spacing: -0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%
    );
    transition: left 0.8s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 187, 217, 0.5);
    background: linear-gradient(135deg, #f8bbd9 0%, #e1bee7 100%);
    border-color: var(--accent-rose);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}
/* Modern Container Styles */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: var(--border-radius-xl);
    box-shadow: none;
    padding: 2.5rem;
    position: relative;
    z-index: 2;
    border: 2px solid var(--accent-gold);
    color: var(--text-primary);
}

.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 22px;
    animation: borderGlow 6s ease-in-out infinite;
}

.container::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.2em;
    opacity: 0.3;
    animation: floatingBooks 8s ease-in-out infinite;
}
.main-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1em;
    text-shadow: none;
}
.story-detail {
    text-align: left;
}
.story-cover-large {
    width: 100%;
    max-width: 400px;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1em;
    box-shadow: none;
}
.episode-list {
    margin-top: 1em;
    padding-left: 0;
}
.episode-list li {
    margin-bottom: 0.7em;
    font-size: 1.1em;
}
.episode-list a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.episode-list a:hover {
    color: #1a1a1a;
}
.episode-list .date {
    color: #888;
    font-size: 0.95em;
    margin-left: 1em;
}
.episode-detail h1 {
    font-size: 2em;
    color: #1a1a1a;
    margin-bottom: 0.5em;
    text-shadow: none;
}
.episode-content {
    font-size: 1.15em;
    margin-bottom: 1.5em;
}
.faruma {
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
    font-size: 1.15em;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    font-weight: normal;
    line-height: 1.7;
    font-display: swap;
    direction: rtl !important;
    text-align: right !important;
}
.meta {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 1em;
}
/* Mobile Layout Matching Desktop Appearance */
@media (max-width: 768px) {
    /* Force consistent font sizing on mobile - bigger like desktop */
    html {
        font-size: 18px !important;
        zoom: 1 !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    body {
        font-size: 16px !important; /* Desktop-like base font size */
        line-height: 1.6 !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
    }
    /* Mobile Header Layout - Desktop Style */
    header {
        padding: 1.2rem 1rem !important;
        min-height: 80px;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative;
    }
    
    /* Hide mobile menu toggle - use desktop navigation */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Show desktop navigation on mobile with better sizing */
    .main-nav {
        display: flex !important;
        align-items: center !important;
        gap: 0.8rem !important;
        margin-left: auto !important;
        flex-wrap: nowrap !important;
    }
    
    /* Hide mobile navigation overlay */
    .mobile-nav-overlay {
        display: none !important;
    }
    
    /* Mobile Navigation Links - Optimized for Touch */
    .main-nav a {
        font-size: 0.85rem !important;
        padding: 0.6rem 1rem !important;
        border-radius: 12px !important;
        min-width: 70px !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Mobile Site Title - Centered and Responsive */
    .site-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 2 !important;
    }
    
    .site-title img {
        height: 55px !important;
        width: 55px !important;
        border-radius: 12px !important;
    }
    
    /* Mobile Container - Desktop-like Width */
    .container {
        padding: 2rem 1.5rem !important;
        margin: 1rem auto !important;
        border-radius: 20px !important;
        max-width: 98% !important; /* Wider for desktop-like feel */
        box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    }
    
    /* Mobile Story Cards - Desktop-like Single Column Layout */
    .story-list {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 1.5rem 0 !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
    
    .story-card {
        width: 100% !important;
        padding: 2rem !important;
        border-radius: 20px !important;
        transform: none !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    }
    
    .story-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    }
    
    .story-cover, .story-cover-large {
        height: 250px !important;
        border-radius: 15px !important;
        object-fit: cover !important;
        width: 100% !important;
    }
    
    /* Mobile Typography - Readable Sizes */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.8rem !important;
    }
    
    h3 {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.6rem !important;
    }
    
    /* Mobile Text Content */
    p, .story-info p {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Mobile Episode Content - Wider Reading Experience */
    .episode-content {
        padding: 2rem 1.5rem !important; /* Optimized mobile padding */
        font-size: 1.1rem !important; /* Good mobile reading size */
        line-height: 1.8 !important; /* Comfortable line spacing */
        margin: 1rem auto !important;
        max-width: 100% !important; /* Full width on mobile */
        width: 98% !important; /* Almost full width */
        border-radius: 10px !important; /* Smaller border radius */
        border: 1px solid var(--accent-gold) !important; /* Thinner border */
        box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important; /* Lighter shadow */
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        text-align: right !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    /* Mobile - Force Faruma for ALL episode page elements */
    .episode-content *, 
    .episode-content div, 
    .episode-content p, 
    .episode-content span {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        text-align: right !important;
    }
    
    .episode-detail * {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    }
    
    /* Mobile Episode Title - Perfect Size with RTL */
    .episode-detail h1.faruma {
        font-size: 2.2em !important; /* Smaller for mobile */
        line-height: 1.3 !important;
        text-align: center !important;
        direction: rtl !important;
        margin: 1rem auto !important;
        max-width: 95% !important;
        padding: 0 1rem !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    }
    
    /* Mobile Story Title - Perfect Size with RTL */
    .story-detail h1.faruma {
        font-size: 0.9em !important; /* Extra small for mobile */
        line-height: 1.2 !important;
        text-align: center !important;
        direction: rtl !important;
        margin: 1rem auto !important;
        max-width: 95% !important;
        padding: 0 1rem !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        white-space: nowrap !important; /* Keep on one line */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .episode-content p {
        font-size: 1.1rem !important; /* Smaller, more readable text */
        line-height: 1.8 !important; /* Better reading spacing */
        margin-bottom: 1.2rem !important;
        text-align: right !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    .episode-content p:first-letter {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
        float: none !important;
        line-height: inherit !important;
        margin: 0 !important;
        padding: 0 !important;
        text-shadow: none !important;
        display: inline !important;
        font-family: inherit !important;
    }
    
    /* Mobile Buttons - Full Width and Touch Friendly */
    .btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin: 1rem 0 !important;
        border-radius: 15px !important;
        min-height: 50px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    }
    
    /* Mobile Footer Improvements */
    footer {
        padding: 3rem 1.5rem 2rem !important;
        margin-top: 3rem !important;
    }
    
    footer h3 {
        font-size: 2rem !important;
    }
    
    footer p {
        font-size: 1.1rem !important;
    }
    
    footer div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: center !important;
    }
    
    footer a {
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        text-align: center !important;
        padding: 1.2rem !important;
        border-radius: 15px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    }
    
    /* Mobile Meta Information */
    .meta {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Mobile Episode List */
    .episode-list li {
        margin-bottom: 1rem !important;
        font-size: 1.1rem !important;
        padding: 0.8rem !important;
        background: rgba(248, 232, 240, 0.1) !important;
        border-radius: 10px !important;
    }
    
    .episode-list a {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    .episode-list .date {
        font-size: 1rem !important;
        margin-left: 0 !important;
        display: block !important;
        margin-top: 0.3rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - Maintain desktop-like appearance */
    html {
        font-size: 18px !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    body {
        font-size: 16px !important; /* Same as desktop */
        line-height: 1.6 !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
    }
    
    header {
        padding: 1rem 0.8rem !important;
        min-height: 75px !important;
    }
    
    .site-title img {
        height: 50px !important;
        width: 50px !important;
    }
    
    /* Smaller but still readable navigation for tiny screens */
    .main-nav {
        gap: 0.6rem !important;
    }
    
    .main-nav a {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.8rem !important;
        min-width: 65px !important;
    }
    
    .container {
        padding: 2rem 1.2rem !important;
        margin: 0.8rem auto !important;
        border-radius: 18px !important;
        max-width: 98% !important; /* Full width for better reading */
    }
    
    .story-card {
        padding: 1.8rem !important;
        border-radius: 18px !important;
    }
    
    .story-cover, .story-cover-large {
        height: 220px !important;
        border-radius: 12px !important;
    }
    
    h1 {
        font-size: 2.2rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    .episode-content {
        padding: 1.5rem 1rem !important; /* Compact mobile padding */
        font-size: 1.05rem !important; /* Clean reading text */
        line-height: 1.7 !important; /* Good mobile spacing */
        border-radius: 8px !important; /* Smaller radius */
        max-width: 100% !important; /* Full width */
        width: 99% !important; /* Almost full width */
        margin: 0.5rem auto !important;
        border: 1px solid var(--accent-gold) !important; /* Thin border */
        box-shadow: 0 1px 5px rgba(0,0,0,0.1) !important; /* Minimal shadow */
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        text-align: right !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    /* Small Mobile - Force Faruma for ALL episode page elements */
    .episode-content *, 
    .episode-content div, 
    .episode-content p, 
    .episode-content span {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        text-align: right !important;
    }
    
    .episode-detail * {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    }
    
    /* Small Mobile Episode Title - Compact Size with RTL */
    .episode-detail h1.faruma {
        font-size: 2em !important; /* Even smaller for small screens */
        line-height: 1.2 !important;
        text-align: center !important;
        direction: rtl !important;
        margin: 0.8rem auto !important;
        max-width: 98% !important;
        padding: 0 0.5rem !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    }
    
    /* Small Mobile Story Title - Compact Size with RTL */
    .story-detail h1.faruma {
        font-size: 0.9em !important; /* Extra small for small mobile screens */
        line-height: 1.2 !important;
        text-align: center !important;
        direction: rtl !important;
        margin: 0.8rem auto !important;
        max-width: 98% !important;
        padding: 0 0.5rem !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        white-space: nowrap !important; /* Keep on one line */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .episode-content p {
        font-size: 1.05rem !important; /* Smaller, consistent with container */
        line-height: 1.7 !important; /* Tighter reading spacing */
        margin-bottom: 1rem !important;
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
        direction: rtl !important;
        text-align: right !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    .episode-content p:first-letter {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
        float: none !important;
        line-height: inherit !important;
        margin: 0 !important;
        padding: 0 !important;
        text-shadow: none !important;
        display: inline !important;
        font-family: inherit !important;
    }
    
    .btn {
        padding: 0.9rem 1.3rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
    }
    
    footer {
        padding: 2.5rem 1rem 1.8rem !important;
    }
    
    footer h3 {
        font-size: 1.8rem !important;
    }
    
    footer a {
        padding: 1rem !important;
        max-width: 280px !important;
        border-radius: 12px !important;
    }
    
    /* Keep decorative elements but make them smaller */
    div[style*="position: fixed"][style*="animation"] {
        display: block !important;
        transform: scale(0.8) !important;
    }
    
    /* Optimize episode list for small screens */
    .episode-list li {
        font-size: 1rem !important;
        padding: 0.7rem !important;
    }
    
    .episode-list a {
        font-size: 1rem !important;
    }
    
    .episode-list .date {
        font-size: 0.9rem !important;
    }
    
    /* Force Faruma font for all Dhivehi content on small mobile */
    .faruma, [lang="dv"], .episode-content, .episode-content p, .episode-content span, .episode-content div {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
        direction: rtl !important;
        text-align: right !important;
        -webkit-font-feature-settings: "liga" 1, "kern" 1 !important;
        font-feature-settings: "liga" 1, "kern" 1 !important;
    }
    
    /* Ensure mobile viewport never scales content down */
    html {
        -webkit-text-size-adjust: 100% !important;
        -ms-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    /* Touch-friendly interactions */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better scroll behavior on mobile */
    body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        min-width: 360px !important;
    }
    
    /* Force Faruma font for all Dhivehi content on mobile */
    .faruma, [lang="dv"], .episode-content, .episode-content p, .episode-content span, .episode-content div {
        font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, sans-serif !important;
        direction: rtl !important;
        text-align: right !important;
        -webkit-font-feature-settings: "liga" 1, "kern" 1 !important;
        font-feature-settings: "liga" 1, "kern" 1 !important;
    }
    
    /* Mobile-specific story info styling to match desktop */
    .story-info h2 {
        font-size: 1.8rem !important;
        text-align: center !important;
        margin: 1rem 0 !important;
    }
    
    .story-info p {
        text-align: center !important;
        font-style: italic !important;
        opacity: 0.9 !important;
    }
    
    /* Ensure buttons maintain desktop styling on mobile */
    .story-card .btn, .episode-detail .btn {
        margin-top: 1.5rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.025em !important;
    }
    
    /* Mobile main title styling */
    .main-title {
        font-size: 2.5rem !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        font-weight: 700 !important;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
        padding: 2.5em 2em;
    }
    
    .story-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2em;
    }
    
    .site-title {
        font-size: 2.2em !important;
    }
    
    nav a {
        padding: 0.6em 1.5em;
        font-size: 1.05em;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    :root {
        --cream: #ffffff;
        --parchment: #ffffff;
        --dark-text: #1a1a1a;
    }
    
    body {
        background: #ffffff;
    }
    
    .container {
        background: #ffffff !important;
        color: #1a1a1a !important;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --primary-brown: #000000;
        --secondary-brown: #333333;
        --accent-gold: #FFFF00;
        --dark-text: #000000;
        --light-text: #FFFFFF;
    }
    
    .story-card, .container {
        border: 3px solid #000000 !important;
    }
    
    button, .btn {
        border: 2px solid #000000 !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .episode-content::after,
    div[style*="animation:"] {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    body::before,
    body::after,
    header,
    footer,
    nav,
    .btn,
    div[style*="position: fixed"] {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .episode-content {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 11pt;
        line-height: 1.6;
    }
    
    h1, h2, h3 {
        color: black !important;
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    .story-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 1em;
        padding: 1em;
    }
}
/* Storybook Reading Experience - Enhanced for All Devices */
.episode-content {
    background: #ffffff !important;
    border-radius: 15px;
    padding: 3em;
    margin: 2em auto;
    max-width: 1000px; /* Wider for more text */
    width: 90%; /* Responsive width */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid var(--accent-gold) !important;
    position: relative;
    line-height: 1.8;
    font-size: 1.2em;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    color: var(--text-primary);
    word-spacing: 0.1em;
    text-rendering: optimizeLegibility;
    direction: rtl !important;
    text-align: right !important;
}

/* Force Faruma font for ALL elements in episode content */
.episode-content *, 
.episode-content div, 
.episode-content p, 
.episode-content span, 
.episode-content strong, 
.episode-content em, 
.episode-content h1, 
.episode-content h2, 
.episode-content h3, 
.episode-content h4, 
.episode-content h5, 
.episode-content h6 {
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Episode detail page specific styling */
.episode-detail * {
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

.episode-detail .faruma {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

/* Story Detail Page Styling */
.story-detail * {
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

.story-detail .faruma {
    direction: rtl !important;
    text-align: center !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

/* Story Title Styling - Centered and RTL for Dhivehi */
.story-detail h1.faruma {
    text-align: center !important;
    direction: rtl !important;
    font-size: 2.2em !important;
    line-height: 1.2 !important;
    margin: 1rem auto !important;
    max-width: 90% !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

/* Story List Title Styling - Centered and RTL for Dhivehi */
.enhanced-story-card h2.faruma {
    text-align: center !important;
    direction: rtl !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

/* Story List Description - RTL for Dhivehi */
.enhanced-story-card p.faruma {
    text-align: center !important;
    direction: rtl !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

/* Universal Small Metadata Buttons - Consistent Across All Pages */
.metadata-badge, .metadata-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 15px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    margin: 0.2rem !important;
    border: 2px solid transparent !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Metadata Badge Types */
.metadata-badge.category {
    background: linear-gradient(135deg, rgba(194, 135, 163, 0.9), rgba(180, 49, 106, 0.9)) !important;
    color: white !important;
    border-color: rgba(194, 135, 163, 0.3) !important;
}

.metadata-badge.genre {
    background: linear-gradient(135deg, rgba(232, 209, 220, 0.9), rgba(194, 135, 163, 0.9)) !important;
    color: white !important;
    border-color: rgba(194, 135, 163, 0.3) !important;
}

.metadata-badge.author {
    background: linear-gradient(135deg, rgba(244, 228, 193, 0.9), rgba(248, 232, 192, 0.9)) !important;
    color: #1a1a1a !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

.metadata-badge.date {
    background: linear-gradient(135deg, rgba(248, 232, 192, 0.9), rgba(244, 228, 193, 0.9)) !important;
    color: #1a1a1a !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

.metadata-badge.episodes {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 248, 248, 0.9)) !important;
    color: #333 !important;
    border-color: rgba(224, 224, 224, 0.5) !important;
}

/* Hover Effects for Metadata Badges */
.metadata-badge:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Icon Styling in Badges */
.metadata-badge span:first-child {
    font-size: 0.9rem !important;
}

/* Mobile Metadata Badges - Linear Layout Like Desktop */
@media (max-width: 768px) {
    .metadata-badge, .metadata-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
        margin: 0.15rem !important;
        border-radius: 12px !important;
        gap: 0.25rem !important;
    }
    
    .metadata-badge span:first-child {
        font-size: 0.8rem !important;
    }
    
    /* Force horizontal layout on mobile */
    .metadata-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.3rem !important;
        margin: 1rem 0 !important;
    }
}

@media (max-width: 480px) {
    .metadata-badge, .metadata-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
        margin: 0.1rem !important;
        border-radius: 10px !important;
    }
    
    .metadata-badge span:first-child {
        font-size: 0.75rem !important;
    }
}

/* Episode Title Styling - Centered and RTL for Dhivehi */
.episode-detail h1.faruma {
    text-align: center !important;
    direction: rtl !important;
    font-size: 3em !important;
    line-height: 1.2 !important;
    margin: 1rem auto !important;
    max-width: 90% !important;
    font-family: 'Faruma', 'Noto Sans Dhivehi', Arial, serif !important;
}

.episode-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            transparent,
            transparent 1.8em,
            rgba(232, 209, 220, 0.08) 1.8em,
            rgba(232, 209, 220, 0.08) calc(1.8em + 1px)
        );
    pointer-events: none;
}

.episode-content::after {
    content: '🪶';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2em;
    opacity: 0.4;
}

.episode-content p {
    margin-bottom: 1.5em;
    text-align: justify;
    text-indent: 2em;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.episode-content p:first-letter {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    float: none;
    line-height: inherit;
    margin: 0;
    padding: 0;
    text-shadow: none;
    display: inline;
}

/* Advanced Animations */
@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.8; transform: scale(1.2) rotate(180deg); }
}

@keyframes slideInDown {
    0% { transform: translateY(-100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes bookPattern {
    0% { background-position-x: 0%; }
    100% { background-position-x: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes logoGlow {
    0% { box-shadow: none; }
    100% { box-shadow: none; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes titleShimmer {
    0% { 
        background-position: 0% 50%; 
        filter: brightness(1);
    }
    25% {
        background-position: 25% 50%;
        filter: brightness(1.1);
    }
    50% { 
        background-position: 100% 50%; 
        filter: brightness(1.2);
    }
    75% {
        background-position: 75% 50%;
        filter: brightness(1.1);
    }
    100% { 
        background-position: 0% 50%; 
        filter: brightness(1);
    }
}


@keyframes storyCardEntrance {
    0% { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9) rotateY(-10deg); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotateY(0deg); 
    }
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes underlineGrow {
    0%, 100% { width: 50px; opacity: 1; }
    50% { width: 80px; opacity: 0.7; }
}

@keyframes containerSlideIn {
    0% { 
        opacity: 0; 
        transform: translateY(100px) scale(0.95); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes floatingBooks {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(-3px) rotate(-1deg); }
}


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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px) rotateX(10deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

/* New Navigation Bar Animations */
@keyframes navBarLine {
    0%, 100% { 
        background-position: 0% 0%;
        opacity: 0.8;
    }
    50% { 
        background-position: 100% 0%;
        opacity: 1;
    }
}

@keyframes sweepLine {
    0% { 
        left: -100%; 
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        left: 100%; 
        opacity: 0;
    }
}

@keyframes sweepLineReverse {
    0% { 
        right: -100%; 
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        right: 100%; 
        opacity: 0;
    }
}

@keyframes navPulse1 {
    0%, 100% { 
        border-color: var(--accent-gold);
        box-shadow: 0 0 0 0 rgba(248, 232, 240, 0.4);
    }
    50% { 
        border-color: var(--accent-amber);
        box-shadow: 0 0 0 4px rgba(248, 232, 240, 0.1);
    }
}

@keyframes navPulse2 {
    0%, 100% { 
        border-color: var(--accent-amber);
        box-shadow: 0 0 0 0 rgba(232, 209, 220, 0.4);
    }
    50% { 
        border-color: var(--accent-sage);
        box-shadow: 0 0 0 4px rgba(232, 209, 220, 0.1);
    }
}

@keyframes sparkleRotate {
    0% { 
        transform: translateX(-50%) rotate(0deg) scale(1);
    }
    50% { 
        transform: translateX(-50%) rotate(180deg) scale(1.2);
    }
    100% { 
        transform: translateX(-50%) rotate(360deg) scale(1);
    }
}

/* Category and Genre Animations */
@keyframes categoryPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(194, 135, 163, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(194, 135, 163, 0.5);
    }
}

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

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

/* Category Filter Buttons */
.category-filter-btn {
    position: relative;
    overflow: hidden;
    animation: categoryPulse 4s ease-in-out infinite;
}

.category-filter-btn:hover {
    animation: categoryBounce 0.6s ease-in-out infinite;
}

.category-filter-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.4) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

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