
@font-face {
  font-family: 'Twemoji Country Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
  font-display: swap;
}
#languageSelect, #writingLanguageSelect, .lang-select, .lang-select option {
  font-family: 'Twemoji Country Flags', 'Inter', 'Outfit', sans-serif !important;
}
:root {
    /* Dark Mode (Default) */
    --bg-dark: #0f172a;
    --bg-card: #0f1120;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-primary: #8b5cf6;
    --accent-primary-rgb: 139, 92, 246;
    --accent-secondary: #ec4899;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(139, 92, 246, 0.3);
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --modal-bg: rgba(10, 12, 24, 0.96);
    --input-bg: transparent;
    --select-bg: rgba(255, 255, 255, 0.1);
    /* Increased for visibility */
    --radius-lg: 12px;
    --radius-pill: 50px;
}

body.light-mode {
    --bg-dark: #f0f9ff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent-primary: #6366f1;
    --accent-primary-rgb: 99, 102, 241;
    --accent-secondary: #ec4899;
    --border-color: rgba(0, 0, 0, 0.1);
    --glow-color: rgba(99, 102, 241, 0.3);
    --modal-bg: rgba(255, 255, 255, 0.9);
    --input-bg: rgba(0, 0, 0, 0.02);
    --select-bg: rgba(0, 0, 0, 0.08);
    /* Increased for visibility */
}

