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

:root {
    /* ═══ PHANTOM X PALETTE (dari logo) ═══ */
    --bg-dark: #0a0410;
    --bg-card: #150825;
    --bg-card-2: #1a0a2e;

    /* Purple Flame Gradient */
    --flame-light: #f0abfc;
    --flame: #e879f9;
    --flame-deep: #c026d3;
    --flame-dark: #a21caf;

    /* Tengkorak Purple */
    --skull: #a855f7;
    --skull-deep: #7e22ce;
    --skull-dark: #6b21a8;
    --skull-shadow: #3b0764;

    /* Eye Yellow */
    --eye: #fde047;
    --eye-glow: #facc15;

    /* Border */
    --border: #7e22ce;
    --border-soft: #581c87;
    --border-glow: #c026d3;

    /* Text */
    --text: #f3e8ff;
    --muted: #c084fc;
    --muted-dark: #7e22ce;

    /* Semantic */
    --green: #4ade80;
    --red: #f43f5e;
    --orange: #fb923c;

    /* Glow */
    --glow: 0 0 25px rgba(232, 121, 249, 0.6);
    --glow-strong: 0 0 45px rgba(232, 121, 249, 0.9);
    --glow-eye: 0 0 20px rgba(253, 224, 71, 0.7);
}

body {
    font-family: -apple-system, 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    padding: 12px;
    padding-bottom: 90px;
    overflow-x: hidden;
    position: relative;
}

/* Background: purple flame radial */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 38, 211, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 60%, rgba(126, 34, 206, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(168, 85, 247, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(232, 121, 249, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0a0410 0%, #150825 40%, #0a0410 100%);
    pointer-events: none;
    z-index: 0;
}

/* Flame flicker overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 20%, rgba(232, 121, 249, 0.12) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: flameFlicker 4s infinite;
}

@keyframes flameFlicker {
    0%, 100% { opacity: 0.7; }
    25% { opacity: 1; }
    30% { opacity: 0.6; }
    35% { opacity: 0.9; }
    70% { opacity: 1; }
    75% { opacity: 0.7; }
}

body > * { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════
   SPLASH — PHANTOM X LOGO
   ═══════════════════════════════════════════════════════ */
#splash {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(192, 38, 211, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(126, 34, 206, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, #0a0410, #1a0a2e, #0a0410);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s 2.5s forwards;
}

@keyframes fadeOut { to { opacity: 0; pointer-events: none; } }

.splash-content { text-align: center; animation: splashIn 1s; }

@keyframes splashIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.splash-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoPulse 2s infinite;
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 20px var(--flame))
        drop-shadow(0 0 40px var(--flame-deep))
        drop-shadow(0 0 70px var(--skull-dark));
}

/* Fallback SVG kalau logo image gak ada */
.splash-logo svg {
    width: 100%;
    height: 100%;
    fill: var(--flame);
    filter: drop-shadow(0 0 20px var(--flame)) drop-shadow(0 0 40px var(--flame-deep));
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--flame));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 40px var(--flame)) drop-shadow(0 0 60px var(--flame-deep));
    }
}

.splash-title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 12px;
    background: linear-gradient(90deg, #a855f7, #e879f9, #c026d3, #7c3aed);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    animation: gradientShift 3s infinite;
    filter: drop-shadow(0 0 20px rgba(232, 121, 249, 0.7));
    font-style: italic;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.splash-sub {
    font-size: 11px;
    color: var(--flame-light);
    letter-spacing: 6px;
    margin-bottom: 40px;
    text-shadow: 0 0 10px var(--flame);
    font-weight: 700;
}

.splash-loading {
    width: 240px;
    height: 4px;
    background: rgba(192, 38, 211, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(232, 121, 249, 0.4);
}

.splash-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #c026d3, #e879f9, #f0abfc);
    background-size: 300% 100%;
    width: 0%;
    animation: loadBar 2.5s forwards, gradientShift 1.2s infinite;
    box-shadow: 0 0 20px var(--flame), 0 0 40px var(--flame-deep);
}

@keyframes loadBar { to { width: 100%; } }

/* ═══════════════════════════════════════════════════════
   LOGIN — SKULL FLAME BORDER
   ═══════════════════════════════════════════════════════ */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 95vh;
}

