/* Root Variables for Theme Management */
:root {
    --primary-bg: #000000;
    --secondary-bg: #121212;
    --accent-bg: #1F1F1F;
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --text-muted: #B3B3B3;
    --border-color: #333333;
    --glass-bg: rgba(18, 18, 18, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.8);
    --accent-color: #64B5F6;
    --accent-hover: #42A5F5;
    --particle-color: rgba(100, 181, 246, 0.2);
}

/* Sepia theme - warm, paper-like colors */
[data-theme="sepia"] {
    --primary-bg: #F4F1E8;
    --secondary-bg: #EAE5D6;
    --accent-bg: #E0D9C7;
    --text-primary: #3C3530;
    --text-secondary: #5D5649;
    --text-muted: #8B7355;
    --border-color: #D4C4A8;
    --glass-bg: rgba(244, 241, 232, 0.85);
    --glass-border: rgba(60, 53, 48, 0.15);
    --shadow-color: rgba(60, 53, 48, 0.12);
    --accent-color: #8B4513;
    --accent-hover: #A0522D;
    --particle-color: rgba(139, 69, 19, 0.1);
}

[data-theme="dark"] {
    --primary-bg: #000000;
    --secondary-bg: #121212;
    --accent-bg: #1F1F1F;
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --text-muted: #B3B3B3;
    --border-color: #333333;
    --glass-bg: rgba(18, 18, 18, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.8);
    --accent-color: #64B5F6;
    --accent-hover: #42A5F5;
    --particle-color: rgba(100, 181, 246, 0.2);
}

[data-theme="dark-sepia"] {
    --primary-bg: #1C1B17;
    --secondary-bg: #252419;
    --accent-bg: #2D2C26;
    --text-primary: #F5F1E8;
    --text-secondary: #E8E2D5;
    --text-muted: #C9C1B4;
    --border-color: #3A3831;
    --glass-bg: rgba(28, 27, 23, 0.8);
    --glass-border: rgba(245, 241, 232, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.6);
    --accent-color: #D4A574;
    --accent-hover: #C19456;
    --particle-color: rgba(212, 165, 116, 0.15);
}

[data-theme="light"] {
    --primary-bg: #FFFFFF;
    --secondary-bg: #F8F9FA;
    --accent-bg: #F1F3F4;
    --text-primary: #202124;
    --text-secondary: #5F6368;
    --text-muted: #80868B;
    --border-color: #DADCE0;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(32, 33, 36, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.06);
    --accent-color: #1A73E8;
    --accent-hover: #1557B0;
    --particle-color: rgba(26, 115, 232, 0.1);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particles-container {
        display: none;
    }
}

/* Custom Bangla Font */
@font-face {
    font-family: 'BanglaFont';
    src: url('assets/Bangla_font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Custom English Font */
@font-face {
    font-family: 'EnglishFont';
    src: url('assets/English_font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

/* Navigation Progress Container */
.nav-progress-container {
    display: none; /* Hidden by default on landing page */
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
    cursor: default;
}

.nav-progress-container:hover {
    background: var(--accent-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.nav-progress-bar {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.nav-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #00d4ff);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.nav-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.nav-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 30px;
    text-align: center;
    transition: color 0.3s ease;
}

.nav-progress-container:hover .nav-progress-text {
    color: var(--accent-color);
}

/* Reading Controls Dropdown */
.reading-controls-dropdown {
    position: relative;
    display: none; /* Hidden by default on landing page */
}

.reading-controls-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .reading-controls-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
}

.reading-controls-btn:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
    transform: scale(1.05);
}

.reading-controls-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--primary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-color) 0 8px 32px;
    z-index: 1002;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.reading-controls-dropdown.active .reading-controls-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-size-display {
    color: var(--text-primary);
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.control-btn {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.mode-btn {
    width: 100%;
    justify-content: center;
}

.mode-btn.active {
    background: var(--accent-color);
    color: white;
}

.quick-actions {
    display: flex;
    gap: 8px;
}

.quick-actions .control-btn {
    flex: 1;
    justify-content: center;
}

/* Focus Mode Styles */
body.focus-mode .nav-container,
body.focus-mode .footer,
body.focus-mode .particles-container {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Keep pagination controls visible in focus mode */
body.focus-mode .pagination-container {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10002;
}

body.focus-mode .story-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 30px;
    box-shadow: 0 0 40px var(--shadow-color);
    border: 2px solid var(--accent-color);
}

/* Focus Mode Exit Button */
.focus-exit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
    height: 48px;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.focus-exit-btn:hover {
    background: #ff4757;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 71, 87, 0.4);
}

.focus-exit-btn i {
    font-size: 16px;
}

.focus-exit-btn .progress-text {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

/* Search functionality */
.search-container {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.search-input {
    flex: 1;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--secondary-bg);
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Search highlight styling */
.search-highlight {
    background: linear-gradient(45deg, #ff0000, #ff6b6b) !important;
    color: #ffffff !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
    font-weight: 900 !important;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.5) !important;
    display: inline !important;
    text-decoration: none !important;
    border: 2px solid #ffffff !important;
    position: relative !important;
    z-index: 999 !important;
}

/* Selection System */
.selection-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.selection-btn:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-color) 0 4px 16px;
}

.selection-btn i {
    font-size: 16px;
}

.selector-text {
    font-weight: 500;
}

/* Selection Modal */
.selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.selection-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--primary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-color) 0 20px 40px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.selection-modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

.selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Simple List View Override for Music Modal */
#musicModal .selection-cards {
    display: block !important;
    grid-template-columns: none !important;
}

#musicModal .song-playlist {
    width: 100%;
}

#musicModal .song-list {
    display: block !important;
}

/* Beautiful Song Playlist Layout */
#musicModal .playlist-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

#musicModal .playlist-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#musicModal .playlist-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.selection-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Clean List Item Style for Music */
#musicModal .song-item,
#musicModal .music-card {
    display: block !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

/* Inner content layout */
#musicModal .song-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    gap: 15px !important;
}