/* Genre Themes */
body.theme-metal {
    --bg-dark: #0a0202;
    --bg-card: #1f0b0b;
    --text-primary: #fee2e2;
    --text-secondary: #fca5a5;
    --accent-primary: #ef4444;
    --accent-secondary: #b91c1c;
    --accent-gradient: linear-gradient(135deg, #ef4444, #7f1d1d);
    --glow-color: rgba(239, 68, 68, 0.3);
    --border-color: rgba(185, 28, 28, 0.15);
}

body.theme-country {
    --bg-dark: #1a120a;
    --bg-card: #2c1e14;
    --text-primary: #fffbeb;
    --text-secondary: #fde68a;
    --accent-primary: #f59e0b;
    --accent-secondary: #92400e;
    --accent-gradient: linear-gradient(135deg, #f59e0b, #92400e);
    --glow-color: rgba(245, 158, 11, 0.3);
    --border-color: rgba(146, 64, 14, 0.15);
}

body.theme-blues {
    --bg-dark: #0a0e1a;
    --bg-card: #0f1120;
    --text-primary: #e0e7ff;
    --text-secondary: #818cf8;
    --accent-primary: #6366f1;
    --accent-secondary: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #6366f1, #312e81);
    --glow-color: rgba(99, 102, 241, 0.4);
    --border-color: rgba(79, 70, 229, 0.15);
}

body.theme-horror {
    --bg-dark: #050505;
    --bg-card: #121016;
    --text-primary: #f43f5e;
    --text-secondary: #fda4af;
    --accent-primary: #9f1239;
    --accent-secondary: #4c0519;
    --accent-gradient: linear-gradient(135deg, #9f1239, #4c0519);
    --glow-color: rgba(159, 18, 57, 0.3);
    --border-color: rgba(159, 18, 57, 0.15);
}

body.theme-holiday {
    --bg-dark: #092c19;
    --bg-card: #08261b;
    --text-primary: #fefce8;
    --text-secondary: #fef08a;
    --accent-primary: #ef4444;
    --accent-secondary: #b91c1c;
    --accent-gradient: linear-gradient(135deg, #ef4444, #14532d);
    --glow-color: rgba(239, 68, 68, 0.3);
    --border-color: rgba(239, 68, 68, 0.15);
}

body.theme-educational {
    --bg-dark: #062b3c;
    --bg-card: #072a3f;
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --accent-primary: #0ea5e9;
    --accent-secondary: #0369a1;
    --accent-gradient: linear-gradient(135deg, #0ea5e9, #0369a1);
    --glow-color: rgba(14, 165, 233, 0.3);
    --border-color: rgba(14, 165, 233, 0.15);
}

body.theme-retro {
    --bg-dark: #1f0b43;
    --bg-card: #2a0e41;
    --text-primary: #fef08a;
    --text-secondary: #fde047;
    --accent-primary: #d946ef;
    --accent-secondary: #701a75;
    --accent-gradient: linear-gradient(135deg, #d946ef, #701a75);
    --glow-color: rgba(217, 70, 239, 0.3);
    --border-color: rgba(217, 70, 239, 0.15);
}

body.theme-soul {
    --bg-dark: #2d1b0d;
    --bg-card: #3d2613;
    --text-primary: #fef3c7;
    --text-secondary: #fcd34d;
    --accent-primary: #d97706;
    --accent-secondary: #92400e;
    --accent-gradient: linear-gradient(135deg, #f59e0b, #78350f);
    --glow-color: rgba(217, 119, 6, 0.3);
    --border-color: rgba(217, 119, 6, 0.15);
}

body.theme-rnb {
    --bg-dark: #1e1b4b;
    --bg-card: #2e1065;
    --text-primary: #f5f3ff;
    --text-secondary: #c4b5fd;
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #4c1d95);
    --glow-color: rgba(139, 92, 246, 0.3);
    --border-color: rgba(139, 92, 246, 0.15);
}

body.theme-steampunk {
    --bg-dark: #1a0f0a;
    --bg-card: #2b1a12;
    --text-primary: #fef3c7;
    --text-secondary: #d97706;
    --accent-primary: #b45309;
    --accent-secondary: #78350f;
    --accent-gradient: linear-gradient(135deg, #b45309, #451a03);
    --glow-color: rgba(180, 83, 9, 0.3);
    --border-color: rgba(180, 83, 9, 0.15);
}

body.theme-cybernoir {
    --bg-dark: #020617;
    --bg-card: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #38bdf8;
    --accent-primary: #0ea5e9;
    --accent-secondary: #1e293b;
    --accent-gradient: linear-gradient(135deg, #0ea5e9, #020617);
    --glow-color: rgba(14, 165, 233, 0.3);
    --border-color: rgba(56, 189, 248, 0.15);
}

body.theme-viking {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #1e3a8a);
    --glow-color: rgba(59, 130, 246, 0.3);
    --border-color: rgba(59, 130, 246, 0.15);
}

body.theme-disco {
    --bg-dark: #2e1065;
    --bg-card: #4c1d95;
    --text-primary: #fdf4ff;
    --text-secondary: #f5d0fe;
    --accent-primary: #d946ef;
    --accent-secondary: #a21caf;
    --accent-gradient: linear-gradient(135deg, #d946ef, #701a75);
    --glow-color: rgba(217, 70, 239, 0.3);
    --border-color: rgba(217, 70, 239, 0.15);
}

body.theme-reggae {
    --bg-dark: #064e3b;
    --bg-card: #065f46;
    --text-primary: #fefce8;
    --text-secondary: #fde047;
    --accent-primary: #10b981;
    --accent-secondary: #b91c1c;
    --accent-gradient: linear-gradient(135deg, #10b981, #b91c1c);
    --glow-color: rgba(16, 185, 129, 0.3);
    --border-color: rgba(16, 185, 129, 0.15);
}

body.theme-noir {
    --bg-dark: #0a0a0a;
    --bg-card: #171717;
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --accent-primary: #404040;
    --accent-secondary: #171717;
    --accent-gradient: linear-gradient(135deg, #404040, #000);
    --glow-color: rgba(64, 64, 64, 0.3);
    --border-color: rgba(64, 64, 64, 0.15);
}

body.theme-intimate {
    --bg-dark: #2e1e3b;
    --bg-card: #3d2b4d;
    --text-primary: #fff1f2;
    --text-secondary: #fda4af;
    --accent-primary: #f472b6;
    --accent-secondary: #fb923c;
    --accent-gradient: linear-gradient(135deg, #f472b6, #fb923c);
    --glow-color: rgba(244, 114, 182, 0.3);
    --border-color: rgba(244, 114, 182, 0.15);
}

body.theme-pop {
    --bg-dark: #2d0031;
    --bg-card: #4a0050;
    --text-primary: #fdf4ff;
    --text-secondary: #f5d0fe;
    --accent-primary: #d946ef;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #d946ef, #3b82f6);
    --glow-color: rgba(217, 70, 239, 0.3);
    --border-color: rgba(217, 70, 239, 0.15);
}

body.theme-soul {
    --bg-dark: #2d1a12;
    --bg-card: #451a03;
    --text-primary: #fef3c7;
    --text-secondary: #fcd34d;
    --accent-primary: #d97706;
    --accent-secondary: #78350f;
    --accent-gradient: linear-gradient(135deg, #d97706, #451a03);
    --glow-color: rgba(217, 119, 6, 0.3);
    --border-color: rgba(217, 119, 6, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.music-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none !important;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.4) 0%, transparent 50%),
        linear-gradient(to bottom, #0f172a, #1e1b4b);
    overflow: hidden;
}

.floating-note {
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-size: 4rem;
    pointer-events: none;
    animation: floatNote 20s linear infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}


.note-1 {
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    font-size: 6rem;
}

.note-2 {
    top: 70%;
    left: 80%;
    animation-duration: 30s;
    animation-delay: -5s;
    font-size: 8rem;
}

.note-3 {
    top: 40%;
    left: 90%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.note-4 {
    top: 80%;
    left: 20%;
    animation-duration: 28s;
    animation-delay: -15s;
    font-size: 5rem;
}

.note-5 {
    top: 50%;
    left: 50%;
    animation-duration: 26s;
    animation-delay: -2s;
    font-size: 4rem;
}

.note-6 {
    top: 20%;
    left: 70%;
    animation-duration: 32s;
    animation-delay: -8s;
    font-size: 7rem;
}

.note-7 {
    top: 60%;
    left: 10%;
    animation-duration: 24s;
    animation-delay: -12s;
    font-size: 3rem;
}

.note-8 {
    top: 90%;
    left: 60%;
    animation-duration: 29s;
    animation-delay: -4s;
    font-size: 6rem;
}

.note-9 {
    top: 15%;
    left: 40%;
    animation-duration: 27s;
    animation-delay: -18s;
    font-size: 5rem;
}

.note-10 {
    top: 30%;
    left: 5%;
    animation-duration: 31s;
    animation-delay: -7s;
    font-size: 4rem;
}

.note-11 {
    top: 75%;
    left: 95%;
    animation-duration: 23s;
    animation-delay: -14s;
    font-size: 8rem;
}

.note-12 {
    top: 5%;
    left: 85%;
    animation-duration: 33s;
    animation-delay: -1s;
    font-size: 3rem;
}

.note-13 {
    top: 45%;
    left: 30%;
    animation-duration: 25s;
    animation-delay: -20s;
    font-size: 6rem;
}

.note-14 {
    top: 85%;
    left: 45%;
    animation-duration: 21s;
    animation-delay: -9s;
    font-size: 5rem;
}

.note-15 {
    top: 5%;
    left: 2%;
    animation-duration: 29s;
    animation-delay: -3s;
    font-size: 4rem;
}

.note-16 {
    top: 25%;
    left: 12%;
    animation-duration: 34s;
    animation-delay: -11s;
    font-size: 5rem;
}

.note-17 {
    top: 55%;
    left: 4%;
    animation-duration: 22s;
    animation-delay: -6s;
    font-size: 3rem;
}

.note-18 {
    top: 75%;
    left: 18%;
    animation-duration: 27s;
    animation-delay: -16s;
    font-size: 6rem;
}

.note-19 {
    top: 35%;
    left: 8%;
    animation-duration: 31s;
    animation-delay: -2s;
    font-size: 7rem;
}

.note-20 {
    top: 95%;
    left: 3%;
    animation-duration: 26s;
    animation-delay: -9s;
    font-size: 5rem;
}

.note-21 {
    top: 65%;
    left: 22%;
    animation-duration: 23s;
    animation-delay: -13s;
    font-size: 4rem;
}

.note-22 {
    top: 15%;
    left: 25%;
    animation-duration: 30s;
    animation-delay: -5s;
    font-size: 3rem;
}

@keyframes floatNote {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.1;
    }

    80% {
        opacity: 0.1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.header-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 10px var(--accent-secondary));
    animation: floatIcon 6s ease-in-out infinite;
    position: relative;
}

.decorative-note {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.6;
    color: var(--accent-secondary);
    pointer-events: none;
    z-index: -1;
}

.note-small-1 {
    top: -15px;
    left: -10px;
    animation: floatIcon 4s ease-in-out infinite;
    animation-delay: -1s;
}

.note-small-2 {
    top: -20px;
    right: -5px;
    animation: floatIcon 5s ease-in-out infinite;
    animation-delay: -2.5s;
    font-size: 1.4rem;
}

.note-small-3 {
    bottom: 5px;
    right: -25px;
    animation: floatIcon 7s ease-in-out infinite;
    animation-delay: -4s;
}

/* Visual Mood Modes */
.music-bg.visual-stars {
    background: radial-gradient(circle at center, #020617 0%, #000 100%);
}

.music-bg.visual-stars::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(1px 1px at 20px 30px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 160px 120px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: starsRotate 100s linear infinite;
    opacity: 0.5;
}

@keyframes starsRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.music-bg.visual-pulse {
    background: #000;
}

.music-bg.visual-pulse::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    animation: bgPulse 4s ease-in-out infinite;
    opacity: 0.2;
}

@keyframes bgPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

.music-bg.visual-retro {
    background: linear-gradient(to bottom, #2e1065, #701a75, #ec4899);
}

.music-bg.visual-retro::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(217, 70, 239, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 70, 239, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(0);
    animation: gridFlow 5s linear infinite;
    transform-origin: center bottom;
}

@keyframes gridFlow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 50px;
    }
}

/* Cyberpunk Mood */
.music-bg.visual-cyberpunk {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.music-bg.visual-cyberpunk::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(0deg, rgba(236, 72, 153, 0.05) 0px, rgba(236, 72, 153, 0.05) 1px, transparent 1px, transparent 2px),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: scanlines 10s linear infinite;
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* Ocean Mood */
.music-bg.visual-ocean {
    background: linear-gradient(to bottom, #082f49, #0c4a6e, #075985);
}

.music-bg.visual-ocean::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.2) 0%, transparent 60%);
    animation: waveGlow 8s ease-in-out infinite alternate;
}

@keyframes waveGlow {
    from {
        opacity: 0.3;
        transform: scale(1);
    }

    to {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Forest Mood */
.music-bg.visual-forest {
    background: linear-gradient(to bottom, #064e3b, #065f46, #047857);
}

.music-bg.visual-forest::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    animation: forestGlow 12s ease-in-out infinite alternate;
}

@keyframes forestGlow {
    from {
        opacity: 0.2;
    }

    to {
        opacity: 0.5;
    }
}

/* Cleaned up old visual selector positioning */
.visual-mood-wrapper {
    position: relative;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 0.2rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 20;
}

.theme-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(15deg);
}

.theme-btn-select {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 20;
    min-width: 140px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 30px;
}

.theme-btn-select:hover {
    background-color: rgba(30, 41, 59, 0.95);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--glow-color);
}

.theme-btn-select option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

body.light-mode .theme-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #f59e0b;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
    letter-spacing: -0.05em;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

header p {
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.input-section,
.output-section {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.input-section {
    padding: 1rem;
}

.input-section:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-color), 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

textarea {
    width: 100%;
    height: 100px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1.2rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    padding: 0.5rem;
}

textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.controls-row.center-row {
    justify-content: center !important;
}

.refinement-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1rem;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    gap: 3rem;
    flex-wrap: wrap;
}


.density-control,
.flavor-control {
    flex: 1;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.density-control label,
.flavor-control label,
.select-group label,
.input-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-secondary);
    font-weight: 700;
    opacity: 0.9;
}

.select-group,
.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.artist-style-group input.lang-select {
    width: 100%;
    min-width: 180px;
}

.flavor-control select.lang-select {
    width: 100%;
    min-width: 180px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.helper-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.right-controls {
    display: flex;
    gap: 1.5rem;
    /* Matches generate-row gap */
    align-items: center;
}

.meta-selects {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* Allow wrapping if too many items */
    justify-content: center;
    /* Centred */
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 180px;
    /* Matches generate-btn width */
    text-align: center;
}

.header-slider {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
    /* Greedy grow to fill gap */
    max-width: 400px;
    margin: 0 2rem;
    justify-content: center;
}

.header-slider label {
    font-size: 0.8rem;
    white-space: nowrap;
    color: var(--text-secondary);
}

/* Slider & Range Styles */
.rhyme-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

.rhyme-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--glow-color);
    transition: transform 0.2s;
}

.rhyme-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.rhyme-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--glow-color);
    border: none;
}

.translation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    /* Changed from stretch to center */
    height: 54px;
    margin-top: 1.5rem;
    width: 100%;
}

.clear-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    /* Red tint */
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.7);
}

/* New Functional Elements */
.pill-container {
    display: flex;
    overflow-x: auto;
    /* Enable horizontal scrolling */
    white-space: nowrap;
    gap: 0.6rem;
    padding: 0.8rem 0.5rem;
    margin-bottom: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    -ms-overflow-style: auto;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    /* Fade edges */
    cursor: grab;
}

.pill-container:active {
    cursor: grabbing;
}

.pill-container::-webkit-scrollbar {
    height: 4px;
    display: block;
    /* Hide scrollbar for Chrome/Safari */
}

.pill-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.pill {
    flex: 0 0 auto;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pill.selected {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px var(--glow-color);
    transform: scale(1.05);
}

.pill:active {
    transform: translateY(0);
}

.helper-controls {
    position: relative;
    /* For dropdown positioning */
}

.history-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden !important;
    margin-bottom: 10px;
}

.history-item {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s;
}

.history-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.history-item:last-child {
    border-bottom: none;
}

.expand-btn {
    border-color: var(--accent-primary) !important;
    background: rgba(139, 92, 246, 0.1) !important;
    font-weight: 600;
}

.expand-btn:hover {
    background: var(--accent-primary) !important;
    color: white !important;
}

.hidden {
    display: none !important;
}

@keyframes pulse-gentle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

.main-generate-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0 1rem;
    flex-wrap: wrap;
}

.generate-btn {
    position: relative;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    color: white;
    font-family: var(--font-sans);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    letter-spacing: 0.03em;
    width: 220px;
    /* Fixed width for better alignment across all buttons */
    min-width: 200px;
}

.generate-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.5), 0 0 15px var(--glow-color);
}

.generate-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    animation: pulse-gentle 2s infinite ease-in-out;
}


/* Pulse Animation for Active Write Button */
.generate-btn#generateBtn.pulse {
    animation: btn-pulse 2s infinite;
    background: var(--accent-gradient);
    box-shadow: 0 0 15px var(--glow-color);
}

