/* ============================================
   DIGILEARN VIEW TOOLS (DVT) — PREMIUM DESIGN
   Diamond & Gold Traffic Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --card: rgba(20, 20, 35, 0.85);
    --card-solid: #141423;
    --card-hover: rgba(30, 30, 50, 0.95);
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --text-dim: #555570;
    --header: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #16213e 100%);
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --gold: #ffd700;
    --gold-light: #ffe44d;
    --gold-dark: #b8960f;
    --diamond: #b9f2ff;
    --diamond-glow: rgba(185, 242, 255, 0.2);
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.15);
    --error: #ff3d71;
    --error-glow: rgba(255, 61, 113, 0.15);
    --warning: #ffaa00;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --neon: #00f2ff;
    --neon-glow: 0 0 20px rgba(0, 242, 255, 0.3);
    --health-good: #00e676;
    --health-mid: #ffaa00;
    --health-bad: #ff3d71;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 212, 255, 0.2);
    --glass: rgba(255, 255, 255, 0.03);
    --gradient-gold: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
    --gradient-diamond: linear-gradient(135deg, #00d4ff, #b9f2ff, #00d4ff);
    --gradient-premium: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="light"] {
    --bg: #f0f2f5;
    --bg-secondary: #e8eaed;
    --card: rgba(255, 255, 255, 0.92);
    --card-solid: #ffffff;
    --card-hover: rgba(255, 255, 255, 1);
    --text: #1a1a2e;
    --text-muted: #444460;
    --text-dim: #777;
    --header: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --border: rgba(0, 0, 0, 0.1);
    --border-accent: rgba(0, 212, 255, 0.2);
    --glass: rgba(0, 0, 0, 0.03);
    --card-solid: #fff;
    --gold: #b8860b;
    --gold-light: #daa520;
    --gold-dark: #8b6914;
    --accent: #0095cc;
    --accent-glow: rgba(0, 149, 204, 0.2);
    --diamond: #006699;
    --gradient-gold: linear-gradient(135deg, #b8860b, #daa520, #b8860b);
}

/* Light theme specific overrides for toolbar */
[data-theme="light"] .toolbar {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .toolbar-btn {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .toolbar-btn:hover:not(:disabled) {
    background: rgba(0, 149, 204, 0.1);
    color: #0095cc;
}

[data-theme="light"] .url-input {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .stat-value,
[data-theme="light"] .mini-stat-value {
    color: #1a1a2e;
}

[data-theme="light"] .stat-label,
[data-theme="light"] .mini-stat-label {
    color: #555;
}

[data-theme="light"] .dashboard-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .view-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .slider-label,
[data-theme="light"] .toolbar-label {
    color: #555;
}

/* ===== GLOBAL RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 215, 0, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(185, 242, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   LOADING SCREEN — PREMIUM TRAFFIC THEME
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #050510;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-screen.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* Animated background particles */
.loading-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.loading-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(185, 242, 255, 0.05) 0%, transparent 30%);
    animation: bgRotate 15s ease-in-out infinite;
}

@keyframes bgRotate {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }
}

/* Diamond particles */
.diamond-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--diamond);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    opacity: 0;
    animation: floatParticle 4s ease-in-out infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg) scale(0);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translateY(-20vh) rotate(360deg) scale(1.5);
    }
}

/* Gold dust */
.gold-dust {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold), 0 0 12px rgba(255, 215, 0, 0.3);
    opacity: 0;
    animation: goldFloat 5s ease-in-out infinite;
}

@keyframes goldFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx, 100px), var(--dy, -200px)) scale(2);
    }
}

/* Loading logo container */
.loading-logo-container {
    position: relative;
    margin-bottom: 50px;
    z-index: 2;
}

.loading-diamond-icon {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: diamondPulse 2s ease-in-out infinite;
}

@keyframes diamondPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.3);
    }
}

.loading-diamond-icon::before {
    content: '💎';
    font-size: 80px;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 60px rgba(185, 242, 255, 0.3));
}

/* Orbit rings */
.orbit-ring {
    position: absolute;
    border: 1px solid transparent;
    border-top-color: var(--gold);
    border-right-color: rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: orbit linear infinite;
}