/* Beautiful Song Item Styling */
#musicModal .song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#musicModal .song-item:hover {
    background: var(--accent-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

#musicModal .song-item:hover .song-play-btn {
    opacity: 1;
    transform: scale(1);
}

#musicModal .song-item:hover .song-like {
    opacity: 0.7;
}

.selection-card:hover {
    background: var(--accent-bg);
    transform: translateY(-5px);
    box-shadow: var(--shadow-color) 0 8px 25px;
}

/* Simple hover effects */
#musicModal .song-item:hover,
#musicModal .music-card:hover {
    background: var(--accent-bg) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--accent-color) !important;
}

.selection-card:hover .card-title {
    color: var(--accent-color);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

/* Song Play Button */
#musicModal .song-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    position: absolute;
    left: 16px;
    z-index: 2;
}

#musicModal .song-play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Song Cover */
#musicModal .song-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-bg);
    position: relative;
}

#musicModal .song-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 20px;
    background: linear-gradient(135deg, var(--accent-bg), var(--glass-bg));
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

/* Song Details */
#musicModal .song-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#musicModal .song-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

#musicModal .song-item:hover .song-title {
    color: var(--accent-color);
}

#musicModal .song-artist {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Song Duration */
#musicModal .song-duration {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

/* Song Options */
#musicModal .song-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

#musicModal .song-like {
    font-size: 16px;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px;
}

#musicModal .song-like:hover {
    color: var(--accent-color);
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Playing State */
#musicModal .song-item.playing {
    background: rgba(var(--accent-color), 0.1);
    border-color: var(--accent-color);
}

#musicModal .song-item.playing .song-title {
    color: var(--accent-color);
}

#musicModal .song-item.playing .song-play-btn {
    opacity: 1;
    background: var(--accent-color);
}

#musicModal .song-item.playing .song-play-btn i::before {
    content: "\f04c";
}

/* Responsive adjustments for song list */
@media (max-width: 480px) {
    #musicModal .song-item {
        padding: 10px 12px;
        gap: 12px;
    }

    #musicModal .song-cover {
        width: 40px;
        height: 40px;
    }

    #musicModal .song-play-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        left: 12px;
    }

    #musicModal .song-title {
        font-size: 14px;
    }

    #musicModal .song-artist {
        font-size: 12px;
    }

    #musicModal .song-duration {
        font-size: 12px;
        min-width: 35px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reading-controls-menu {
        right: -10px;
        width: 280px;
        padding: 15px;
    }

    .selection-cards {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .selection-btn {
        min-width: 32px;
        padding: 5px 8px;
        font-size: 11px;
        gap: 4px;
        border-radius: 15px;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .selection-btn .selector-text {
        display: none;
    }

    .selection-btn i {
        font-size: 12px;
    }

    .font-size-controls {
        gap: 8px;
    }

    .control-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .search-input {
        font-size: 11px;
        padding: 6px 8px;
    }

    .search-toggle {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 12px;
    }

    .library-actions {
        gap: 0.5rem;
    }
}

body {
    font-family: 'EnglishFont', 'BanglaFont', 'Noto Sans Bengali', Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: all 0.3s ease;
    padding-top: 90px;
    padding-bottom: 35px;
    position: relative;
    overflow-x: hidden;
}

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

.particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 10px var(--particle-color);
}