@keyframes btn-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--glow-color);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
        transform: scale(1);
    }
}

.generate-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.generate-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--glow-color);
}

.output-section {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    overflow: hidden;
}

.output-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: auto;
}

.version-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.5;
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-secondary);
    /* Override the gradient on the parent h1 */
}

.translation-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-select {
    background: var(--select-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    /* Adjusted padding to fit 42px height */
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    height: 42px;
    /* Increased height from 38px to fix clipping */
    min-width: 120px;
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.lang-select option.select-header {
    font-weight: 800;
    color: var(--accent-primary);
    opacity: 1;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding-top: 0.5rem;
}

.lang-select option:disabled:not(.select-header) {
    color: var(--text-secondary);
    opacity: 0.5;
    text-align: left;
}

.lang-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.translate-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 54px;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.5rem;
}

.translate-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

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

.lyrics-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    gap: 1rem;
    position: relative;
    padding: 0 1rem;
}

.lyrics-content {
    padding: 1.2rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.9;
    overflow-y: auto;
    overflow-x: hidden !important;
    font-size: 1.1rem;
    flex: 1;
    width: 100%;
    /* Allow content to grow/shrink equally */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: transparent;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    text-align: left;
}

.lyrics-content.empty-state {
    color: rgba(148, 163, 184, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    font-size: 1.2rem;
    white-space: normal;
    text-align: center;
}

.translation-panel {
    border-left: 1px solid var(--border-color);
    background: transparent;
    border-radius: 12px;
    white-space: normal;
}

/* When translation is hidden, original content takes full width */
.lyrics-content:only-child {
    flex: 1;
}

.translation-panel.hidden {
    display: none;
}

.trans-header {
    position: relative;
    text-align: left;
    margin-bottom: 2rem;
    min-height: 40px;
    /* Ensure space for close button */
}

.trans-title {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    display: inline-block;
}

.close-trans-btn {
    position: absolute;
    top: -5px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s;
    z-index: 10;
}

.close-trans-btn:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.trans-footer {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Sparkle Animation */
.sparkle {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.generate-btn:hover .sparkle {
    left: 120%;
    transition: 0.7s;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.copy-btn-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    /* Prevent buttons from going off-screen */
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    align-items: center;
    gap: 0.6rem;
}

.copy-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    width: 130px;
    /* Fixed width for uniformity */
    height: 40px;
}

.copy-btn:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.hidden {
    display: none;
}

/* Composer's Note Styling */
.composer-note {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease-out;
}

body.light-mode .composer-note {
    background: rgba(0, 0, 0, 0.03);
    color: #475569;
}

.favorites-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
}

.favorites-btn:hover {
    color: #dc2626;
    transform: scale(1.1);
}

/* Social Sharing */
.share-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.share-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
    opacity: 0.85;
}

.share-btn:hover {
    border-color: var(--accent-primary);
    color: white;
    opacity: 1;
}

.share-btn.twitter:hover {
    background: #000000;
}

.share-btn.facebook:hover {
    background: #1877F2;
}

.share-btn.whatsapp:hover {
    background: #25D366;
}

.share-btn.whatsapp:hover {
    background: #25D366;
}

/* Edit Button Styling */
.edit-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s;
    font-weight: 600;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.edit-btn:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px var(--glow-color);
}

.edit-btn.editing-mode {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
    animation: pulse-save 2s infinite ease-in-out;
}

@keyframes pulse-save {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.6);
    }
}

[contenteditable="true"] {
    outline: none;
    border-radius: 4px;
    transition: background 0.2s;
}

[contenteditable="true"]:hover {
    background: rgba(255, 255, 255, 0.05);
}

[contenteditable="true"]:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.lyrics-container.editing .lyrics-content {
    border: 1px dashed var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

/* Modal for Favorites */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    /* Increased base z-index */
    justify-content: center;
    align-items: center;
}

/* Ensure these sub-modals appear on top of the writing modal or favorites */
#activationModal,
#settingsModal,
#writingTranslationModal,
#karaokeModal {
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 95%;
    max-width: 800px;
    height: 80vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.favorites-list {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.favorite-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.fav-title {
    font-weight: bold;
    color: var(--text-primary);
}

.app-footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: var(--font-sans);
}

.fav-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.remove-fav {
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
}

.remove-fav:hover {
    transform: scale(1.1);
}

.save-btn {
    margin-right: 10px;
}

.auto-gen-btn {
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.auto-gen-btn:hover {
    background: linear-gradient(135deg, #f472b6 0%, #e879f9 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.5), 0 0 15px rgba(236, 72, 153, 0.3);
}

/* Print Styles - Native Browser Print */
@media print {
    @page {
        margin: 2cm;
    }

    /* Hide everything by default */
    body>*:not(#print-area) {
        display: none !important;
    }

    /* Reset Body/HTML for print */
    body,
    html {
        background-color: white !important;
        background-image: none !important;
        color: black !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Show ONLY the print container */
    #print-area {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
        background-color: white !important;
        color: black !important;
        font-family: 'Times New Roman', serif !important;
        z-index: 9999 !important;
    }

    /* Ensure children of print container are visible */
    #print-area * {
        visibility: visible !important;
        color: black !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }

    /* Styling for print content */
    #print-area h1 {
        text-align: left;
        padding-left: 8px;
        font-size: 24pt;
        margin-bottom: 20px;
        text-transform: uppercase;
        color: black !important;
        font-weight: bold !important;
    }

    #print-area h3 {
        font-size: 14pt;
        color: black !important;
        font-weight: bold !important;
        margin-top: 20px;
        margin-bottom: 10px;
        border-bottom: 1px solid #000;
        text-transform: uppercase;
        page-break-after: avoid;
    }

    #print-area .line {
        font-size: 12pt;
        line-height: 1.5;
        margin-bottom: 5px;
        page-break-inside: avoid;
        color: black !important;
    }

    #print-area .section {
        margin-bottom: 30px;
        page-break-inside: avoid;
    }

    #print-area .footer {
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #ccc;
        font-size: 0.8rem;
        color: #666;
        text-align: center;
    }
}

/* Phase 11: Clean Selection/Print */
.refresh-line-btn {
    user-select: none;
    /* Prevent manual highlighting */
}

@media print {

    .refresh-line-btn,
    .music-card button,
    .composer-note button {
        display: none !important;
    }
}

/* Rhyme Highlighting */
.lyric-line {
    border-radius: 4px;
    padding: 2px 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.rhyme-highlight {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px var(--glow-color);
    color: var(--accent-secondary);
    font-weight: bold;
    transform: scale(1.02);
}

/* Music Card (Sonic Palette) */
.music-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
    border-color: var(--accent-secondary);
}

.music-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}

.music-info:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.music-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.music-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Print styles for Music Card */
@media print {
    .music-card {
        border: 1px solid #ccc;
        background: none;
        box-shadow: none;
        color: black;
        width: 100%;
        margin-bottom: 20px;
    }

    .music-value {
        -webkit-text-fill-color: black;
        color: black;
        text-shadow: none;
    }

    .music-info:not(:last-child)::after {
        background: #ccc;
    }
}

.play-music-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 3px;
    /* Horizontal adjustment */
    padding-bottom: 15px;
    /* Vertical adjustment (final polish) */
    line-height: 1;

    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.play-music-btn:hover {
    background: var(--accent-gradient);
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: 0 0 15px var(--glow-color);
}

.play-music-btn.playing {
    animation: pulse 0.5s infinite;
    background: var(--accent-secondary);
}

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

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Pro Versioning & Licensing */
.pro-badge {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

#standardBadge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#standardBadge:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 10px var(--glow-color);
}

#proBadge {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 0 10px var(--glow-color);
}

/* Feature Gating */
.pro-only {
    position: relative;
    cursor: pointer;
}

.demo-active .pro-only, .standard-mode .pro-only {
    opacity: 0.85;
}

.demo-active .pro-only::after, .standard-mode .pro-only::after {
    content: '👑 PRO';
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    font-size: 0.55rem;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 800;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 10;
    letter-spacing: 0.5px;
}