.orbit-ring:nth-child(1) {
    width: 160px;
    height: 160px;
    top: -20px;
    left: -20px;
    animation-duration: 3s;
}

.orbit-ring:nth-child(2) {
    width: 200px;
    height: 200px;
    top: -40px;
    left: -40px;
    animation-duration: 5s;
    animation-direction: reverse;
    border-top-color: var(--accent);
    border-right-color: rgba(0, 212, 255, 0.3);
}

.orbit-ring:nth-child(3) {
    width: 240px;
    height: 240px;
    top: -60px;
    left: -60px;
    animation-duration: 7s;
    border-top-color: var(--diamond);
    border-right-color: rgba(185, 242, 255, 0.2);
}

@keyframes orbit {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Orbit dots */
.orbit-ring::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold), 0 0 20px rgba(255, 215, 0, 0.4);
}

.orbit-ring:nth-child(2)::after {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow);
}

.orbit-ring:nth-child(3)::after {
    background: var(--diamond);
    box-shadow: 0 0 10px var(--diamond), 0 0 20px var(--diamond-glow);
}

/* Loading title */
.loading-title {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffd700 0%, #fff 30%, #ffd700 50%, #b9f2ff 70%, #ffd700 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s ease-in-out infinite;
    text-shadow: none;
    margin-bottom: 8px;
    z-index: 2;
    text-align: center;
}

@keyframes goldShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.loading-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 50px;
    z-index: 2;
    opacity: 0.7;
}

/* Progress bar */
.loading-progress-container {
    width: 350px;
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
}

.loading-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--diamond), var(--gold));
    background-size: 300% 100%;
    animation: progressGlow 2s ease-in-out infinite;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.2);
}

@keyframes progressGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold), 0 0 30px rgba(255, 215, 0, 0.5);
}

/* Loading stats */
.loading-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 350px;
    z-index: 2;
    margin-bottom: 20px;
}

.loading-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-timer {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 2px;
}

/* Loading status text */
.loading-status {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    z-index: 2;
    letter-spacing: 1px;
    animation: statusBlink 1.5s ease-in-out infinite;
}

@keyframes statusBlink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Loading feature icons */
.loading-features {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    z-index: 2;
}

.loading-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.loading-feature.visible {
    opacity: 1;
    transform: translateY(0);
}

.loading-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(10px);
}

.loading-feature-label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== APP WRAPPER ===== */
.app-wrapper {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.app-wrapper.visible {
    opacity: 1;
}

/* ===== ACTIVATION MODAL ===== */
.activation-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.activation-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.activation-content {
    background: var(--card);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    text-align: center;
    max-width: 440px;
    width: 90%;
    backdrop-filter: blur(40px);
    position: relative;
    overflow: hidden;
}

.activation-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--accent), var(--diamond), var(--gold));
    background-size: 300% 100%;
    animation: goldShimmer 3s ease-in-out infinite;
}

.activation-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.activation-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.activation-content input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    margin-bottom: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.activation-content input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.activation-content button {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a0f;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.activation-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.activation-error {
    color: var(--error);
    margin-top: 12px;
    font-size: 13px;
}

/* ===== HEADER ===== */
.header {
    background: var(--header);
    color: white;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--accent), var(--gold), transparent);
    opacity: 0.4;
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.mv-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-right: auto;
    background: linear-gradient(135deg, var(--gold), var(--diamond));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.mv-title::after {
    content: '◆';
    font-size: 8px;
    margin-left: 6px;
    -webkit-text-fill-color: var(--gold);
}

.refresh-mode {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
    color: var(--gold);
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refresh-mode:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

.url-input-group {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.url-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    transition: all 0.3s ease;
    outline: none;
}

.url-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.url-input::placeholder {
    color: var(--text-dim);
}

/* ===== BUTTONS ===== */
.action-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.replicate-btn {
    background: linear-gradient(135deg, #00b4d8, #00d4ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.replicate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.35);
}

.clear-btn {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
}

.clear-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

/* ===== TOOLBAR ===== */
.toolbar {
    background: var(--card);
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 62px;
    z-index: 999;
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(20px);
}

.toolbar-content {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.toolbar-section {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.toolbar-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.toolbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.4s ease;
}

.toolbar-btn:hover::before {
    left: 100%;
}

.toolbar-btn:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-1px);
}

.toolbar-btn.active {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(0, 230, 118, 0.08));
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 15px var(--success-glow);
}

.toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bulk-input {
    width: 62px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease;
}

.bulk-input:focus {
    border-color: var(--accent);
}

/* Range sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slider-label {
    font-size: 9px;
    color: var(--text-dim);
    text-align: center;
}

/* ===== NOTICE BAR ===== */
.notice-bar {
    padding: 12px 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    display: none;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.notice-bar.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1500px;
    margin: 24px auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== VIEWS GRID ===== */
.views-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ===== VIEW CARD ===== */
.view-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow), 0 0 0 1px var(--border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    user-select: none;
    backdrop-filter: blur(20px);
}

.view-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.view-card:hover {
    box-shadow: 0 12px 40px var(--shadow-lg), 0 0 0 1px var(--border-accent);
    transform: translateY(-4px);
}

.view-card:hover::before {
    opacity: 1;
}

.view-card.selected {
    box-shadow: 0 0 0 2px var(--accent), 0 12px 40px var(--shadow-lg);
}

.view-card.selected::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--accent), var(--diamond), var(--accent));
}

.view-card.dragging {
    opacity: 0.6;
    cursor: grabbing;
    transform: rotate(2deg) scale(1.02);
}

.view-card.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.7);
    z-index: 10;
    backdrop-filter: blur(4px);
}

.view-card.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-right-color: var(--accent);
    border-radius: 50%;
    z-index: 11;
    animation: spin 0.8s linear infinite;
    opacity: 1;
    color: transparent;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.card-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03), transparent);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.view-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.view-status {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.status-loading {
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.status-loaded {
    background: rgba(0, 230, 118, 0.12);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.status-error {
    background: var(--error-glow);
    color: var(--error);
    border: 1px solid rgba(255, 61, 113, 0.2);
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: var(--bg);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.view-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #0a0a0f;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top left;
}

.card-footer {
    background: linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.02));
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.card-btn {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.card-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.card-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== AUDIO INDICATOR ===== */
.audio-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff0055, #ff3366);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 12px rgba(255, 0, 85, 0.4);
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 12px rgba(255, 0, 85, 0.4);
    }
}

/* ===== PING & HEALTH BARS ===== */
.ping-meter {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.ping-fill {
    height: 100%;
    transition: width 0.4s ease, background 0.4s ease;
    border-radius: 2px;
}

.health-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.health-fill {
    height: 100%;
    transition: width 0.4s ease, background 0.4s ease;
    border-radius: 0 2px 2px 0;
}

/* ===== COLOR CODING ===== */
.color-code-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.color-code-btn:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== NOTES ===== */
.note-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--accent);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-badge:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 12px var(--accent-glow);
}

.note-popup {
    position: absolute;
    top: 36px;
    right: 8px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    width: 200px;
    box-shadow: 0 8px 30px var(--shadow-lg);
    display: none;
    z-index: 20;
    backdrop-filter: blur(20px);
}

.note-popup textarea {
    width: 100%;
    resize: vertical;
    min-height: 60px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    outline: none;
}

.note-popup textarea:focus {
    border-color: var(--accent);
}

.note-popup button {
    margin-top: 8px;
    width: 100%;
    padding: 7px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #0099cc);
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.note-popup button:hover {
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ===== DARK MODE BTN ===== */
#darkModeBtn {
    transition: all 0.3s ease;
}

[data-theme="dark"] #darkModeBtn,
body:not([data-theme="light"]) #darkModeBtn {
    box-shadow: var(--neon-glow);
    border-color: var(--neon);
}