.particle:nth-child(1) {
    width: 8px;
    height: 8px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    width: 12px;
    height: 12px;
    left: 20%;
    animation-delay: 1s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    width: 6px;
    height: 6px;
    left: 30%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    width: 10px;
    height: 10px;
    left: 40%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    width: 14px;
    height: 14px;
    left: 50%;
    animation-delay: 4s;
    animation-duration: 11s;
}

.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    left: 60%;
    animation-delay: 5s;
    animation-duration: 8s;
}

.particle:nth-child(7) {
    width: 9px;
    height: 9px;
    left: 70%;
    animation-delay: 6s;
    animation-duration: 10s;
}

.particle:nth-child(8) {
    width: 11px;
    height: 11px;
    left: 80%;
    animation-delay: 7s;
    animation-duration: 9s;
}

.particle:nth-child(9) {
    width: 5px;
    height: 5px;
    left: 90%;
    animation-delay: 8s;
    animation-duration: 7s;
}

.particle:nth-child(10) {
    width: 13px;
    height: 13px;
    left: 95%;
    animation-delay: 9s;
    animation-duration: 12s;
}

.particle:nth-child(11) {
    width: 9px;
    height: 9px;
    left: 5%;
    animation-delay: 10s;
    animation-duration: 8s;
}

.particle:nth-child(12) {
    width: 11px;
    height: 11px;
    left: 15%;
    animation-delay: 11s;
    animation-duration: 10s;
}

.particle:nth-child(13) {
    width: 7px;
    height: 7px;
    left: 25%;
    animation-delay: 12s;
    animation-duration: 9s;
}

.particle:nth-child(14) {
    width: 10px;
    height: 10px;
    left: 35%;
    animation-delay: 13s;
    animation-duration: 11s;
}

.particle:nth-child(15) {
    width: 12px;
    height: 12px;
    left: 45%;
    animation-delay: 14s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) rotate(180deg);
        opacity: 0.8;
    }
}

/* Apple Dynamic Island Style Navigation */
.nav-container {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-island {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: all 0.3s ease;
    min-height: 65px;
}

.nav-island:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-family: 'EnglishFont', Arial, sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    transition: all 0.3s ease;
}

.logo-text.music-playing {
    font-size: 11px;
    max-width: 120px;
    font-weight: 500;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex: 0 0 auto;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

/* Dropdown Styles */
.dropdown select,
.story-dropdown,
.music-dropdown {
    background: var(--accent-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-dropdown {
    min-width: 120px;
}

.music-dropdown {
    min-width: 140px;
}

.dropdown select:hover,
.story-dropdown:hover,
.music-dropdown:hover {
    background: var(--glass-bg);
    transform: translateY(-1px);
}

/* Navigation Control Buttons (circular) */
.nav-island .control-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-island .control-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.nav-island .control-btn .icon {
    font-size: 16px;
}


/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 150px);
}

.story-container {
    background: var(--primary-bg);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
    max-height: none;
    overflow-y: visible;
    position: relative;
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.story-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.story-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-color), var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* English text styling */
.english-text, .welcome-text, .story-subtitle {
    font-family: 'EnglishFont', Arial, sans-serif;
}

/* Bangla text styling */
.bangla-text, .story-content p {
    font-family: 'BanglaFont', 'Noto Sans Bengali', Arial, sans-serif;
}

.writer-name {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 5px;
    font-style: italic;
}

.story-content {
    font-family: 'BanglaFont', 'Noto Sans Bengali', sans-serif;
    font-size: 20px;
    line-height: 1.9;
    color: var(--text-primary);
    padding: 0 2rem;
    letter-spacing: 0;
    word-spacing: 0;
    text-align: left;
    max-width: 100%;
    margin: 0;
}

.story-content p {
    margin-bottom: 24px;
    text-align: left;
    word-spacing: 0;
}

.welcome-text {
    text-align: center;
    padding: 40px 20px;
}

.welcome-text p {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-muted);
}


