/* ==========================================================================
   Open Music - Design System & Styling
   ========================================================================== */

/* Variables */
:root {
    --bg-dark: #07080d;
    --glass-bg: rgba(18, 20, 32, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.04);
    
    /* Dynamic styling variables - Updated by JavaScript based on Cover Art */
    --accent-color: #00e5ff;
    --accent-color-rgb: 0, 229, 255;
    
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-inactive: rgba(255, 255, 255, 0.3);
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --panel-blur: 40px;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: 0.2s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dynamic Ambient Background */
.ambient-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(120px) saturate(1.8);
    opacity: 0.35;
    z-index: -2;
    transition: background-image 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(10, 11, 16, 0.6) 0%, var(--bg-dark) 85%);
    z-index: -1;
}

/* App Layout Container */
.app-container {
    width: 100%;
    max-width: 1100px;
    height: 700px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Main Music Glass Card */
.music-card {
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(var(--panel-blur));
    -webkit-backdrop-filter: blur(var(--panel-blur));
    display: grid;
    grid-template-columns: 460px 1fr;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   Left Side: Player Panel
   ========================================================================== */
.player-panel {
    padding: 35px 40px;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Header & Controls */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 22px;
    height: 22px;
    fill: var(--accent-color);
    filter: drop-shadow(0 0 8px rgba(var(--accent-color-rgb), 0.5));
    transition: fill var(--transition-smooth);
}

/* Buttons Styling */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    color: var(--text-muted);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.icon-btn:hover {
    color: var(--text-main);
    transform: scale(1.08);
}

.icon-btn:active {
    transform: scale(0.95);
}

.toggle-playlist-btn {
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-playlist-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

/* Vinyl Disc Wrapper */
.disc-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tonearm (Stylus) */
.tonearm {
    position: absolute;
    top: -20px;
    right: 50px;
    width: 60px;
    height: 120px;
    z-index: 5;
    transform-origin: 15px 15px;
    transform: rotate(-22deg); /* Default paused state angle */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.tonearm.playing {
    transform: rotate(5deg); /* Rotation angle when music is playing */
}

.tonearm-svg {
    width: 100%;
    height: 100%;
}

/* Vinyl disk */
.vinyl-disc {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: #09090b;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6),
                inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: spin 20s linear infinite;
    animation-play-state: paused;
    transition: box-shadow var(--transition-smooth);
}

.vinyl-disc.playing {
    animation-play-state: running;
    box-shadow: 0 20px 45px rgba(var(--accent-color-rgb), 0.25),
                inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.album-art {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
    border: 3px solid #111;
}

.vinyl-groove {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 3px,
        rgba(255, 255, 255, 0.03) 4px,
        rgba(0, 0, 0, 0) 5px
    );
    pointer-events: none;
}

.vinyl-center {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 4px solid #fff;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Song Meta Information */
.song-meta {
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.song-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.song-artist {
    font-size: 0.95rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Progress Slider Area */
.progress-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
}

.time-stamp {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    width: 38px;
}

#current-time {
    text-align: left;
}

#total-duration {
    text-align: right;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: height var(--transition-fast);
}

.progress-bar-container:hover {
    height: 8px;
}

.progress-bar-container:hover .progress-handle {
    opacity: 1;
    transform: translate(50%, -50%) scale(1.2);
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.5);
    position: relative;
}

.progress-handle {
    position: absolute;
    right: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translate(50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
}

/* Playback Control Area */
.controls-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.control-btn.active {
    color: var(--accent-color);
    filter: drop-shadow(0 0 6px rgba(var(--accent-color-rgb), 0.6));
}

#btn-repeat {
    position: relative;
}

#btn-repeat .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent-color);
    color: var(--bg-dark);
    font-size: 0.65rem;
    font-weight: 700;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 
                0 0 15px rgba(var(--accent-color-rgb), 0.2);
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.play-btn svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.play-btn:hover {
    transform: scale(1.06);
    background: var(--accent-color);
    box-shadow: 0 12px 30px rgba(var(--accent-color-rgb), 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

/* Volume Control Group */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

#btn-mute {
    color: var(--text-muted);
}

.volume-slider-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-slider {
    height: 100%;
    width: 70%; /* default volume */
    background: var(--text-muted);
    border-radius: 2px;
    position: relative;
    transition: background-color var(--transition-fast);
}

.volume-container:hover .volume-slider {
    background: var(--accent-color);
    box-shadow: 0 0 6px rgba(var(--accent-color-rgb), 0.4);
}


/* ==========================================================================
   Right Side: Lyrics Panel
   ========================================================================== */
.lyrics-panel {
    padding: 35px 45px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow: hidden;
}

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

.lyrics-header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.lrc-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lyrics-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    /* Custom transparent top/bottom fade effect for lyrics */
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 1) 15%,
        rgba(0, 0, 0, 1) 85%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 1) 15%,
        rgba(0, 0, 0, 1) 85%,
        transparent 100%
    );
}