/* ===== ERROR PANEL ===== */
.error-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-solid);
    border-top: 2px solid var(--error);
    max-height: 200px;
    overflow-y: auto;
    padding: 12px 24px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.error-panel.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.error-item {
    margin-bottom: 6px;
    color: var(--error);
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

/* ===== KEYBOARD HINT ===== */
.keyboard-hint {
    position: fixed;
    bottom: 12px;
    right: 12px;
    background: var(--card);
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    letter-spacing: 0.3px;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    font-family: 'Inter', sans-serif;
}

.scroll-indicator.show {
    opacity: 1;
}

/* ===== POPUPS ===== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.popup-content {
    background: var(--card-solid);
    color: var(--text);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px var(--shadow-lg), 0 0 0 1px var(--border);
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--accent));
}

.popup-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-content label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.popup-content input,
.popup-content textarea,
.popup-content select {
    width: 100%;
    padding: 10px 14px;
    margin: 6px 0 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease;
}

.popup-content input:focus,
.popup-content textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.popup-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-save {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a0f;
}

.popup-save:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

.popup-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.popup-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== DYNAMIC HINT ===== */
.dynamic-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 0;
    padding: 6px;
    background: var(--glass);
    border-radius: 6px;
    margin-top: 8px;
}

/* View card speed slider */
.view-card>div:last-child {
    padding: 8px 16px;
    background: linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.02));
}