/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 15px 0;
    z-index: 1000;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-left p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    font-size: 18px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-link i {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px) scale(1.1);
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        width: 95%;
        top: 5px;
    }

    .nav-island {
        padding: 8px 15px;
        flex-direction: row;
        gap: 10px;
        text-align: left;
        border-radius: 30px;
        background: var(--glass-bg);
        backdrop-filter: blur(25px);
        box-shadow: 0 10px 40px var(--shadow-color);
        border: 2px solid var(--glass-border);
    }

    .nav-left {
        justify-content: flex-start;
        flex: 1;
        min-width: 0;
    }

    .nav-right {
        justify-content: flex-end;
        flex: 1;
        min-width: 0;
    }

    .nav-center {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
        flex: 2;
        padding: 0 5px;
    }

    .logo {
        width: 32px;
        height: 32px;
        border: 2px solid var(--accent-color);
        box-shadow: 0 0 15px rgba(100, 181, 246, 0.3);
    }

    .logo-text {
        max-width: 100px;
        font-size: 11px;
        font-weight: 600;
        text-shadow: 0 1px 3px var(--shadow-color);
    }

    .selection-btn {
        min-width: 28px;
        padding: 6px 10px;
        font-size: 10px;
        gap: 4px;
        border-radius: 15px;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .selection-btn .selector-text {
        display: none;
    }

    .selection-btn i {
        font-size: 14px;
    }

    .nav-island .control-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
        border-radius: 18px;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        box-shadow: 0 2px 8px var(--shadow-color);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-island .control-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
        background: var(--accent-color);
        border-color: var(--accent-color);
    }

    .nav-island .control-btn .icon {
        font-size: 14px;
    }

    .nav-progress-container {
        padding: 6px 10px;
        gap: 8px;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        border-radius: 25px;
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .nav-progress-bar {
        width: 50px;
        height: 6px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
        overflow: hidden;
    }

    .nav-progress-fill {
        background: linear-gradient(90deg, var(--accent-color), #00d4ff);
        box-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
    }

    .nav-progress-text {
        font-size: 11px;
        min-width: 30px;
        font-weight: 600;
        color: var(--accent-color);
        text-shadow: 0 1px 2px var(--shadow-color);
    }

    .main-content {
        padding: 15px;
    }

    .story-container {
        padding: 20px;
    }

    .story-header h1 {
        font-size: 24px;
    }

    .story-content {
        font-size: 18px;
        line-height: 1.8;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .social-links {
        gap: 20px;
    }

    /* Enhanced mobile navigation animations */
    .nav-island:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 50px var(--shadow-color);
        border-color: var(--accent-color);
    }

    .nav-island .control-btn:active {
        transform: translateY(0) scale(0.95);
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .nav-progress-container:hover {
        background: var(--accent-bg);
        border-color: var(--accent-color);
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
    }

    .nav-progress-container:hover .nav-progress-text {
        color: white;
    }

    .selection-btn:hover {
        background: var(--accent-color);
        color: white;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
        border-color: var(--accent-color);
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    padding: 0.4rem 0.6rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    position: sticky;
    bottom: 20px;
    z-index: 100;
    min-height: 45px;
}

.page-nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 80px;
    justify-content: center;
    font-size: 13px;
    height: 32px;
}

.page-nav-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.page-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
}

.page-current {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    line-height: 1;
}

.page-total {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.page-dots {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.page-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.page-dot.active {
    background: var(--accent-color);
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .pagination-container {
        padding: 0.3rem 0.5rem;
        min-height: 40px;
    }

    .page-nav-btn {
        padding: 3px 8px;
        min-width: 60px;
        font-size: 11px;
        height: 28px;
    }

    .page-nav-btn span {
        display: none;
    }

    .page-current {
        font-size: 13px;
    }

    .page-total {
        font-size: 9px;
    }
}

/* Story Suggestions Section */
.story-suggestions, .story-end-suggestions {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.story-end-suggestions {
    margin-top: 3rem;
    border-top: 2px solid var(--accent-color);
    position: relative;
}

.story-end-suggestions::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

.suggestions-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 2px 4px var(--shadow-color);
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.suggestion-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-color);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1), 
        rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.suggestion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--accent-color);
}

.suggestion-card:hover::before {
    opacity: 1;
}

.suggestion-card.upcoming {
    opacity: 0.8;
    border-style: dashed;
}

.suggestion-card.upcoming:hover {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--accent-color);
    border-style: solid;
}

/* Fix upcoming story cards in main grid */
.story-card[data-story*="upcoming"] {
    opacity: 0.9;
    border-style: dashed;
    border-width: 2px;
}

.story-card[data-story*="upcoming"]:hover {
    opacity: 1;
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-color);
    border-color: var(--accent-color);
    border-style: solid;
}