.demo-active .pro-only.pro-badge-center::after, .standard-mode .pro-only.pro-badge-center::after {
    top: -18px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.standard-mode .pro-option {
    color: var(--text-secondary);
    font-style: italic;
}

/* Activation Modal Improvements */
.activation-input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.activation-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activation-input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.activation-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.activate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.activation-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.activation-status.success {
    color: #4ade80;
}

.activation-status.error {
    color: #f87171;
}


.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-footer p {
    margin: 0 0 10px -2rem;
    text-align: center;
}

/* ── Theme Badge ── */
.theme-badge {
    display: block;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 0 auto 0.6rem auto;
    width: fit-content;
    border: 1px solid currentColor;
    opacity: 0.92;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Colour variants per theme */
.theme-badge-ballad {
    background: rgba(244, 114, 182, 0.15);
    color: #f472b6;
    border-color: #f472b6;
}

.theme-badge-pop {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    border-color: #a78bfa;
}

.theme-badge-rock {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: #ef4444;
}

.theme-badge-blues {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: #818cf8;
}

.theme-badge-soul {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-color: #fbbf24;
}

.theme-badge-folk {
    background: rgba(134, 239, 172, 0.15);
    color: #86efac;
    border-color: #86efac;
}

.theme-badge-cyber {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border-color: #22d3ee;
}

.theme-badge-rap {
    background: rgba(163, 230, 53, 0.15);
    color: #a3e635;
    border-color: #a3e635;
}

.theme-badge-epic {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-color: #eab308;
}

.theme-badge-gospel {
    background: rgba(253, 186, 116, 0.15);
    color: #fb923c;
    border-color: #fb923c;
}

.theme-badge-sad {
    background: rgba(129, 140, 248, 0.15);
    color: #818cf8;
    border-color: #818cf8;
}

.theme-badge-party {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
    border-color: #ec4899;
}

.theme-badge-horror {
    background: rgba(185, 28, 28, 0.15);
    color: #ef4444;
    border-color: #7f1d1d;
}

.theme-badge-holiday {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border-color: #4ade80;
}

.theme-badge-pirate {
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
    border-color: #2dd4bf;
}

.theme-badge-default {
    background: rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    border-color: #475569;
}

/* ── Chord Diagrams ── */
.music-info-chords {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.chord-diagrams {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}

.chord-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.chord-diagram svg {
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chord-numeral {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    text-transform: uppercase;
    opacity: 0.85;
}

.chord-name {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.04em;
}

/* Base Responsive Fixes */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .main-actions {
        justify-content: center;
    }

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

        to {
            transform: rotate(360deg);
        }
    }

    .spinner-small {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .lang-select {
        flex-grow: 1;
        min-width: 120px;
    }
}

/* Success Feedback Classes */
.btn-success {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
}

/* Lyric Section Transitions */
.lyric-section {
    opacity: 0;
    transform: translateY(10px);
    animation: lyric-appear 0.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lyric-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lyric-line {
    opacity: 0;
    animation: line-fade 0.4s forwards ease-out;
}

@keyframes line-fade {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lyric-line {
    position: relative;
    padding: 6px 40px 6px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    transition: background 0.2s ease;
    cursor: default;
    min-height: 1.6em;
    display: flex;
    align-items: center;
}

.lyric-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.refresh-line-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyric-line:hover .refresh-line-btn {
    opacity: 0.6;
}

.refresh-line-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
}

.line-refresh-spin {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ── Writing Modal Styles ── */
.writing-modal-content {
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden !important;

    label {
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 1rem;
    }

    .writing-title-input {
        background: transparent;
        border: none;
        border-bottom: 2px solid var(--border-color);
        color: var(--text-primary);
        font-size: 1.5rem;
        font-weight: bold;
        font-family: var(--font-sans);
        outline: none;
        width: 80%;
        padding: 0.5rem;
        transition: border-color 0.3s;
    }

    .writing-title-input:focus {
        border-color: var(--accent-primary);
    }

    .writing-toolbar {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }

    .tag-btn {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.85rem;
    }

    .tag-btn:hover {
        background: var(--accent-primary);
        color: white;
        border-color: transparent;
    }

    .writing-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.2);
        overflow: auto;
        min-height: 200px;
    }

    .writing-textarea {
        flex-grow: 1;
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-family: var(--font-sans);
        font-size: 1.1rem;
        line-height: 1.6;
        padding: 1rem;
        resize: none;
        outline: none;
    }

    /* ── Stage 2: Premium AI Toolbar ── */
    .selection-toolbar {
        position: fixed;
        display: flex;
        gap: 4px;
        background: var(--bg-card);
        border: 1px solid var(--accent-primary);
        border-radius: 12px;
        padding: 6px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        z-index: 5000;
        /* Ensure it's above everything */
        animation: fadeInScale 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: scale(0.9) translateY(10px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    .selection-toolbar button {
        background: transparent;
        border: none;
        color: var(--text-primary);
        padding: 6px 12px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        border-radius: 8px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .selection-toolbar button:hover {
        background: var(--accent-primary);
        color: white;
        transform: translateY(-2px);
    }

    .selection-toolbar button:active {
        transform: translateY(0);
    }

    /* ── Stage 2: Premium Visual Moods ── */

    /* Cyberpunk: Neon Grid */
    .music-bg.visual-cyberpunk {
        background: #050505;
        background-image:
            linear-gradient(rgba(139, 92, 246, 0.2) 1px, transparent 1px),
            linear-gradient(90deg, rgba(139, 92, 246, 0.2) 1px, transparent 1px);
        background-size: 40px 40px;
        perspective: 1000px;
    }

    .music-bg.visual-cyberpunk::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 200%;
        height: 100%;
        background: linear-gradient(to bottom, transparent, rgba(236, 72, 153, 0.1) 50%, #050505);
        transform: rotateX(60deg) translateX(-25%);
        animation: gridAnimation 20s linear infinite;
        opacity: 0.6;
    }

    @keyframes gridAnimation {
        from {
            background-position: 0 0;
        }

        to {
            background-position: 0 -800px;
        }
    }

    /* Ocean: Flowing Geometric Waves */
    .music-bg.visual-ocean {
        background: linear-gradient(to bottom, #0c4a6e, #082f49);
    }

    .music-bg.visual-ocean::before {
        content: "";
        position: absolute;
        width: 200%;
        height: 200%;
        top: -50%;
        left: -50%;
        background: radial-gradient(circle at center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
        animation: oceanPulse 15s ease-in-out infinite alternate;
    }

    @keyframes oceanPulse {
        0% {
            transform: scale(1) rotate(0deg);
        }

        100% {
            transform: scale(1.2) rotate(15deg);
        }
    }

    /* Forest: Floating Particles */
    .music-bg.visual-forest {
        background: linear-gradient(to bottom, #064e3b, #022c22);
    }

    .music-bg.visual-forest::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(circle at 2px 2px, rgba(52, 211, 153, 0.3) 1px, transparent 0);
        background-size: 100px 100px;
        animation: forestRise 60s linear infinite;
    }

    @keyframes forestRise {
        from {
            background-position: 0 1000px;
        }

        to {
            background-position: 500px 0;
        }
    }

    .hidden {
        display: none !important;
    }

    .writing-footer {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        align-items: center;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }

    .copy-btn {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.9rem;
        cursor: pointer;
        font-family: var(--font-sans);
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-weight: 500;
    }

    .copy-btn:hover {
        background: var(--accent-primary);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--glow-color);
    }

    /* ── Main Generate Layout & Buttons ── */
    .generate-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* main-generate-actions layout handled above */







    .action-row {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        width: auto;
    }

    .generate-btn {
        position: relative;
        padding: 1rem 2rem;
        font-size: 1.2rem;
        font-weight: 800;
        color: white;
        background: var(--accent-gradient);
        border: none;
        border-radius: 12px;
        cursor: pointer;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        font-family: var(--font-sans);
        letter-spacing: 0.05em;
        text-transform: uppercase;
        box-shadow: 0 4px 15px var(--glow-color);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .generate-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px var(--glow-color), 0 0 20px rgba(255, 255, 255, 0.2);
    }

    .generate-btn:active {
        transform: translateY(1px);
    }

    .generate-btn.secondary {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        box-shadow: none;
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .generate-btn.secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
        border-color: var(--accent-primary);
        box-shadow: 0 4px 12px var(--glow-color);
    }

    .sparkle {
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
        transform: skewX(-20deg);
        animation: shine 3s infinite;
    }

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

        20% {
            left: 200%;
        }

        100% {
            left: 200%;
        }
    }

    /* ── Stage 1: Premium Tooling Styles ── */
    .rhyme-tooltip {
        position: absolute;
        z-index: 10000;
        background: var(--modal-bg);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        min-width: 200px;
        display: none;
        color: var(--text-primary);
        font-family: var(--font-sans);
    }

    .rhyme-title {
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin-bottom: 0.8rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.4rem;
    }

    .rhyme-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .rhyme-item {
        background: rgba(255, 255, 255, 0.05);
        padding: 0.3rem 0.6rem;
        border-radius: 6px;
        font-size: 0.9rem;
        border: 1px solid transparent;
        transition: all 0.2s;
        cursor: default;
    }

    .rhyme-item:hover {
        background: var(--accent-primary);
        color: white;
    }

    .rhyme-loading {
        font-size: 0.9rem;
        color: var(--text-secondary);
        font-style: italic;
    }

    .inline-chord {
        display: block;
        color: var(--accent-secondary);
        font-size: 0.8rem;
        font-weight: 700;
        margin-bottom: -4px;
        opacity: 0.8;
    }

    .syllable-count {
        display: inline-block;
        color: var(--text-secondary);
        font-size: 0.75rem;
        opacity: 0.4;
        margin-left: 1rem;
        font-style: italic;
    }

    .lyric-line {
        position: relative;
        cursor: pointer;
    }

    .lyric-line:hover {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 4px;
    }

    /* ── Print & Copy Cleanups ── */
    .refresh-line-btn {
        user-select: none;
        -webkit-user-select: none;
    }

    @media print {

        /* Hide the entire application UI */
        .app-container,
        .music-bg,
        .modal {
            display: none !important;
        }

        /* Show only the generated print container */
        #print-area {
            display: block !important;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            color: #000;
            background: #fff;
            padding: 2rem;
            font-family: 'Inter', sans-serif;
        }

        /* Print formatting inside the container */
        #print-area h1 {
            text-align: center;
            font-size: 24pt;
            margin-bottom: 2rem;
            border-bottom: 2px solid #333;
            padding-bottom: 1rem;
        }

        #print-area .section {
            margin-bottom: 1.5rem;
            page-break-inside: avoid;
        }

        #print-area .line {
            font-size: 12pt;
            line-height: 1.6;
        }

        /* Prevent refresh buttons from printing anywhere */
        .refresh-line-btn {
            display: none !important;
        }
    }

    /* API Settings Modal Styles */
    .clear-btn {
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 0.6rem 1.2rem !important;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s;
    }

    .clear-btn:hover {
        background: rgba(239, 68, 68, 0.1) !important;
        border-color: #ef4444 !important;
        color: #ef4444 !important;
    }

    #userApiKeyInput:focus {
        border-color: var(--accent-primary) !important;
        box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
        outline: none;
    }

    .theme-btn-select {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        padding: 0.5rem 1rem;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s;
        font-family: inherit;
        margin-right: 10px;
        position: relative;
        top: -2px;
    }

    .theme-btn-select option {
        background-color: #0f172a;
        /* Explicit dark background for OS dropdown */
        color: #f8fafc;
    }

    .theme-btn-select:hover {
        border-color: var(--accent-primary);
        background: var(--bg-hover);
    }

    .pro-badge-option {
        color: var(--accent-primary);
        font-weight: bold;
    }

    /* Syllable Heatmap Styles */
    .syllable-heatmap {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-left: 0;
        height: 4px;
        vertical-align: middle;
        order: -1;
        /* Move to the left */
    }

    .heatmap-bar {
        height: 100%;
        background: var(--accent-primary);
        border-radius: 2px;
        opacity: 0.6;
        transition: width 0.3s ease;
    }

    .heatmap-count {
        font-size: 0.7rem;
        color: var(--text-muted);
        min-width: 15px;
    }

    /* Rhyme Badge Styles */
    .rhyme-badge {
        display: inline-block;
        width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        border-radius: 4px;
        font-size: 0.65rem;
        font-weight: 800;
        margin-right: 4px;
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        border: 1px solid var(--border-color);
        order: -2;
        /* Move further left */
    }

    .rhyme-a {
        background: rgba(139, 92, 246, 0.2);
        border-color: #8b5cf6;
        color: #a78bfa;
    }

    .rhyme-b {
        background: rgba(236, 72, 153, 0.2);
        border-color: #ec4899;
        color: #f472b6;
    }

    .rhyme-c {
        background: rgba(16, 185, 129, 0.2);
        border-color: #10b981;
        color: #34d399;
    }

    .rhyme-d {
        background: rgba(245, 158, 11, 0.2);
        border-color: #f59e0b;
        color: #fbbf24;
    }

    .lyric-line-wrapper {
        display: flex;
        align-items: center;
        margin-bottom: 0.4rem;
        position: relative;
        gap: 4px;
        /* Tighten general gap */
    }

    .lyric-line-text {
        flex: 1;
    }

    .writing-textarea-wrapper {
        position: relative;
        display: block;
    }

    .rhyme-indicator-column {
        position: absolute;
        left: -30px;
        top: 0;
        display: flex;
        flex-direction: column;
        gap: 1.6rem;
        padding-top: 0.5rem;
    }

    /* Singing & Play Features */
    .highlighted-word {
        background: var(--accent-gradient);
        color: white;
        padding: 0 4px;
        border-radius: 4px;
        box-shadow: 0 0 10px var(--glow-color);
        transition: all 0.1s ease;
        display: inline-block;
    }

    .highlighted-line {
        border-left: 4px solid var(--accent-primary);
        padding-left: 8px;
        background: rgba(var(--accent-primary-rgb), 0.1);
        transition: all 0.3s ease;
    }

    .lyric-cursor {
        position: absolute;
        height: 4px;
        background: var(--accent-secondary);
        border-radius: 2px;
        pointer-events: none;
        z-index: 5;
        transition: all 0.1s ease;
        box-shadow: 0 0 8px var(--accent-secondary);
    }

    .lyrics-container {
        scroll-behavior: smooth;
    }

    /* Spinner for loading state */
    .spinner-small {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s linear infinite;
    }

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

    /* --- Lyric Synchronization & Scrolling --- */
    .lyrics-container {
        position: relative;
        overflow: hidden;
        /* Hide scrollbars if needed, though we want smooth scroll */
    }

    .lyrics-content {
        position: relative;
        max-height: 500px;
        overflow-y: auto;
    overflow-x: hidden !important;
        scroll-behavior: smooth;
        padding: 20px;
    }

    .lyric-cursor {
        position: absolute;
        left: 0;
        width: 100%;
        background: rgba(var(--accent-primary-rgb, 130, 210, 255), 0.15);
        border-left: 4px solid var(--accent-primary, #82d2ff);
        pointer-events: none;
        z-index: 1;
        transition: top 0.3s ease, height 0.3s ease;
        border-radius: 4px;
    }

    .highlighted-line {
        background: rgba(var(--accent-primary-rgb, 130, 210, 255), 0.1);
        border-radius: 4px;
        transition: background 0.3s ease;
    }

    .highlighted-line.highlighted-spoken {
        background: rgba(245, 158, 11, 0.18) !important;
        border-left: 4px solid #f59e0b !important;
        color: #fde68a !important;
        font-style: italic !important;
        text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    }

    /* Ensure lyric lines have some padding for the cursor/highlight */
    .lyric-line {
        padding: 4px 8px;
        margin: 2px 0;
        position: relative;
        z-index: 2;
    }

    /* --- Playback Controls Bar (Premium Look) --- */
    .playback-controls {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem 1.5rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
        justify-content: center;
    }

    .playback-controls.hidden {
        display: none;
    }

    .sing-btn {
        background: var(--accent-primary, #82d2ff);
        color: #000;
        border: none;
        padding: 0.6rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: inherit;
    }

    .sing-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(130, 210, 255, 0.3);
    }

    .voice-selector {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    .voice-selector select {
        background: var(--bg-input, #1e1e1e);
        color: var(--text-primary, #fff);
        border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        cursor: pointer;
    }

    /* Mute Button Refinement */
    .mute-btn {
        background: var(--bg-card, #1e1e1e);
        border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
        color: var(--text-primary, #fff);
        padding: 0.4rem 0.6rem;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        height: 36px;
        width: 44px;
        flex-shrink: 0;
    }

    .mute-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--accent-primary);
        transform: scale(1.05);
    }

    .mute-btn.muted {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
        color: #ef4444;
    }

    /* Volume slider styling */
    .volume-control input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        height: 4px;
        border-radius: 4px;
        background: var(--border-color, rgba(255, 255, 255, 0.2));
        outline: none;
        cursor: pointer;
        width: 100px;
        accent-color: var(--accent-primary, #82d2ff);
    }

    /* Ensure playback-controls inside modal are visible with proper colors */
    #playbackControls3 .voice-selector select,
    #playbackControls3 .voice-selector label {
        color: var(--text-primary, #fff);
    }

    #playbackControls3 .voice-selector select {
        background: var(--bg-input, #2a2a2a);
        border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
        color: var(--text-primary, #fff);
        padding: 0.35rem 0.7rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
    }

    /* ── Button Row Layout Fix ── */
    .main-generate-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100%;
    }

    .action-row.main-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
        width: auto !important;
    }

    .action-row.secondary-row {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* ── CRITICAL: Restore main two-column layout ── */
    main {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
        padding: 2rem !important;
        max-width: 1400px !important;
        margin: 0 auto !important;
        align-items: start !important;
    }

    /* ── CRITICAL: Force playback-controls to stay flex row ── */
    .playback-controls:not(.hidden) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 1rem !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* --- Lyric Synchronization & Scrolling Fix --- */
    .lyrics-container {
        position: relative;
        overflow: hidden;
        scroll-behavior: smooth;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        min-height: 400px;
    }

    .lyrics-content {
        position: relative;
        max-height: 500px;
        overflow-y: auto !important;
        scroll-behavior: smooth;
        padding: 20px;
        flex: 1 !important;
        width: 100% !important;
        display: block !important;
    }

    /* ── Music Card & Chord Diagrams ── */
    .music-card {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 1.2rem 1.5rem;
        margin: 1rem 0 1.5rem;
    }

    .music-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    .music-info-chords {
        flex: 1;
    }

    .music-label {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        color: var(--accent-secondary, #f59e0b);
        text-transform: uppercase;
    }

    .music-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-secondary);
        font-family: var(--font-mono, 'Space Mono', monospace);
    }

    /* Keep all chord diagrams in ONE row — never wrap */
    .chord-diagrams {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        align-items: flex-start;
        overflow-x: auto;
    }

    .chord-diagram {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex-shrink: 0;
    }

    .chord-numeral {
        font-size: 0.65rem;
        color: var(--accent-primary);
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    .chord-name {
        font-size: 0.7rem;
        color: var(--text-secondary);
        font-weight: 600;
        font-family: var(--font-mono, 'Space Mono', monospace);
    }

    .play-music-btn {
        background: var(--accent-gradient);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        color: white;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        box-shadow: 0 4px 12px var(--glow-color);
        flex-shrink: 0;
    }

    .play-music-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px var(--glow-color);
    }



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

.section-header-style {
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    opacity: 0.8;
    text-align: left;
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quality Dropdown */
.quality-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-dropdown.hidden {
    display: none;
}

.quality-dropdown label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.quality-dropdown label:hover {
    color: var(--text-primary);
}

.quality-dropdown input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* @media print hides icons */
@media print {

    .refresh-line-btn,
    .edit-btn,
    .share-btn,
    .copy-btn,
    .sing-btn {
        display: none !important;
    }
}

/* AI Status Badge */
.ai-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.ai-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 14px;
    height: 40px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-status-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 8px #94a3b8;
    transition: all 0.4s ease;
}

/* Status States */
.ai-status-badge.high-speed {
    color: #f0f9ff;
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.15) !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.ai-status-badge.high-speed .status-dot {
    background: #a786ff;
    box-shadow: 0 0 10px #a786ff;
}

.ai-status-badge.standard {
    color: #fefce8;
    border-color: rgba(234, 179, 8, 0.4);
    background: rgba(234, 179, 8, 0.15) !important;
}

.ai-status-badge.standard .status-dot {
    background: #facc15;
    box-shadow: 0 0 10px #facc15;
}

.ai-status-badge.local {
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.1) !important;
}

.ai-status-badge.local .status-dot {
    background: #64748b;
}

.ai-status-help {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.ai-status-help:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* ── Features Guide Modal ── */
.features-guide-content {
    max-width: 1200px !important;
    width: 95% !important;
    background: rgba(14, 16, 21, 0.92) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8) !important;
    display: flex;
    flex-direction: column;
    width: 95vw !important;
    height: 90vh !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    transition: all 0.5s ease !important;
}

.guide-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden !important;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

.guide-body::-webkit-scrollbar {
    width: 8px;
}

.guide-body::-webkit-scrollbar-track {
    background: transparent;
}

.guide-body::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-primary-rgb), 0.3);
    border-radius: 10px;
}

.guide-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    width: 100%;
    position: relative;
    min-height: fit-content;
    padding: 2rem 0;
}