.view-card>div:last-child input[type="range"] {
    width: 100%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .url-input-group {
        min-width: auto;
    }

    .toolbar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .views-grid {
        grid-template-columns: 1fr;
    }

    .loading-title {
        font-size: 26px;
        letter-spacing: 2px;
    }

    .loading-subtitle {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .loading-progress-container,
    .loading-stats {
        width: 280px;
    }

    .loading-features {
        gap: 16px;
    }

    .loading-feature-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ===== SELECTION ANIMATION ===== */
@keyframes selectPulse {
    0% {
        box-shadow: 0 0 0 2px var(--accent);
    }

    50% {
        box-shadow: 0 0 0 2px var(--accent), 0 0 20px var(--accent-glow);
    }

    100% {
        box-shadow: 0 0 0 2px var(--accent);
    }
}

.view-card.selected {
    animation: selectPulse 2s ease-in-out infinite;
}

/* ===== COPYRIGHT/FOOTER ===== */
.footer-bar {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.footer-bar span {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* =============================================
   FEATURE 1: THEME PRESETS
   ============================================= */
[data-theme="royal-purple"] {
    --bg: #0d0a14;
    --bg-secondary: #15101f;
    --card: rgba(25, 18, 40, 0.85);
    --card-solid: #191228;
    --text: #e8e0f8;
    --text-muted: #9988bb;
    --text-dim: #665588;
    --header: linear-gradient(135deg, #0d0a14 0%, #1a1030 50%, #2d1b51 100%);
    --accent: #b47eff;
    --accent-glow: rgba(180, 126, 255, 0.3);
    --gold: #e0a0ff;
    --gold-light: #eabbff;
    --gold-dark: #8b4fcf;
    --diamond: #d4b8ff;
    --diamond-glow: rgba(212, 184, 255, 0.2);
    --success: #7cff7c;
    --border: rgba(180, 126, 255, 0.08);
    --border-accent: rgba(180, 126, 255, 0.2);
    --gradient-gold: linear-gradient(135deg, #b47eff, #e0a0ff, #b47eff);
}

[data-theme="ocean-blue"] {
    --bg: #060d14;
    --bg-secondary: #0a1520;
    --card: rgba(10, 25, 45, 0.85);
    --card-solid: #0a192d;
    --text: #ccd6f6;
    --text-muted: #6688aa;
    --text-dim: #445566;
    --header: linear-gradient(135deg, #060d14 0%, #0a192d 50%, #112240 100%);
    --accent: #64ffda;
    --accent-glow: rgba(100, 255, 218, 0.3);
    --gold: #64ffda;
    --gold-light: #8affea;
    --gold-dark: #0a9b7a;
    --diamond: #a8f0e6;
    --diamond-glow: rgba(168, 240, 230, 0.2);
    --success: #64ffda;
    --border: rgba(100, 255, 218, 0.06);
    --border-accent: rgba(100, 255, 218, 0.2);
    --gradient-gold: linear-gradient(135deg, #0a9b7a, #64ffda, #0a9b7a);
}

[data-theme="rose-gold"] {
    --bg: #140a0a;
    --bg-secondary: #1f1010;
    --card: rgba(40, 18, 20, 0.85);
    --card-solid: #281214;
    --text: #f8e0e4;
    --text-muted: #bb8890;
    --text-dim: #885560;
    --header: linear-gradient(135deg, #140a0a 0%, #2d1518 50%, #451b20 100%);
    --accent: #ff6b8a;
    --accent-glow: rgba(255, 107, 138, 0.3);
    --gold: #ffb4c4;
    --gold-light: #ffccd8;
    --gold-dark: #cf4f6a;
    --diamond: #ffd4de;
    --diamond-glow: rgba(255, 212, 222, 0.2);
    --success: #7cff9f;
    --border: rgba(255, 107, 138, 0.08);
    --border-accent: rgba(255, 107, 138, 0.2);
    --gradient-gold: linear-gradient(135deg, #cf4f6a, #ffb4c4, #cf4f6a);
}

[data-theme="emerald-green"] {
    --bg: #060f0a;
    --bg-secondary: #0a1a10;
    --card: rgba(10, 35, 20, 0.85);
    --card-solid: #0a2314;
    --text: #d0f0da;
    --text-muted: #66aa80;
    --text-dim: #448860;
    --header: linear-gradient(135deg, #060f0a 0%, #0a2314 50%, #0e3a1e 100%);
    --accent: #4dff91;
    --accent-glow: rgba(77, 255, 145, 0.3);
    --gold: #80ffb0;
    --gold-light: #a8ffc8;
    --gold-dark: #1a9b50;
    --diamond: #b0ffd0;
    --diamond-glow: rgba(176, 255, 208, 0.2);
    --success: #4dff91;
    --border: rgba(77, 255, 145, 0.06);
    --border-accent: rgba(77, 255, 145, 0.2);
    --gradient-gold: linear-gradient(135deg, #1a9b50, #4dff91, #1a9b50);
}

/* Theme switcher dropdown */
.theme-switcher {
    position: relative;
    display: inline-block;
}

.theme-switcher-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.theme-switcher-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 12px 40px var(--shadow-lg);
    display: none;
    z-index: 2000;
    backdrop-filter: blur(20px);
    animation: dropdownAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-dropdown.show {
    display: block;
}

@keyframes dropdownAppear {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    transition: all 0.2s ease;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-option.active {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.theme-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

/* =============================================
   FEATURE 2: ANIMATED BACKGROUND WAVES
   ============================================= */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.aurora-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    opacity: 0.04;
    filter: blur(80px);
    animation: auroraMove ease-in-out infinite;
}

.aurora-wave:nth-child(1) {
    background: radial-gradient(ellipse at 30% 50%, var(--gold) 0%, transparent 70%);
    animation-duration: 20s;
    top: -50%;
    left: -50%;
}

.aurora-wave:nth-child(2) {
    background: radial-gradient(ellipse at 70% 30%, var(--accent) 0%, transparent 70%);
    animation-duration: 25s;
    animation-delay: -5s;
    top: -30%;
    left: -30%;
}

.aurora-wave:nth-child(3) {
    background: radial-gradient(ellipse at 50% 80%, var(--diamond) 0%, transparent 70%);
    animation-duration: 30s;
    animation-delay: -10s;
    top: -70%;
    left: -20%;
}

@keyframes auroraMove {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(5%, -5%) rotate(45deg) scale(1.05);
    }

    50% {
        transform: translate(-3%, 5%) rotate(90deg) scale(0.95);
    }

    75% {
        transform: translate(3%, -3%) rotate(135deg) scale(1.05);
    }

    100% {
        transform: translate(0, 0) rotate(180deg) scale(1);
    }
}

/* =============================================
   FEATURE 3: TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    min-width: 300px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    backdrop-filter: blur(20px);
    pointer-events: auto;
    animation: toastIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    animation: toastTimer 3s linear forwards;
    border-radius: 0 0 0 14px;
}

@keyframes toastTimer {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.toast-success .toast-icon {
    background: rgba(0, 230, 118, 0.12);
}

.toast.toast-error .toast-icon {
    background: rgba(255, 61, 113, 0.12);
}

.toast.toast-info .toast-icon {
    background: rgba(0, 212, 255, 0.12);
}

.toast.toast-warning .toast-icon {
    background: rgba(255, 170, 0, 0.12);
}

.toast.toast-success::before {
    background: var(--success);
}

.toast.toast-error::before {
    background: var(--error);
}

.toast.toast-info::before {
    background: var(--accent);
}

.toast.toast-warning::before {
    background: var(--warning);
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

/* =============================================
   FEATURE 4: DASHBOARD ANALYTICS PANEL
   ============================================= */
.dashboard-panel {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.dashboard-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--accent), var(--diamond));
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dashboard-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-title::before {
    content: '◆';
    color: var(--gold);
    font-size: 10px;
}

.dashboard-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.dashboard-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: 0 8px 24px var(--shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 0 0 12px 12px;
}

.stat-card:nth-child(1)::after {
    background: var(--gold);
}

.stat-card:nth-child(2)::after {
    background: var(--success);
}

.stat-card:nth-child(3)::after {
    background: var(--error);
}

.stat-card:nth-child(4)::after {
    background: var(--accent);
}

.stat-card:nth-child(5)::after {
    background: var(--warning);
}

.stat-card:nth-child(6)::after {
    background: var(--diamond);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* =============================================
   FEATURE 5: VIEW CARD MINI DASHBOARD
   ============================================= */
.card-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.mini-stat {
    background: var(--card-solid);
    padding: 8px 10px;
    text-align: center;
    transition: background 0.2s ease;
}

.mini-stat:hover {
    background: var(--card-hover);
}

.mini-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: block;
    line-height: 1.2;
}

.mini-stat-label {
    font-size: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* =============================================
   FEATURE 6: COMMAND PALETTE (Ctrl+K)
   ============================================= */
.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.7);
    z-index: 99998;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    backdrop-filter: blur(8px);
    animation: cmdFadeIn 0.15s ease;
}

.command-palette-overlay.show {
    display: flex;
}

@keyframes cmdFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.command-palette {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 215, 0, 0.05);
    overflow: hidden;
    animation: cmdAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cmdAppear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.command-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.command-search-icon {
    font-size: 18px;
    color: var(--gold);
}

.command-search input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.command-search input::placeholder {
    color: var(--text-dim);
}

.command-shortcut-hint {
    font-size: 10px;
    color: var(--text-dim);
    padding: 3px 8px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

.command-results {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
}

.command-group-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px 4px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.command-item:hover,
.command-item.active {
    background: rgba(255, 215, 0, 0.06);
}

.command-item.active {
    border: 1px solid rgba(255, 215, 0, 0.12);
}

.command-item-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.command-item-text {
    flex: 1;
}

.command-item-name {
    font-weight: 500;
}

.command-item-desc {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 1px;
}

.command-item-shortcut {
    font-size: 10px;
    color: var(--text-dim);
    padding: 2px 6px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.command-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 10px;
    color: var(--text-dim);
}

.command-footer kbd {
    padding: 2px 5px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
}

/* =============================================
   FEATURE 7: SMOOTH PAGE TRANSITIONS
   ============================================= */
/* Spring animation for popups */
.popup-overlay.show {
    animation: popupFadeIn 0.3s ease;
}

.popup-overlay.show .popup-content {
    animation: popupSpring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popupSpring {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* View card entrance animation */
.view-card {
    animation: cardEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Stagger animation for cards */
.view-card:nth-child(1) {
    animation-delay: 0.05s;
}

.view-card:nth-child(2) {
    animation-delay: 0.1s;
}

.view-card:nth-child(3) {
    animation-delay: 0.15s;
}

.view-card:nth-child(4) {
    animation-delay: 0.2s;
}

.view-card:nth-child(5) {
    animation-delay: 0.25s;
}

.view-card:nth-child(6) {
    animation-delay: 0.3s;
}

.view-card:nth-child(7) {
    animation-delay: 0.35s;
}

.view-card:nth-child(8) {
    animation-delay: 0.4s;
}

.view-card:nth-child(9) {
    animation-delay: 0.45s;
}

.view-card:nth-child(10) {
    animation-delay: 0.5s;
}

.view-card:nth-child(11) {
    animation-delay: 0.55s;
}

.view-card:nth-child(12) {
    animation-delay: 0.6s;
}

/* Button click effect */
.toolbar-btn:active:not(:disabled),
.action-btn:active:not(:disabled),
.card-btn:active:not(:disabled) {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* Stat card counter animation */
@keyframes counterUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-value {
    animation: counterUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Smooth toolbar button transitions */
.toolbar-btn,
.action-btn,
.card-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dashboard panel collapse/expand animation */
.dashboard-stats {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    overflow: hidden;
}

.dashboard-stats.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Loading card shimmer */
@keyframes shimmer {
    from {
        background-position: -200% 0;
    }

    to {
        background-position: 200% 0;
    }
}

.view-card.loading .iframe-container {
    background: linear-gradient(90deg, var(--bg) 25%, rgba(255, 215, 0, 0.03) 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* =============================================
   RIGHT-CLICK CONTEXT MENU
   ============================================= */
.context-menu {
    position: fixed;
    z-index: 99999;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    min-width: 220px;
    box-shadow: 0 12px 40px var(--shadow-lg), 0 0 0 1px rgba(255, 215, 0, 0.05);
    backdrop-filter: blur(20px);
    display: none;
    animation: ctxAppear 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.context-menu.show {
    display: block;
}

@keyframes ctxAppear {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

.ctx-item:hover {
    background: rgba(255, 215, 0, 0.06);
}

.ctx-item-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.ctx-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

/* =============================================
   ACTIVITY TIMELINE SIDEBAR
   ============================================= */
.timeline-panel {
    position: fixed;
    right: -380px;
    top: 0;
    bottom: 0;
    width: 380px;
    background: var(--card-solid);
    border-left: 1px solid var(--border);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px var(--shadow-lg);
}

.timeline-panel.show {
    right: 0;
}

.timeline-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeline-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-title::before {
    content: '◆';
    color: var(--gold);
    font-size: 10px;
}

.timeline-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.timeline-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.timeline-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.timeline-entry {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    transition: background 0.2s ease;
    position: relative;
}

.timeline-entry:hover {
    background: rgba(255, 255, 255, 0.03);
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 36px;
    bottom: -10px;
    width: 1px;
    background: var(--border);
}

.timeline-entry:last-child::before {
    display: none;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.timeline-dot.success {
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}

.timeline-dot.info {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-dot.warning {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.timeline-dot.error {
    background: var(--error);
    box-shadow: 0 0 8px rgba(255, 61, 113, 0.3);
}

.timeline-text {
    flex: 1;
}

.timeline-action {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 2px;
}

.timeline-time {
    color: var(--text-dim);
    font-size: 10px;
}

.timeline-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.timeline-footer button {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.timeline-footer button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   STATUS BADGES (PULSING DOTS)
   ============================================= */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 5;
}

.status-badge.live {
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
    animation: pulseLive 1.5s ease-in-out infinite;
}

.status-badge.loading-badge {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
    animation: spinBadge 1s linear infinite;
}

.status-badge.error-badge {
    background: var(--error);
    box-shadow: 0 0 8px rgba(255, 61, 113, 0.5);
    animation: flashBadge 0.8s ease-in-out infinite;
}

.status-badge.fast {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.status-badge.fast::after {
    content: '⚡';
    position: absolute;
    top: -6px;
    left: -4px;
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

@keyframes pulseLive {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

@keyframes spinBadge {

    0%,
    100% {
        border-radius: 50%;
        transform: rotate(0deg) scale(1);
    }

    25% {
        border-radius: 30%;
        transform: rotate(90deg) scale(0.8);
    }

    50% {
        border-radius: 50%;
        transform: rotate(180deg) scale(1);
    }

    75% {
        border-radius: 30%;
        transform: rotate(270deg) scale(0.8);
    }
}

@keyframes flashBadge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* =============================================
   SPARKLINE MINI CHARTS
   ============================================= */
.sparkline-container {
    padding: 4px 10px 8px;
    border-bottom: 1px solid var(--border);
}

.sparkline-canvas {
    width: 100%;
    height: 30px;
    display: block;
}

/* =============================================
   DRAG & DROP URL
   ============================================= */
.view-card.drag-over {
    border: 2px dashed var(--gold) !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 30px rgba(255, 215, 0, 0.05) !important;
    transform: scale(1.02);
}

.view-card.drag-over::after {
    content: '📎 Drop URL Here';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10;
    border-radius: inherit;
}

/* =============================================
   REFRESH COUNTDOWN DISPLAY
   ============================================= */
.refresh-countdown {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    margin-left: 4px;
    min-width: 40px;
    display: inline-block;
}

/* =============================================
   SOUND TOGGLE BUTTON
   ============================================= */
.sound-btn.muted {
    opacity: 0.5;
    text-decoration: line-through;
}

/* =============================================
   TRAFFIC COUNTER BADGE
   ============================================= */
.traffic-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    color: var(--gold);
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 5;
}

.traffic-counter .eye-icon {
    font-size: 12px;
}

.traffic-counter .count {
    font-weight: 700;
    min-width: 28px;
    text-align: right;
    transition: all 0.3s ease;
}

/* =============================================
   PERFORMANCE SCORECARD
   ============================================= */
.perf-grade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.perf-grade.grade-a {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.perf-grade.grade-b {
    background: rgba(0, 212, 255, 0.12);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.perf-grade.grade-c {
    background: rgba(255, 170, 0, 0.12);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.perf-grade.grade-d {
    background: rgba(255, 140, 0, 0.12);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.perf-grade.grade-f {
    background: rgba(255, 61, 113, 0.12);
    color: #ff3d71;
    border: 1px solid rgba(255, 61, 113, 0.2);
}

.perf-stars {
    font-size: 10px;
    letter-spacing: 1px;
}

/* =============================================
   CLIPBOARD MANAGER
   ============================================= */
.clipboard-panel {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 400px;
    background: var(--card-solid);
    border-left: 1px solid var(--border);
    z-index: 9998;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px var(--shadow-lg);
}

.clipboard-panel.show {
    right: 0;
}

.clipboard-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clipboard-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.clipboard-title::before {
    content: '◆';
    color: var(--gold);
    font-size: 10px;
}

.clipboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.clip-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.clip-item:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.03);
}

.clip-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.clip-text {
    flex: 1;
    color: var(--text);
    word-break: break-all;
}

.clip-time {
    font-size: 10px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.clip-item .clip-copy {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
}

.clip-item .clip-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   CINEMATIC MODE
   ============================================= */
.cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: #000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cinematic-overlay.show {
    display: flex;
}

.cinematic-view {
    width: 90vw;
    height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.cinematic-view iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.cinematic-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cinematic-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: all 0.2s ease;
}

.cinematic-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.cinematic-label {
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.cinematic-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.cinematic-close:hover {
    border-color: var(--error);
    color: var(--error);
}

/* =============================================
   QR CODE POPUP
   ============================================= */
.qr-popup {
    position: fixed;
    inset: 0;
    z-index: 99997;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
}

.qr-popup.show {
    display: flex;
}

.qr-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 20px 60px var(--shadow-lg);
}

.qr-card h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    margin-bottom: 16px;
}

.qr-canvas {
    margin: 16px auto;
    border-radius: 12px;
    border: 3px solid var(--gold);
    padding: 8px;
    background: #fff;
}

.qr-url {
    font-size: 11px;
    color: var(--text-dim);
    word-break: break-all;
    margin: 12px 0;
}

.qr-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.qr-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    transition: all 0.2s ease;
}

.qr-actions button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   CONNECTION HEALTH MONITOR
   ============================================= */
.conn-monitor {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 9990;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    min-width: 220px;
    box-shadow: 0 8px 30px var(--shadow-lg);
    display: none;
    animation: ctxAppear 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.conn-monitor.show {
    display: block;
}

.conn-monitor-title {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.conn-monitor-title::before {
    content: '◆';
    color: var(--gold);
    font-size: 8px;
}

.conn-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.conn-stat-label {
    color: var(--text-dim);
}

.conn-stat-value {
    color: var(--text);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.conn-stat-value.good {
    color: var(--success);
}

.conn-stat-value.medium {
    color: var(--warning);
}

.conn-stat-value.bad {
    color: var(--error);
}

.conn-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 8px;
    overflow: hidden;
}

.conn-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--gradient-gold);
    transition: width 0.5s ease;
}