.login-card {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 38, 211, 0.2) 0%, transparent 60%),
        linear-gradient(145deg, var(--bg-card), #0a0410);
    border: 1.5px solid var(--border);
    border-radius: 25px;
    padding: 50px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 60px rgba(232, 121, 249, 0.4),
        0 0 100px rgba(126, 34, 206, 0.3),
        inset 0 0 30px rgba(192, 38, 211, 0.15);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--flame), transparent 25%, var(--skull-deep), transparent 50%);
    animation: rotateBorder 5s linear infinite;
    z-index: -1;
    opacity: 0.2;
}

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

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 20px var(--flame))
        drop-shadow(0 0 40px var(--flame-deep));
}

.login-logo svg {
    width: 100%;
    height: 100%;
    fill: var(--flame);
    filter: drop-shadow(0 0 25px var(--flame));
}

.login-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 10px;
    background: linear-gradient(90deg, var(--skull), var(--flame), var(--flame-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    font-style: italic;
    filter: drop-shadow(0 0 15px rgba(232, 121, 249, 0.6));
}

.login-subtitle {
    font-size: 10px;
    color: var(--flame-light);
    letter-spacing: 5px;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 0 0 8px var(--flame);
}

.input-key {
    width: 100%;
    padding: 18px;
    background: #0a0410;
    border: 2px solid var(--border-soft);
    border-radius: 15px;
    color: var(--flame-light);
    font-size: 14px;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    margin-bottom: 20px;
    transition: all 0.3s;
    font-family: inherit;
}

.input-key::placeholder {
    color: var(--muted-dark);
    letter-spacing: 2px;
}

.input-key:focus {
    border-color: var(--flame);
    box-shadow: 0 0 30px rgba(232, 121, 249, 0.8), inset 0 0 15px rgba(192, 38, 211, 0.25);
}

.btn-neon {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--skull-deep), var(--flame-deep), var(--flame));
    background-size: 200% 100%;
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 4px;
    cursor: pointer;
    box-shadow:
        0 0 30px rgba(232, 121, 249, 0.7),
        0 0 60px rgba(192, 38, 211, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    font-family: inherit;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    animation: gradientShift 3s infinite;
}

.btn-neon:active {
    transform: scale(0.97);
    box-shadow: 0 0 50px rgba(232, 121, 249, 1), 0 0 80px rgba(192, 38, 211, 0.8);
}

.error-msg {
    color: var(--red);
    font-size: 12px;
    margin-top: 15px;
    min-height: 16px;
    letter-spacing: 1px;
}

.login-footer {
    margin-top: 30px;
    font-size: 10px;
    color: var(--flame-light);
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--flame);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   HEADER BANNER — PHANTOM X LOGO
   ═══════════════════════════════════════════════════════ */
.app-header { margin-bottom: 15px; }

.banner-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    box-shadow:
        0 0 50px rgba(232, 121, 249, 0.5),
        0 0 100px rgba(126, 34, 206, 0.3),
        inset 0 0 30px rgba(192, 38, 211, 0.15);
    min-height: 150px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(192, 38, 211, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(126, 34, 206, 0.4) 0%, transparent 60%),
        linear-gradient(135deg, #150825, #2a0e4e, #150825);
}

.banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(232, 121, 249, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.35) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.banner-overlay {
    position: relative;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    min-height: 150px;
}

.banner-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: logoPulse 2.5s infinite;
}

.banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 15px var(--flame))
        drop-shadow(0 0 30px var(--flame-deep));
}

.banner-info { flex: 1; min-width: 0; }

.banner-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(90deg, var(--skull), var(--flame), var(--flame-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
    filter: drop-shadow(0 0 10px rgba(232, 121, 249, 0.5));
}

.banner-sub {
    font-size: 9px;
    color: var(--flame-light);
    letter-spacing: 3px;
    margin-top: 3px;
    font-weight: 700;
    text-shadow: 0 0 8px var(--flame);
}

.banner-status { text-align: center; flex-shrink: 0; }

.count-badge {
    display: block;
    font-size: 34px;
    font-weight: 900;
    color: var(--eye);
    text-shadow: 0 0 15px var(--eye-glow), 0 0 30px var(--orange);
    line-height: 1;
    font-style: italic;
}

.count-label {
    font-size: 8px;
    color: var(--flame-light);
    letter-spacing: 2px;
    font-weight: 700;
}

.btn-logout {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(244, 63, 94, 0.25);
    color: #fda4af;
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.btn-logout:active {
    transform: scale(0.95);
    background: rgba(244, 63, 94, 0.5);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.8);
}

/* ═══════════════════════════════════════════════════════
   STATS — SKULL EYE YELLOW
   ═══════════════════════════════════════════════════════ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.stat-card {
    background: linear-gradient(145deg, var(--bg-card), #0a0410);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 14px 6px;
    text-align: center;
    box-shadow: 0 0 20px rgba(192, 38, 211, 0.25), inset 0 0 15px rgba(232, 121, 249, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--flame), transparent);
    opacity: 0.7;
}

.stat-icon {
    width: 22px;
    height: 22px;
    margin: 0 auto 6px;
    color: var(--flame);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px var(--flame));
}

.stat-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--eye);
    text-shadow: 0 0 12px var(--eye-glow);
}

.stat-label {
    font-size: 8px;
    color: var(--muted);
    letter-spacing: 1.5px;
    margin-top: 3px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════ */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.search-bar input {
    flex: 1;
    padding: 14px 16px;
    background: #0a0410;
    border: 1.5px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text);
    font-size: 12px;
    outline: none;
    min-width: 0;
    font-family: inherit;
    transition: all 0.2s;
}