.guide-column {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    width: 200px; /* Fine-tuned to 200px for better text fit */
    z-index: 5;
    pointer-events: none;
}

.guide-column.left {
    left: 2.5rem; /* Slightly reduced to keep labels connected visually */
}

.guide-column.right {
    right: 2.5rem; /* Slightly reduced to keep labels connected visually */
}

.guide-visual {
    position: relative;
    flex: 0 0 auto;
    width: 800px; /* Balanced width */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

.mockup-img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.hotspot-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.image-hotspots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hotspot {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    background: rgba(var(--accent-primary-rgb), 0);
    transition: background 0.3s;
    border-radius: 4px;
}

.hotspot:hover,
.hotspot.hotspot-active {
    background: rgba(var(--accent-primary-rgb), 0.15);
    border: 2px solid rgba(var(--accent-primary-rgb), 0.5);
    box-shadow: 0 0 15px rgba(var(--accent-primary-rgb), 0.3),
        inset 0 0 20px rgba(var(--accent-primary-rgb), 0.2);
}

.guide-visual:hover .mockup-img {
    transform: rotateX(2deg) rotateY(-2deg) scale(1.02);
}

.feature-item {
    position: absolute;
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start; /* Changed from center to align with top of multi-line text */
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    pointer-events: auto;
    transform: translateY(-50%);
    white-space: normal; /* Allow wrapping for long disclaimers */
    line-height: 1.4;
}

.feature-item.wide {
    width: 340px; /* Increased to 340px for long disclaimer labels */
}

.guide-column.right .feature-item.wide {
    right: 0;
    left: auto;
}

.feature-label {
    flex: 1;
}

.feature-item.item-active {
    background: rgba(var(--accent-primary-rgb), 0.25);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(var(--accent-primary-rgb), 0.3);
    z-index: 10;
    transform: translateY(-50%) scale(1.05);
}

.feature-item:hover::before,
.feature-item.item-active::before {
    opacity: 1;
}

.feature-item.item-active .feature-label {
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(var(--accent-primary-rgb), 0.4);
}

.feature-item.item-active .feature-pointer {
    opacity: 1;
    transform: scaleX(1.1);
}

.feature-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    transition: color 0.3s;
}