.story-card[data-story*="upcoming"] .story-cover:hover {
    transform: scale(1.05);
}

.suggestion-cover {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.suggestion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.2rem;
}

.suggestion-card:hover .suggestion-overlay {
    opacity: 1;
}

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

.suggestion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.suggestion-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    margin-top: auto;
}

.author {
    color: var(--text-muted);
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

.status.available {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.upcoming {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

@media (max-width: 768px) {
    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 100%;
    }

    .suggestion-card {
        padding: 0.8rem;
        min-height: 180px;
        border-radius: 14px;
    }

    .suggestion-cover {
        height: 70px;
    }

    .suggestion-title {
        font-size: 0.9rem;
    }

    .suggestion-description {
        font-size: 0.75rem;
    }

    .suggestion-meta {
        font-size: 0.65rem;
    }

    .suggestions-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .suggestion-card {
        padding: 0.6rem;
        min-height: 160px;
        border-radius: 12px;
    }

    .suggestion-cover {
        height: 60px;
    }

    .suggestion-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }

    .suggestion-description {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }
}

/* Hero Section */
.hero-section {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--glass-bg), transparent);
    border-radius: 20px;
    margin: 2rem 0;
    border: 1px solid var(--glass-border);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px var(--shadow-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: 'BanglaFont', 'Noto Sans Bengali', sans-serif;
}

.hero-description p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.continue-reading {
    margin-top: 2rem;
}

.continue-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.continue-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Story Library */
.story-library {
    margin: 2rem 0;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.library-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.library-actions {
    display: flex;
    gap: 1rem;
}

.search-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 18px;
    height: 18px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 10px;
}

.search-toggle:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

.search-btn {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-color), 0.3);
}

.search-section {
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.global-search {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.global-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color), 0.1);
}

.global-search::placeholder {
    color: var(--text-muted);
}

/* Story Grid */
.story-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.story-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(100, 181, 246, 0.05), 
        rgba(139, 69, 19, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.story-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px var(--shadow-color);
    border-color: var(--accent-color);
    border-width: 2px;
}

.story-card:hover::before {
    opacity: 1;
}