.search-bar input::placeholder {
    color: var(--muted-dark);
}

.search-bar input:focus {
    border-color: var(--flame);
    box-shadow: 0 0 25px rgba(232, 121, 249, 0.6);
}

.btn-refresh {
    background: linear-gradient(135deg, var(--skull-deep), var(--flame-deep), var(--flame));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(232, 121, 249, 0.6);
}

.btn-refresh svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.btn-refresh:active {
    transform: scale(0.95);
    box-shadow: 0 0 35px rgba(232, 121, 249, 1);
}

/* ═══════════════════════════════════════════════════════
   DEVICE CARD — PHANTOM X FRAME
   ═══════════════════════════════════════════════════════ */
.device-card {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 38, 211, 0.15) 0%, transparent 60%),
        linear-gradient(145deg, var(--bg-card), #0a0410);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow:
        0 0 35px rgba(232, 121, 249, 0.3),
        inset 0 0 20px rgba(192, 38, 211, 0.08);
    position: relative;
    overflow: hidden;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--skull), var(--flame), var(--flame-light), var(--flame), var(--skull));
    background-size: 200% 100%;
    animation: gradientShift 3s infinite;
    box-shadow: 0 0 15px var(--flame);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.device-id {
    font-size: 12px;
    font-weight: 900;
    color: var(--flame-light);
    word-break: break-all;
    text-shadow: 0 0 12px var(--flame);
    font-family: monospace;
    letter-spacing: 1px;
}

.device-badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.device-badge.online {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green);
    border: 1px solid var(--green);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(74, 222, 128, 0.6); }
    50% { box-shadow: 0 0 30px rgba(74, 222, 128, 1); }
}

.device-badge.offline {
    background: rgba(244, 63, 94, 0.15);
    color: var(--red);
    border: 1px solid var(--red);
}

.device-info {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 12px;
    max-height: 80px;
    overflow-y: auto;
    font-family: monospace;
    border-left: 3px solid var(--flame);
    word-break: break-all;
    box-shadow: inset 0 0 15px rgba(192, 38, 211, 0.15);
}

/* ═══════════════════════════════════════════════════════
   MENU CATEGORY — FRAMED PHANTOM STYLE
   ═══════════════════════════════════════════════════════ */
.menu-category {
    margin-top: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--flame-light);
    padding: 10px 16px;
    background: linear-gradient(90deg, rgba(192, 38, 211, 0.25), rgba(232, 121, 249, 0.1), transparent);
    border-left: 4px solid var(--flame);
    border-radius: 10px;
    text-shadow: 0 0 12px var(--flame);
    position: relative;
    overflow: hidden;
    font-style: italic;
    box-shadow:
        0 0 20px rgba(232, 121, 249, 0.2),
        inset 0 0 15px rgba(192, 38, 211, 0.1);
}

.menu-category::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--flame-light), var(--flame), var(--flame-deep));
    box-shadow: 0 0 15px var(--flame);
}

.menu-category::after {
    content: '';
    position: absolute;
    right: 0; top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(232, 121, 249, 0.15));
    pointer-events: none;
}

.menu-category.warning {
    color: #fda4af;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.25), rgba(244, 63, 94, 0.05), transparent);
    border-left-color: var(--red);
    text-shadow: 0 0 12px rgba(244, 63, 94, 0.7);
}

.menu-category.warning::before {
    background: linear-gradient(180deg, #fda4af, var(--red), #be123c);
    box-shadow: 0 0 15px var(--red);
}

/* ═══════════════════════════════════════════════════════
   MENU GRID + BUTTONS — PHANTOM X
   ═══════════════════════════════════════════════════════ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.menu-btn {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 38, 211, 0.2) 0%, transparent 70%),
        linear-gradient(145deg, #1f0a3a, var(--bg-card));
    border: 1.5px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px 10px;
    color: var(--text);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 84px;
    justify-content: center;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 15px rgba(192, 38, 211, 0.1);
}

/* Lightning/flame glow border on click */
.menu-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--skull), var(--flame), var(--flame-light), var(--flame-deep), var(--skull));
    background-size: 400% 400%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    animation: gradientShift 2s infinite;
}