.feature-item:hover .feature-label {
    color: var(--accent-primary);
}

.feature-pointer {
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    flex-grow: 1;
    position: relative;
    opacity: 0.15;
    transition: all 0.4s;
}

.guide-column.right .feature-pointer {
    background: linear-gradient(-90deg, var(--accent-primary), transparent);
}

.feature-item:hover .feature-pointer {
    opacity: 1;
    transform: scaleX(1.1);
}

.feature-pointer::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    top: -2px;
    box-shadow: 0 0 10px var(--accent-primary);
}

.guide-column.left .feature-pointer::after {
    right: 0;
}

.guide-column.right .feature-pointer::after {
    left: 0;
}

.guide-footer-note {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.guide-close-btn-bottom {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(var(--accent-primary-rgb), 0.4);
}

.guide-close-btn-bottom:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px -5px rgba(var(--accent-primary-rgb), 0.6);
}

/* Persistent Highlight Effect */
.guide-highlight {
    z-index: 10000 !important;
    position: relative !important;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.8),
        0 0 50px var(--accent-primary) !important;
    transform: scale(1.05) !important;
    border: 2px solid var(--accent-primary) !important;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1) !important;
}

@media (max-width: 1100px) {
    .guide-layout {
        flex-direction: column-reverse;
        gap: 2rem;
    }

    .guide-column {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .feature-pointer {
        display: none;
    }
}

@media (max-width: 600px) {
    .guide-column {
        grid-template-columns: 1fr;
    }
}
/* ---------------------------------------
     FEATURE DESCRIPTION POPUP STYLES
   --------------------------------------- */

.feature-description-popup {
    position: absolute;
    width: 280px;
    z-index: 1001;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    visibility: hidden;
}

.feature-description-popup.active {
    pointer-events: auto;
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
}

.feature-description-popup .popup-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.4);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
    position: relative;
}

.feature-description-popup h4 {
    color: var(--accent-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.4rem;
}

.feature-description-popup p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Credits Display */
.credits-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 0 1rem;
    height: 40px;
    border-radius: 20px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.credits-display.low-credits {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.buy-credits-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: white;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 4px;
    transition: transform 0.2s;
}

.buy-credits-btn:hover {
    transform: scale(1.2);
}

/* Purchase Modal Styles */
.purchase-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.purchase-card:hover {
    border-color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.purchase-card.popular {
    border: 1px solid #fbbf24;
    background: rgba(245, 158, 11, 0.05);
    position: relative;
}

.purchase-card.selected {
    border-color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.15) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.purchase-card.popular.selected {
    background: rgba(245, 158, 11, 0.25) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #fbbf24;
    color: #1c1400;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.purchase-card.ultimate {
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.2));
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    padding-top: 2.5rem;
    min-height: 80px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.purchase-card.ultimate::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    transform: rotate(45deg);
    animation: ultimate-shine 4s infinite;
    pointer-events: none;
}

@keyframes ultimate-shine {
    0% { left: -100%; top: -100%; }
    100% { left: 100%; top: 100%; }
}

.purchase-card.ultimate:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.3));
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px) scale(1.01);
}

.purchase-card.ultimate.selected {
    background: rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.4) !important;
    border-color: #fff !important;
}

/* Premium Unlimited Badge in Header */
.credits-display.ultimate {
    border-color: #fbbf24 !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.3)) !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
    animation: ultimate-shine-subtle 3s infinite alternate;
}