/* Hide scrollbar on lyrics container for immersion */
.lyrics-container::-webkit-scrollbar {
    display: none;
}
.lyrics-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lyrics-scroll-wrapper {
    padding: 160px 0; /* Creates scroll offset so first/last items center nicely */
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
}

.lyric-line {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-inactive);
    transition: color 0.4s ease, font-weight 0.4s ease, transform 0.4s ease, text-shadow 0.4s ease;
    cursor: pointer;
    padding: 4px 15px;
    border-radius: 8px;
    max-width: 95%;
}

.lyric-line:hover {
    color: var(--text-muted);
}

.lyric-line.active {
    color: var(--text-main);
    font-weight: 600;
    transform: scale(1.08);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.25),
                 0 0 20px rgba(var(--accent-color-rgb), 0.2);
}

.lyric-line.placeholder {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}


/* ==========================================================================
   Slide-in Drawer: Playlist Panel
   ========================================================================== */
.playlist-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 380px;
    background: rgba(12, 14, 23, 0.88);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-left: 1px solid var(--glass-border);
    z-index: 10;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.3);
}

.playlist-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 25px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Playlist Search Bar */
.search-box {
    margin: 0 25px 20px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.15);
}

.search-icon {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    margin-right: 8px;
}

#playlist-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.88rem;
}

#playlist-search-input::placeholder {
    color: var(--text-inactive);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.9rem;
    outline: none;
}

.clear-search-btn:hover {
    color: var(--text-main);
}

/* Track list */
.track-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px 25px;
}

/* Custom Scrollbar for Track list */
.track-list::-webkit-scrollbar {
    width: 6px;
}
.track-list::-webkit-scrollbar-track {
    background: transparent;
}
.track-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.track-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.track-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 6px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.track-item.active {
    background: rgba(var(--accent-color-rgb), 0.1);
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
}

.track-number {
    width: 25px;
    font-size: 0.8rem;
    color: var(--text-inactive);
    text-align: center;
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
}

.track-item.active .track-number {
    display: none; /* Hide number to show equalizer animation */
}

.track-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.track-detail {
    flex: 1;
    overflow: hidden;
    margin-right: 10px;
}

.track-name {
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.track-item.active .track-name {
    color: var(--accent-color);
}

.track-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Micro Equalizer visualizer animation */
.equalizer {
    display: none;
    align-items: flex-end;
    gap: 2.5px;
    width: 25px;
    height: 16px;
    margin-right: 8px;
}

.track-item.active .equalizer {
    display: flex;
}

.equalizer-bar {
    width: 3px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 1.5px;
    animation: eq-bounce 0.8s ease-in-out infinite alternate;
}

.equalizer-bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.7s; }
.equalizer-bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 0.9s; }
.equalizer-bar:nth-child(3) { animation-delay: 0.0s; animation-duration: 0.6s; }
.equalizer-bar:nth-child(4) { animation-delay: 0.2s; animation-duration: 0.8s; }