.menu-btn:active::before {
    opacity: 1;
}

.menu-btn:active {
    transform: scale(0.95);
    border-color: var(--flame);
    box-shadow:
        0 0 40px rgba(232, 121, 249, 0.9),
        0 0 80px rgba(192, 38, 211, 0.6),
        inset 0 0 20px rgba(232, 121, 249, 0.25);
}

.menu-btn .icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--flame);
    transition: all 0.3s;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px var(--flame));
}

.menu-btn .icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.menu-btn:active .icon {
    color: var(--eye);
    filter:
        drop-shadow(0 0 15px var(--eye))
        drop-shadow(0 0 25px var(--eye-glow));
    transform: scale(1.1);
}

.menu-btn .label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 1.2;
    text-align: center;
    color: var(--text);
}

/* DANGER BUTTON */
.menu-btn.danger {
    border-color: rgba(244, 63, 94, 0.5);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(244, 63, 94, 0.2) 0%, transparent 70%),
        linear-gradient(145deg, #2a0a1a, #1a0510);
}

.menu-btn.danger::before {
    background: linear-gradient(135deg, #be123c, var(--red), #fb7185, var(--red));
    background-size: 400% 400%;
}

.menu-btn.danger .icon {
    color: var(--red);
    filter: drop-shadow(0 0 10px var(--red));
}

.menu-btn.danger .label {
    color: #fda4af;
}

.menu-btn.danger:active {
    border-color: var(--red);
    box-shadow: 0 0 40px rgba(244, 63, 94, 0.9);
}

.menu-btn.danger:active .icon {
    color: #ffffff;
    filter: drop-shadow(0 0 20px var(--red));
}

/* ═══════════════════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10, 4, 16, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 15px;
    border-top: 1.5px solid var(--border);
    box-shadow: 0 -10px 40px rgba(232, 121, 249, 0.4);
    z-index: 100;
}

.bottom-nav::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--flame), var(--flame-light), var(--flame), transparent);
    background-size: 200% 100%;
    animation: gradientShift 3s infinite;
    box-shadow: 0 0 15px var(--flame);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted-dark);
    font-size: 8px;
    letter-spacing: 1.5px;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.3s;
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 800;
    position: relative;
}

.nav-item .icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.nav-item .icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.nav-item.active {
    color: var(--flame-light);
    text-shadow: 0 0 15px var(--flame);
}

.nav-item.active .icon {
    filter:
        drop-shadow(0 0 12px var(--flame))
        drop-shadow(0 0 20px var(--flame-deep));
    transform: scale(1.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--flame);
    box-shadow: 0 0 10px var(--flame);
    border-radius: 1px;
}

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 4, 16, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(145deg, var(--bg-card), #0a0410);
    border: 1.5px solid var(--flame);
    border-radius: 20px;
    padding: 25px;
    max-width: 450px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 60px rgba(232, 121, 249, 0.6);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    color: var(--flame);
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 10px var(--flame);
}

.modal-content img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
    border: 1px solid var(--flame);
    box-shadow: 0 0 30px rgba(232, 121, 249, 0.5);
}

/* ═══════════════════════════════════════════════════════
   RESULT BOX
   ═══════════════════════════════════════════════════════ */
.result-box {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    font-size: 10px;
    color: var(--text);
    border-left: 3px solid var(--flame);
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 0 20px rgba(192, 38, 211, 0.2);
}

.result-box img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--flame);
    box-shadow: 0 0 20px rgba(232, 121, 249, 0.5);
}

.result-box pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: inherit;
    font-size: 10px;
}

.result-type {
    color: var(--flame-light);
    font-size: 10px;
    margin-bottom: 6px;
    letter-spacing: 1.5px;
    font-weight: 800;
    text-shadow: 0 0 8px var(--flame);
}

.btn-stop-stream {
    margin-top: 12px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--red), #be123c);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
    font-family: inherit;
    transition: all 0.2s;
}

.btn-stop-stream:active {
    transform: scale(0.97);
    box-shadow: 0 0 35px rgba(244, 63, 94, 1);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(232, 121, 249, 0.5);
    font-style: italic;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--flame); }

/* Responsive */
@media (min-width: 600px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .menu-grid { grid-template-columns: repeat(4, 1fr); }
}