@keyframes ultimate-shine-subtle {
    from { box-shadow: 0 0 10px rgba(251, 191, 36, 0.2); }
    to { box-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }
}

.credits-display.ultimate #creditsCount {
    font-weight: 900;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.purchase-card.ultimate .popular-badge {
    position: static;
    margin-bottom: 0.5rem;
    align-self: center;
    width: fit-content;
}

.credits-modal-content {
    max-width: 500px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}


.feature-description-popup .popup-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.4);
    transform: rotate(45deg);
    z-index: -1;
}

/* Arrow Positioning Logic */
.feature-description-popup.arrow-left .popup-arrow {
    left: -7px;
    top: 50%;
    margin-top: -6px;
    border-top: none;
    border-right: none;
}

.feature-description-popup.arrow-right .popup-arrow {
    right: -7px;
    top: 50%;
    margin-top: -6px;
    border-bottom: none;
    border-left: none;
}

     DEMO & LICENSING STYLES
   --------------------------------------- */

.demo-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #1e293b, #334155);
    color: white;
    z-index: 10001;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--accent-primary);
}

.demo-status-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.demo-badge {
    background: var(--accent-primary);
    color: #0f172a;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
}

.demo-timer {
    color: #cbd5e1;
}

.app-container {
    margin-top: 50px !important;
}

.activate-btn.standard {
    background: #10b981 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.activate-btn.standard:hover {
    background: #059669 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

.modal.no-close .close-btn {
    display: none;
}

.version-label {
    font-size: 0.5em;
    vertical-align: middle;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    color: var(--accent-secondary);
}


/* FORCED DEMO OVERRIDES - Only active if body has demo-active class */
body.demo-active #demoStatusBar { display: flex !important; flex-wrap: wrap !important; visibility: visible !important; opacity: 1 !important; z-index: 100002 !important; }
body.demo-active .app-container { margin-top: 10px !important; transition: margin-top 0.3s ease; }

/* ── API Key Status Badge ── */
.api-key-status {
    margin-top: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.api-key-status.checking {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.api-key-status.valid {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.api-key-status.invalid {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.12);
}


/* ── API Quota Info Section ── */
.quota-info-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quota-info-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quota-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quota-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.8rem;
    transition: transform 0.2s ease;
}

.quota-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.quota-model-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.quota-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quota-stat {
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}

.quota-stat-label {
    color: var(--text-muted);
}

.quota-stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Space Mono', monospace;
}

.paid-tier-note {
    grid-column: span 2;
    margin-top: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hide refresh buttons during singing playback */
.is-singing .refresh-line-btn {
    display: none !important;
}

/* --- Granular Line Controls --- */
.line-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.lyric-line-wrapper:hover .line-control-group {
    opacity: 1;
}

.line-word-slider {
    -webkit-appearance: none;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.line-word-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 0 5px var(--glow-color);
}

.line-word-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px var(--glow-color);
}

.word-count-badge {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 45px;
    font-family: var(--font-mono);
}

.header-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    z-index: 30;
    width: 100%;
}


/* Prompt Generator Select Options */
#promptGeneratorModal select, #promptGeneratorModal textarea { 
    background-color: #1e1e1e; 
    color: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
}
#promptGeneratorModal select option { 
    background-color: #1e1e1e; 
    color: #ffffff; 
}



/* --- Category Tabs --- */
.pill-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    justify-content: center;
}

.category-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-secondary, #a0a0a0);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ffffff);
    transform: translateY(-2px);
    border-color: var(--accent-primary, #8a2be2);
}

.category-tab.active {
    background: var(--accent-gradient, linear-gradient(135deg, #8a2be2, #4a00e0));
    color: white;
    border-color: transparent;
    box-shadow: 0 0 12px var(--glow-color, rgba(138, 43, 226, 0.5));
    transform: scale(1.05);
}

/* ==========================================================================
   MOBILE-ONLY RESPONSIVE OPTIMIZATION & QUICK ACTION BAR (Screens <= 768px)
   ========================================================================== */

/* Completely hidden on Windows PC, Laptop, and Tablets (> 768px) */
.mobile-quick-action-bar {
    display: none !important;
}

@media (max-width: 768px) {
    /* Stabilize mobile viewport & ensure vertical touch scrolling on Android/iOS */
    html {
        overflow-x: clip !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body {
        overflow-x: clip !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .app-container {
        padding: 10px 12px 30px 12px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    header {
        padding: 8px 4px !important;
    }

    .header-controls {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
    }

    /* Mobile Quick Action Bar (Directly below story box) */
    .mobile-quick-action-bar {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin: 12px 0 16px 0;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-quick-gen-btn {
        flex: 2;
        background: linear-gradient(135deg, #8b5cf6, #ec4899);
        color: #ffffff;
        border: none;
        border-radius: 12px;
        padding: 14px 16px;
        font-size: 1.05rem;
        font-weight: 800;
        font-family: 'Outfit', sans-serif;
        cursor: pointer;
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-quick-gen-btn:active {
        transform: scale(0.97);
    }

    .mobile-quick-surprise-btn {
        flex: 1;
        background: rgba(255, 255, 255, 0.08);
        color: #cbd5e1;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 12px;
        padding: 14px 10px;
        font-size: 0.88rem;
        font-weight: 700;
        font-family: 'Outfit', sans-serif;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-quick-surprise-btn:active {
        background: rgba(255, 255, 255, 0.16);
    }

    /* Keep story textarea comfortable on mobile */
    #descriptionInput {
        font-size: 1rem !important; /* Prevents auto-zoom on iOS Safari */
        min-height: 110px !important;
        padding: 12px !important;
    }
}

/* ==========================================================================
   GLOBAL DIGITAL STUDIO CLOCKS (WORLD HUBS WEST TO EAST)
   ========================================================================== */
.global-studio-clocks-bar {
    width: 100%;
    margin: 1.1rem auto 1.4rem auto;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(2, 6, 23, 0.94) 100%);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 14px;
    padding: 12px 14px 14px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.studio-clocks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-clocks-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-clocks-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: studioPulse 1.8s infinite ease-in-out;
}

@keyframes studioPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

.studio-clocks-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #cbd5e1;
    text-transform: uppercase;
}

.studio-clocks-mode-badge {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 2px 7px;
    letter-spacing: 1px;
}

.studio-clocks-track {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
}

.studio-clock-card {
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2.5px solid rgba(245, 158, 11, 0.7);
    border-radius: 10px;
    padding: 9px 8px 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.studio-clock-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}

.studio-clock-card.highlight-hub {
    border-top-color: #8b5cf6;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, rgba(2, 6, 23, 0.85) 100%);
}

.studio-clock-card.highlight-hub:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.2);
}

.clock-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 3px;
    padding: 0 2px;
}

.clock-card-region {
    font-family: 'Space Mono', monospace;
    font-size: 0.63rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.clock-daynight {
    font-size: 0.85rem;
    line-height: 1;
}

.clock-card-city {
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clock-flag {
    font-size: 0.88rem;
    line-height: 1;
}

.clock-card-digits {
    font-family: 'Space Mono', 'Consolas', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    margin: 2px 0 4px 0;
    line-height: 1.2;
}

.clock-card-zone {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(203, 213, 225, 0.6);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Light mode support */
body.light-mode .global-studio-clocks-bar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
body.light-mode .studio-clocks-title {
    color: #475569;
}
body.light-mode .studio-clock-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
body.light-mode .clock-card-city {
    color: #0f172a;
}
body.light-mode .clock-card-digits {
    color: #d97706;
    text-shadow: none;
}
body.light-mode .clock-card-region {
    color: #64748b;
}
body.light-mode .clock-card-zone {
    color: #64748b;
}

/* Responsive Scaling: preserve readability at any distance */
@media (max-width: 1050px) {
    .studio-clocks-track {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 680px) {
    .studio-clocks-track {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .studio-clock-card:last-child {
        grid-column: span 2;
        max-width: 220px;
        margin: 0 auto;
        width: 100%;
    }
    .clock-card-digits {
        font-size: 1.18rem;
    }
    .global-studio-clocks-bar {
        padding: 10px 10px 12px 10px;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   TV STUDIO & CHROMECAST TELEPROMPTER SYSTEM (v1.6.0)
   ════════════════════════════════════════════════════════════════════════════ */

/* TV Mode Action Button in Copy Toolbar */
.copy-btn.tv-mode-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(139, 92, 246, 0.15)) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    color: #fcd34d !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
    font-weight: 700;
}
.copy-btn.tv-mode-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
}

/* Audio Player Cast Button */
.showcase-cast-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}
.showcase-cast-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}
.showcase-cast-btn.cast-connected {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
}

/* Cast Studio Toast Notifications */
.cast-studio-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    z-index: 2147483647;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cast-studio-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cast-studio-toast.success {
    border-color: #10b981;
    color: #34d399;
}
.cast-studio-toast.warning {
    border-color: #f59e0b;
    color: #fcd34d;
}

/* Cast Guidance Modal */
.cast-guidance-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cast-guidance-card {
    background: #0d1117;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.15);
    border-radius: 18px;
    max-width: 560px;
    width: 100%;
    padding: 24px 28px;
    color: #e2e8f0;
    animation: tvFadeIn 0.25s ease-out;
}
.cast-guidance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cast-guidance-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.cast-guidance-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.cast-guidance-close:hover {
    color: #fff;
}
.cast-guidance-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
}
.cast-guidance-desc {
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 20px 0;
}
.cast-devices-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}
.cast-device-box {
    display: flex;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 14px;
    border-radius: 12px;
    align-items: flex-start;
}
.cast-device-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.cast-device-body {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #cbd5e1;
}
.cast-device-body strong {
    color: #f8fafc;
    display: block;
    margin-bottom: 2px;
}
.cast-action-stage-btn {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}
.cast-action-stage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

/* ════════════════════════════════════════════════════════════════════════════
   FULLSCREEN TV STAGE & LYRICS TELEPROMPTER OVERLAY
   ════════════════════════════════════════════════════════════════════════════ */
.tv-stage-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #08090e;
    z-index: 999999;
    flex-direction: column;
    overflow: hidden;
    color: #f8fafc;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Top Sticky HUD */
.tv-stage-hud {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.tv-stage-hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}
.tv-stage-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: 6px;
}
.tv-stage-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
    animation: tvPulse 1.8s infinite;
}
@keyframes tvPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.tv-stage-song-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* HUD Controls */
.tv-stage-hud-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tv-stage-btn-group {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    align-items: center;
}
.tv-stage-font-indicator {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 0 6px;
}
.tv-hud-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tv-hud-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.tv-scroll-speed-btn.active {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.5);
}
.tv-speed-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #fbbf24;
    padding: 0 6px 0 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.tv-speed-val {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fcd34d;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 7px;
    border-radius: 5px;
    min-width: 38px;
    text-align: center;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-variant-numeric: tabular-nums;
}
.tv-speed-step-btn {
    padding: 5px 9px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    color: #fcd34d;
}
.tv-speed-step-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    color: #ffffff;
}
.tv-hud-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    padding: 7px 16px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}
.tv-hud-primary:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
}
.tv-hud-primary.playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}
.tv-hud-sing {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 7px 16px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(16, 185, 129, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tv-hud-sing:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
}
.tv-hud-sing.playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
    animation: tvSingPulse 1.5s infinite;
}
@keyframes tvSingPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.9); }
}
.tv-hud-cast {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}
.tv-hud-cast:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}
.tv-hud-close {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.tv-hud-close:hover {
    background: #ef4444;
    color: #fff;
}

/* Scroll Viewport */
.tv-stage-scroll-viewport {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 40px 20px 180px 20px;
    display: flex;
    justify-content: center;
}
.tv-stage-content-wrap {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Title Card */
.tv-stage-title-card {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tv-stage-banner-tag {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #f59e0b;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.tv-stage-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
.tv-stage-meta-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0;
}

/* Lyrics Typography & Section Badges */
.tv-stage-lyrics-body {
    line-height: 1.85;
    font-weight: 500;
    color: #f1f5f9;
    letter-spacing: 0.015em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.tv-stage-lyric-line {
    margin: 6px 0;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.25s ease-out;
}
.tv-stage-lyric-line.karaoke-active {
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.32), rgba(245, 158, 11, 0.08));
    border-left: 5px solid #f59e0b;
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.25);
    transform: scale(1.04);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.tv-stage-blank-line {
    height: 18px;
}

/* Section Marker Pills */
.tv-stage-section {
    display: inline-block;
    margin: 28px 0 14px 0;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tv-standard-badge {
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
}
.tv-chorus-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25));
    border: 1px solid rgba(245, 158, 11, 0.65);
    color: #fcd34d;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}
.tv-bridge-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}
.tv-spoken-badge {
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid rgba(217, 119, 6, 0.6);
    color: #fbbf24;
    font-style: italic;
}

