/* JetKTV 2025 Modern KTV Theme - Core Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(22, 27, 46, 0.85);
    --bg-card-hover: rgba(30, 38, 66, 0.95);
    --bg-glass: rgba(15, 20, 35, 0.75);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-glow: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --accent-pink: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --accent-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --accent-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.4);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-pill: 9999px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Key status styles */
.keydown_bg {
    background: var(--accent-pink) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}
.keyup_bg {
    background: var(--secondary-gradient) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.key_bg {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
}

/* Marquee Effect */
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}
.marquee-animate {
    padding-left: 100%;
    animation: marquee 12s linear infinite;
}
@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* Equalizer Bars Animation */
.equalizer-container {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}
.equalizer-bar {
    width: 3px;
    background: #06b6d4;
    border-radius: 2px;
    animation: eq-bounce 1s ease-in-out infinite alternate;
}
.equalizer-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.equalizer-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.equalizer-bar:nth-child(3) { height: 40%; animation-delay: 0.5s; }
.equalizer-bar:nth-child(4) { height: 80%; animation-delay: 0.2s; }
.equalizer-bar.paused {
    animation-play-state: paused;
    height: 3px !important;
    opacity: 0.5;
}
@keyframes eq-bounce {
    0% { height: 20%; }
    100% { height: 100%; }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 90vw;
    width: 380px;
}
.toast-msg {
    background: rgba(22, 27, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.3);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-msg.toast-out {
    animation: toast-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toast-in {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(-15px) scale(0.95); }
}

/* Quick Modal for Paste URL */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 450px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.modal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.modal-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}
.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.modal-btn-submit {
    background: var(--primary-gradient);
    color: #fff;
}
.modal-btn-submit:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-glow);
}