/* Paused state on equalizer */
.vinyl-disc:not(.playing) ~ .controls-area + .volume-container + .playlist-drawer .track-item.active .equalizer-bar,
.paused-eq .equalizer-bar {
    animation-play-state: paused;
}

@keyframes eq-bounce {
    0% { height: 3px; }
    100% { height: 16px; }
}


/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet & Smaller Screens */
@media (max-width: 960px) {
    .app-container {
        height: 100vh;
        width: 100vw;
        padding: 0;
    }

    .music-card {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    /* By default on tablet/mobile, we only show player panel, lyrics can be toggled or visible in a stack */
    .player-panel {
        border-right: none;
        padding: 30px;
    }

    .lyrics-panel {
        display: none; /* hidden on standard mobile layout, toggle in app.js if mobile */
    }

    .playlist-drawer {
        width: 100%;
    }
}

/* Mobile Screen Specific Tweaks */
@media (max-width: 480px) {
    .player-panel {
        padding: 25px 20px;
    }
    
    .disc-wrapper {
        width: 220px;
        height: 220px;
        margin: 15px auto;
    }
    
    .vinyl-disc {
        width: 210px;
        height: 210px;
    }
    
    .album-art {
        width: 120px;
        height: 120px;
    }
    
    .tonearm {
        right: 35px;
        top: -15px;
        width: 50px;
        height: 100px;
    }

    .song-title {
        font-size: 1.3rem;
    }
    
    .controls-area {
        margin-bottom: 20px;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
    }
    
    .play-btn svg {
        width: 26px;
        height: 26px;
    }
}

/* ==========================================================================
   Playlist Settings Panel & PWA Utilities
   ========================================================================== */
.drawer-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

#btn-playlist-settings svg {
    transition: transform 0.5s ease;
}

#btn-playlist-settings:hover svg {
    transform: rotate(60deg);
    color: var(--accent-color);
}

.playlist-settings-panel {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.playlist-settings-panel.hidden {
    display: none !important;
}

.settings-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.settings-input-group {
    display: flex;
    gap: 8px;
}

#input-playlist-id {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

#input-playlist-id:focus {
    border-color: var(--accent-color);
}

#btn-save-settings {
    background: var(--accent-color);
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    outline: none;
}

#btn-save-settings:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

#btn-save-settings:active {
    transform: scale(0.98);
}

.playlist-settings-panel .text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    text-decoration: underline;
    align-self: flex-start;
    outline: none;
    padding: 2px 0;
    transition: color var(--transition-fast);
}

.playlist-settings-panel .text-btn:hover {
    color: var(--accent-color);
}

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

/* ==========================================================================
   Help Modal Box & Overlay
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.modal-card {
    background: rgba(20, 22, 33, 0.88);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 82vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 30px;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.close-modal-btn {
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    width: 32px;
    height: 32px;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

/* Custom Scrollbar for Modal Card */
.modal-card::-webkit-scrollbar {
    width: 4px;
}
.modal-card::-webkit-scrollbar-track {
    background: transparent;
}
.modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.modal-body h4 {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body li {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.shortcuts-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.shortcuts-table tr:last-child td {
    border-bottom: none;
}

.shortcuts-table kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 3px 8px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    color: #fff;
    box-shadow: 0 1px 0px rgba(0,0,0,0.3);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Alert Modal Card Specifics */
.alert-card {
    max-width: 380px;
    padding: 35px 30px;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.alert-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(var(--accent-color-rgb), 0.1);
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
    margin-bottom: 5px;
    animation: alertPulse 2s infinite alternate;
}

.alert-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    font-weight: 500;
}

.alert-btn {
    background: var(--accent-color);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    width: 100%;
    outline: none;
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.25);
}

.alert-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.alert-btn:active {
    transform: scale(0.98);
}

@keyframes alertPulse {
    0% {
        box-shadow: 0 0 0 0px rgba(var(--accent-color-rgb), 0.2);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(var(--accent-color-rgb), 0);
    }
}