.story-cover {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.story-cover-wide {
    height: 140px; /* More compact banner style */
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.3), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover .story-overlay {
    opacity: 1;
}

.play-button {
    background: var(--accent-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

.coming-soon-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.story-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.story-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: 'BanglaFont', 'Noto Sans Bengali', sans-serif;
    line-height: 1.3;
}

.story-description {
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex: 1;
    font-size: 0.9rem;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.author {
    color: var(--text-muted);
    font-weight: 500;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reading-time {
    color: var(--text-muted);
}

/* Search Feedback */
.search-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

.search-feedback p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Reader View */
.reader-view {
    max-width: 100%;
    margin: 0;
    padding: 2rem 1rem;
}

.reader-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 500;
}

.nav-left {
    cursor: pointer;
}

.back-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

.reading-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 300px;
    margin-left: 2rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
    width: var(--progress, 0%);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
}

.story-reader {
    background: var(--primary-bg);
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.story-reader .story-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
    justify-content: flex-start;
}

.story-cover-small {
    width: 120px;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 2px solid var(--glass-border);
    order: 1;
}

.story-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-title-section {
    flex: 1;
    order: 2;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.8rem;
}

.story-title-large {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    font-family: 'BanglaFont', 'Noto Sans Bengali', sans-serif;
    line-height: 1.1;
    text-shadow: 0 2px 4px var(--shadow-color);
}

.story-author {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.author-info {
    font-weight: 600;
    color: var(--accent-color);
}

.location-info {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.story-details {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 1rem;
}

.divider {
    color: var(--border-color);
}

.story-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.story-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn {
    justify-content: flex-start;
}

.next-btn {
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.5rem;
        max-width: 100%;
    }

    .story-card {
        height: 280px;
        border-radius: 16px;
    }

    .story-cover {
        height: 120px;
    }

    .story-cover-wide {
        height: 110px;
    }

    .story-info {
        padding: 0.8rem;
    }

    .story-title {
        font-size: 1rem;
        line-height: 1.2;
    }

    .story-description {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.6rem;
    }

    .story-meta {
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reader-view {
        padding: 0.8rem;
    }

    .story-reader {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .story-reader .story-header {
        flex-direction: row;
        text-align: left;
        gap: 1.2rem;
        margin-bottom: 1.5rem;
        align-items: flex-start;
    }

    .story-cover-small {
        width: 90px;
        height: 115px;
        order: 1;
    }

    .story-title-section {
        order: 2;
        padding-left: 0.5rem;
    }

    .story-title-large {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .story-author {
        font-size: 1rem;
    }

    .location-info {
        font-size: 0.85rem;
    }

    .story-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        font-size: 0.85rem;
        padding: 0.8rem 0;
        margin-top: 0.8rem;
    }

    .story-navigation {
        flex-direction: column;
    }

    .reading-progress {
        margin-left: 0;
        max-width: none;
    }

    .reader-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 90px;
    }

    .nav-container {
        width: 98%;
        top: 8px;
    }

    .nav-island {
        border-radius: 25px;
        padding: 6px 12px;
        gap: 6px;
        background: var(--glass-bg);
        backdrop-filter: blur(30px);
        box-shadow: 0 8px 35px var(--shadow-color);
        border: 1.5px solid var(--glass-border);
    }

    .nav-left {
        flex: 0.8;
    }

    .nav-center {
        flex: 1.4;
        gap: 6px;
        padding: 0 2px;
    }

    .nav-right {
        flex: 0.8;
    }

    .logo {
        width: 28px;
        height: 28px;
        border-width: 1px;
    }

    .logo-text {
        max-width: 80px;
        font-size: 10px;
    }

    .selection-btn {
        min-width: 24px;
        padding: 4px 6px;
        border-radius: 12px;
    }

    .selection-btn i {
        font-size: 12px;
    }

    .nav-island .control-btn {
        width: 30px;
        height: 30px;
        border-radius: 15px;
    }

    .nav-island .control-btn .icon {
        font-size: 12px;
    }

    .nav-progress-container {
        padding: 4px 8px;
        gap: 6px;
        border-radius: 20px;
    }

    .nav-progress-bar {
        width: 40px;
        height: 5px;
    }

    .nav-progress-text {
        font-size: 10px;
        min-width: 25px;
    }

    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0.3rem;
    }

    .story-card {
        height: 250px;
        border-radius: 14px;
    }

    .story-cover {
        height: 100px;
    }

    .story-cover-wide {
        height: 90px;
    }

    .story-info {
        padding: 0.6rem;
    }

    .story-title {
        font-size: 0.9rem;
        line-height: 1.1;
        margin-bottom: 0.3rem;
    }

    .story-description {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .story-meta {
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .story-reader {
        padding: 1rem;
    }

    .story-reader .story-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .story-cover-small {
        width: 100px;
        height: 125px;
        margin: 0 auto;
        order: 1;
    }

    .story-title-section {
        order: 2;
        padding-left: 0;
        text-align: center;
    }

    .story-title-large {
        font-size: 1.6rem;
    }

    .story-details {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    /* Ultra-mobile navigation hover effects */
    .nav-island:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px var(--shadow-color);
    }

    .nav-island .control-btn:hover {
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
    }
}

/* ========================================
   STARTUP SCREEN & ANIMATIONS
   ======================================== */

/* Startup Screen */
.startup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(18, 18, 18, 0.98) 50%, 
        rgba(31, 31, 31, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: startupFadeIn 1s ease-out;
}

.startup-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, 
        rgba(100, 181, 246, 0.1) 0%, 
        transparent 50%),
        radial-gradient(circle at 70% 30%, 
        rgba(212, 165, 116, 0.08) 0%, 
        transparent 50%);
    animation: backgroundPulse 4s ease-in-out infinite;
}

.startup-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    animation: contentSlideUp 1.2s ease-out 0.3s both;
}

.startup-logo {
    margin-bottom: 2rem;
    animation: logoFloat 3s ease-in-out infinite;
}

.startup-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(100, 181, 246, 0.3);
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    animation: logoGlow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.startup-title {
    margin-bottom: 3rem;
}

.startup-text {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
    animation: titleGlow 3s ease-in-out infinite;
    letter-spacing: 2px;
}

.startup-subtitle {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.9;
    animation: subtitleFade 2s ease-in-out 0.5s both;
}

.startup-hint {
    animation: hintBounce 2s ease-in-out 1s infinite;
}

.tap-hint {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tap-hint i {
    animation: pointerPulse 1.5s ease-in-out infinite;
    color: var(--accent-color);
}

/* Startup Particles */
.startup-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.startup-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 6s linear infinite;
}

.startup-particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.startup-particle:nth-child(2) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.startup-particle:nth-child(3) {
    left: 60%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.startup-particle:nth-child(4) {
    left: 80%;
    animation-delay: 3s;
    animation-duration: 7s;
}

.startup-particle:nth-child(5) {
    left: 10%;
    animation-delay: 4s;
    animation-duration: 9s;
}

/* Startup Screen Exit Animation */
.startup-screen.fade-out {
    animation: startupFadeOut 0.8s ease-in forwards;
}

/* Enhanced Site Animations */

/* Global Smooth Transitions */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Animations */
.nav-container {
    animation: navSlideDown 0.8s ease-out 0.5s both;
}

.nav-island {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-island:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Button Hover Animations */
.control-btn, .selection-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.control-btn::before, .selection-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.control-btn:hover::before, .selection-btn:hover::before {
    width: 100px;
    height: 100px;
}

.control-btn:hover, .selection-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Story Card Animations */
.story-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

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

.story-cover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section Animations */
.hero-section {
    animation: heroFadeIn 0.8s ease-out 0.3s both;
}

.hero-title {
    animation: titleSlideUp 0.6s ease-out 0.4s both;
}

.hero-subtitle {
    animation: subtitleSlideUp 0.6s ease-out 0.6s both;
}

.hero-description {
    animation: descriptionSlideUp 0.6s ease-out 0.8s both;
}

/* Story Grid Animation - Synchronized Professional Animation */
.story-grid {
    animation: gridFadeIn 0.8s ease-out 1.2s both;
}

.story-card {
    animation: cardSlideUp 0.6s ease-out 1.4s both;
    opacity: 0;
    transform: translateY(30px);
}

/* Remove staggered delays - all cards appear together */
.story-card:nth-child(1),
.story-card:nth-child(2), 
.story-card:nth-child(3),
.story-card:nth-child(4),
.story-card:nth-child(5),
.story-card:nth-child(6) { 
    animation-delay: 1.4s; 
}

/* Reading Controls Animations */
.reading-controls-menu {
    animation: menuSlideDown 0.3s ease-out;
    transform-origin: top center;
}

/* Modal Animations */
.selection-modal {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Progress Bar Animations */
.nav-progress-fill, .reader-progress-bar::before {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Mode Transition */
.main-content, .nav-container, .footer {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Enhanced Particle Animations */
.particle {
    animation: enhancedParticleFloat 15s linear infinite;
}

/* Keyframe Animations */
@keyframes startupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes startupFadeOut {
    to { 
        opacity: 0; 
        visibility: hidden;
        transform: scale(1.1);
    }
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

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

@keyframes logoGlow {
    from { 
        box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
        border-color: rgba(100, 181, 246, 0.3);
    }
    to { 
        box-shadow: 0 0 40px rgba(100, 181, 246, 0.6);
        border-color: rgba(100, 181, 246, 0.6);
    }
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 50px rgba(100, 181, 246, 0.6);
        transform: scale(1.02);
    }
}

@keyframes subtitleFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 0.9; transform: translateY(0); }
}

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

@keyframes pointerPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

@keyframes particleFloat {
    0% { 
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { 
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes navSlideDown {
    from { 
        opacity: 0; 
        transform: translateY(-50px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

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

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

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

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

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

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

@keyframes menuSlideDown {
    from { 
        opacity: 0; 
        transform: scaleY(0) translateY(-10px);
    }
    to { 
        opacity: 1; 
        transform: scaleY(1) translateY(0);
    }
}

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

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

@keyframes enhancedParticleFloat {
    0% { 
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Startup Screen */
@media (max-width: 768px) {
    .startup-text {
        font-size: 3rem;
    }

    .startup-subtitle {
        font-size: 1.2rem;
    }

    .startup-logo-img {
        width: 100px;
        height: 100px;
    }

    .startup-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .startup-text {
        font-size: 2.5rem;
    }

    .startup-subtitle {
        font-size: 1rem;
    }

    .startup-logo-img {
        width: 80px;
        height: 80px;
    }

    .tap-hint {
        font-size: 1rem;
    }
}

/* Force proper list view in Music modal - must be at end to override everything */
#musicModal .song-playlist .song-list { 
    display: block !important; 
    grid-template-columns: none !important; 
    gap: 0 !important; 
}

#musicModal .song-list > .song-item { 
    display: flex !important; 
    width: 100% !important; 
    margin: 0 !important; 
    padding: 12px 16px !important; 
    background: transparent !important; 
    border: 0 !important; 
    border-bottom: 1px solid var(--glass-border) !important; 
    border-radius: 0 !important; 
    box-shadow: none !important; 
    align-items: center !important;
    gap: 15px !important;
    cursor: pointer !important;
}

#musicModal .song-list > .song-item:last-child {
    border-bottom: none !important;
}

#musicModal .song-list > .song-item:hover { 
    background: var(--accent-bg) !important; 
    transform: none !important; 
    box-shadow: none !important; 
}

#musicModal .song-list > .song-item.music-card { 
    all: unset; 
    display: flex !important; 
    width: 100% !important; 
    padding: 12px 16px !important; 
    border-bottom: 1px solid var(--glass-border) !important; 
    align-items: center !important;
    gap: 15px !important;
    cursor: pointer !important;
}

#musicModal .song-list > .song-item.music-card:hover { 
    background: var(--accent-bg) !important; 
}

/* Optimize inner layout for clean list */
#musicModal .song-item .song-cover { 
    flex: 0 0 44px; 
    height: 44px; 
    border-radius: 6px;
}

/* Notification System - Complete Styles */
.notification-stack {
    position: fixed;
    bottom: 24px;
    right: 16px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    pointer-events: none;
    transform: translateZ(0);
    isolation: isolate;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.notification-stack::-webkit-scrollbar {
    display: none;
}

.golpo-notification {
    position: relative !important;
    z-index: 999999 !important;
    padding: 6px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    max-width: 125px !important;
    min-width: 90px !important;
    word-wrap: break-word !important;
    animation: toastIn 300ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    pointer-events: auto !important;
    transform: translateZ(0) !important;
    will-change: transform, opacity !important;
    isolation: isolate !important;
    contain: layout paint style !important;
    line-height: 1.2 !important;
    background: rgba(24, 24, 27, 0.95) !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
}

.notification-stack {
    position: fixed;
    bottom: 24px;
    right: 16px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    pointer-events: none;
    transform: translateZ(0);
    isolation: isolate;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.notification-music {
    background: rgba(102, 126, 234, 0.12);
    color: #E0E7FF;
    border-color: rgba(102, 126, 234, 0.35);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.16), 0 0 0 1px rgba(102, 126, 234, 0.06);
}

.notification-success {
    background: rgba(16, 185, 129, 0.12);
    color: #D1FAE5;
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.16), 0 0 0 1px rgba(16, 185, 129, 0.06);
}

.notification-error {
    background: rgba(239, 68, 68, 0.12);
    color: #FEE2E2;
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.16), 0 0 0 1px rgba(239, 68, 68, 0.06);
}

.notification-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #FEF3C7;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.16), 0 0 0 1px rgba(245, 158, 11, 0.06);
}

.notification-info {
    background: rgba(59, 130, 246, 0.12);
    color: #DBEAFE;
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.16), 0 0 0 1px rgba(59, 130, 246, 0.06);
}

/* Notification Animations */
@keyframes toastIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Notification Type Variants */
.notification-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #D1FAE5 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(16, 185, 129, 0.1) !important;
}

.notification-error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #FEE2E2 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2), 0 0 0 1px rgba(239, 68, 68, 0.1) !important;
}

.notification-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #FEF3C7 !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2), 0 0 0 1px rgba(245, 158, 11, 0.1) !important;
}