/* End Marker */
.tv-stage-end-mark {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

@keyframes tvFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Teleprompter Adjustments */
@media (max-width: 768px) {
    .tv-stage-hud {
        padding: 8px 12px;
    }
    .tv-stage-song-title {
        max-width: 160px;
        font-size: 0.95rem;
    }
    .tv-stage-hero-title {
        font-size: 2rem;
    }
    .tv-stage-scroll-viewport {
        padding: 20px 12px 140px 12px;
    }
}

/* ── TV Stage Instrument Select & Voice Mute HUD Styles ── */
.tv-stage-instrument-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 3px 10px;
    transition: all 0.2s ease;
}
.tv-stage-instrument-group:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(0, 0, 0, 0.7);
}
.tv-hud-label {
    font-size: 0.95rem;
    line-height: 1;
}
.tv-hud-select {
    background: transparent;
    color: #fcd34d;
    border: none;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}
.tv-hud-select option {
    background: #111827;
    color: #f3f4f6;
    font-weight: 600;
    padding: 6px;
}
.tv-hud-voice {
    background: rgba(139, 92, 246, 0.22);
    border: 1px solid rgba(139, 92, 246, 0.55);
    color: #c4b5fd;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.82rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tv-hud-voice:hover {
    background: rgba(139, 92, 246, 0.4);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}
.tv-hud-voice.voice-muted {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.65);
    color: #fca5a5;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

/* ── Desktop Voice Mute Button ── */
.voice-mute-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary, #ffffff);
    padding: 2px 7px;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.voice-mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.voice-mute-btn.muted {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
}

/* ── European 5-Language Switcher Component (NL, EN, DE, FR, ES) ── */
.songwriter-lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
    border: 1.5px solid rgba(139, 92, 246, 0.45);
    border-radius: 999px;
    padding: 4px 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    user-select: none;
    z-index: 100;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.songwriter-lang-switcher .lang-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.songwriter-lang-switcher .lang-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.songwriter-lang-switcher .lang-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

.songwriter-lang-switcher .lang-divider {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    font-weight: 400;
}


/* ── Global Unified Gold-Bordered 7-Language Switcher Bar ── */
.jdas-sticky-lang-bar, .songwriter-lang-bar {
  position: sticky !important;
  top: 10px !important;
  z-index: 100005 !important;
  display: flex !important;
  justify-content: center !important;
  margin: 0 auto 14px auto !important;
  max-width: 100% !important;
  width: 100% !important;
  pointer-events: none !important;
  padding: 4px 6px !important;
}
.songwriter-lang-switcher, .blueprint-lang-switcher, #studio-lang-switcher {
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.55), 0 0 20px rgba(251, 191, 36, 0.28) !important;
  user-select: none !important;
  z-index: 100 !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}
.songwriter-lang-switcher .lang-bar-badge,
.blueprint-lang-switcher .lang-bar-badge,
#studio-lang-switcher .lang-bar-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #fbbf24 !important;
  font-family: 'Outfit', 'Inter', sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 3px 8px 3px 4px !important;
  border-right: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  margin-right: 2px !important;
  white-space: nowrap !important;
}
.songwriter-lang-switcher .lang-btn,
.blueprint-lang-switcher .blueprint-lang-btn,
#studio-lang-switcher .lang-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
.songwriter-lang-switcher .lang-btn:hover,
.blueprint-lang-switcher .blueprint-lang-btn:hover,
#studio-lang-switcher .lang-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  transform: translateY(-1px) !important;
}
.songwriter-lang-switcher .lang-btn.active,
.blueprint-lang-switcher .blueprint-lang-btn.active,
#studio-lang-switcher .lang-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
  border-color: #c084fc !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.65) !important;
}
.songwriter-lang-switcher .lang-divider,
.blueprint-lang-switcher .lang-divider,
#studio-lang-switcher .lang-divider {
  color: rgba(255, 255, 255, 0.25) !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  user-select: none !important;
}
@media (max-width: 768px) {
  .jdas-sticky-lang-bar, .songwriter-lang-bar { top: 6px !important; padding: 2px 6px !important; }
  .songwriter-lang-switcher, .blueprint-lang-switcher, #studio-lang-switcher {
    border-radius: 18px !important;
    padding: 8px 10px !important;
    gap: 5px !important;
  }
  .songwriter-lang-switcher .lang-bar-badge,
  .blueprint-lang-switcher .lang-bar-badge,
  #studio-lang-switcher .lang-bar-badge {
    width: 100% !important;
    justify-content: center !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.25) !important;
    padding: 0 0 5px 0 !important;
    margin: 0 0 4px 0 !important;
    font-size: 0.8rem !important;
  }
  .songwriter-lang-switcher .lang-btn,
  .blueprint-lang-switcher .blueprint-lang-btn,
  #studio-lang-switcher .lang-btn {
    font-size: 0.82rem !important;
    padding: 5px 9px !important;
    gap: 5px !important;
  }
  .songwriter-lang-switcher .lang-divider,
  .blueprint-lang-switcher .lang-divider,
  #studio-lang-switcher .lang-divider {
    display: none !important;
  }
}