.notification-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #DBEAFE !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2), 0 0 0 1px rgba(59, 130, 246, 0.1) !important;
}

.notification-music {
    background: rgba(102, 126, 234, 0.15) !important;
    color: #E0E7FF !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2), 0 0 0 1px rgba(102, 126, 234, 0.1) !important;
}

/* Notification content styling */
.notification-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 11px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-subtitle {
    font-size: 9px;
    opacity: 0.8;
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notification Content Elements */
.notification-icon {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.notification-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.notification-message {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.notification-subtitle {
    font-size: 9px !important;
    opacity: 0.8 !important;
    margin-top: 1px !important;
    margin-bottom: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.notification-close {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9px !important;
    flex-shrink: 0 !important;
    opacity: 0.7 !important;
    transition: all 150ms ease !important;
    background: rgba(255, 255, 255, 0.08) !important;
    cursor: pointer !important;
}

.notification-close:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-stack {
        left: 8px !important;
        right: 8px !important;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        gap: 4px !important;
    }

    .golpo-notification {
        max-width: none !important;
        min-width: auto !important;
        border-radius: 6px !important;
        padding: 6px 8px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .notification-message {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    .notification-subtitle {
        font-size: 8px !important;
        line-height: 1.1 !important;
        margin-top: 2px !important;
    }

    .notification-icon {
        width: 14px !important;
        height: 14px !important;
        font-size: 9px !important;
    }

    .notification-close {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .golpo-notification {
        animation: none !important;
    }
    
    @keyframes toastIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes toastOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }
}