/* CSS Styling: Minimalist Modern Retro Arcade / Nintendo DS - BGP Group */

:root {
    --bgp-magenta: #e0287d;
    --bgp-dark-magenta: #880e4f;
    --bgp-glow: #ff4081;
    --bgp-deep: #200b2c;
    --console-bg: #141222;
    --screen-bezel: #090810;
    --surface-card: #1b182d;
    --surface-hover: #26223d;
    --accent-gold: #ffc107;
    --accent-cyan: #00e5ff;
    --accent-green: #00e676;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-glass: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle at 50% 20%, #1e1333 0%, #0a0714 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 12px 28px;
    overflow-x: hidden;
}

/* BRAND HEADER: Minimalist & Clean */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
    width: 100%;
    max-width: 860px;
    background: rgba(22, 18, 36, 0.7);
    padding: 10px 20px;
    border-radius: 16px;
    border: 1px solid rgba(224, 40, 125, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.brand-logo-img {
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(224, 40, 125, 0.4));
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff, #ff65a3, #80d0c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.mascot-tag {
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

.btn-retro-avatar {
    background: linear-gradient(135deg, #e0287d 0%, #ff4081 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(224, 40, 125, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-retro-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 40, 125, 0.6);
    filter: brightness(1.1);
}

.btn-retro-gold {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #141222;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    transition: all 0.2s ease;
}

.btn-retro-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
}

/* NINTENDO DS CONSOLE: Sleek Minimalist Housing */
.ds-console {
    width: 100%;
    max-width: 840px;
    background: linear-gradient(175deg, #1d1930 0%, #110e1e 100%);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* TOP SCREEN (ACTION SCREEN) */
.ds-top-screen-housing {
    background: var(--screen-bezel);
    border-radius: 16px;
    padding: 8px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 25px rgba(224, 40, 125, 0.08);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.screen-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 15, 30, 0.9);
    padding: 6px 12px;
    border-radius: 10px 10px 0 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 6px;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hud-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
}

.hud-value {
    color: var(--accent-gold);
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.hud-hp-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hud-hp-bar-container {
    width: 52px;
    height: 8px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
}

.hud-hp-bar-fill {
    height: 100%;
    width: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #00e676, #00c853);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
    transition: width 0.25s ease-out, background 0.3s ease;
}

/* Header Quick Tools */
.hud-tools-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.hud-tool-btn {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.hud-tool-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
    transform: scale(1.04);
}

/* MOBILE VIEW SWITCHER */
.mobile-view-switcher {
    display: none; /* hidden on desktop */
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
    max-width: 840px;
}

.mvs-tab {
    background: rgba(26, 22, 42, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
}

.mvs-tab:hover {
    background: rgba(45, 38, 70, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.mvs-tab.active {
    background: linear-gradient(90deg, var(--bgp-magenta), var(--bgp-glow));
    border-color: #ff65a3;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(224, 40, 125, 0.5);
}

.mvs-tab-tool {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.mvs-tab-tool:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
}

.canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 480;
    overflow: hidden;
    background: #000;
    border-radius: 0 0 10px 10px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Pause Overlay */
.pause-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 8, 20, 0.88);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    z-index: 10;
}

.pause-title {
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
    font-weight: 800;
}

/* Toast Notifications */
.toast-notification {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-90px);
    background: rgba(18, 14, 30, 0.95);
    border: 1.5px solid var(--accent-gold);
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.25);
    z-index: 20;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    max-width: 90%;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
}

.toast-badge {
    font-size: 1.6rem;
}

.toast-text {
    display: flex;
    flex-direction: column;
}

.toast-text strong {
    color: var(--accent-gold);
    font-size: 0.84rem;
}

.toast-text span {
    font-size: 0.76rem;
    color: #cbd5e1;
}

/* HINGE & LEDS: Slim & Minimal */
.ds-hinge-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 12px;
    position: relative;
}

.hinge-joint {
    width: 48px;
    height: 6px;
    background: #110f1c;
    border-radius: 4px;
    border: 1px solid #28243a;
}

.status-leds {
    display: flex;
    gap: 10px;
}

.led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
}

.led-power { background-color: var(--accent-green); color: var(--accent-green); }
.led-wifi { background-color: var(--accent-cyan); color: var(--accent-cyan); }
.led-proactive { background-color: var(--bgp-magenta); color: var(--bgp-magenta); animation: pulseLed 1.4s infinite alternate; }

@keyframes pulseLed {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* BOTTOM SCREEN (TOUCH SCREEN / BUKU SAKU) */
.ds-bottom-screen-housing {
    background: var(--screen-bezel);
    border-radius: 16px;
    padding: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.touch-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.touch-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-retro {
    background: rgba(38, 34, 60, 0.7);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.74rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-retro:hover {
    background: var(--surface-hover);
    border-color: var(--bgp-magenta);
}

.btn-retro.active {
    background: var(--bgp-magenta);
    border-color: var(--bgp-glow);
    box-shadow: 0 0 10px rgba(224, 40, 125, 0.4);
}

/* CODEX GRID & DETAIL LAYOUT: DYNAMIC 10-POINT MASTERPIECE (NO SCROLL) */
.codex-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.codex-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    width: 100%;
    overflow: visible;
}

.codex-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    color: var(--text-primary);
    min-width: 0;
    height: 38px;
}

.codex-card:hover {
    background: var(--surface-hover);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.codex-card.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35), inset 0 0 8px rgba(255, 215, 0, 0.15);
}

.codex-card-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 900;
    font-family: monospace;
    flex-shrink: 0;
}

.codex-card-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
    min-width: 0;
    line-height: 1.15;
}

.codex-num {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.codex-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.codex-status {
    font-size: 0.55rem;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.codex-card.unlocked .codex-status {
    background: rgba(0, 230, 118, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.4);
}

.codex-card.locked .codex-status {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

/* CODEX DETAIL CARD: Widescreen 2-column layout */
.codex-detail-box {
    background: var(--surface-card);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.detail-badge {
    font-size: 1.35rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.detail-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-unlocked {
    background: var(--accent-green);
    color: #0c1b18;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.62rem;
}

.tag-locked {
    background: #475569;
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.62rem;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-top: 1px;
}

.codex-detail-columns {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 10px;
    font-size: 0.78rem;
}

.codex-col-left, .codex-col-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gesture-box-highlight {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.06));
    border: 1px solid rgba(255, 215, 0, 0.35);
    padding: 6px 10px;
    border-radius: 8px;
}

.gesture-text-desc {
    color: #ffffff;
    font-weight: 700;
    margin-top: 2px;
    line-height: 1.3;
    font-size: 0.78rem;
}

.gameplay-effect {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.76rem;
    line-height: 1.3;
}

.detail-quote {
    background: rgba(0, 230, 118, 0.08);
    border-left: 3px solid var(--accent-green);
    padding: 6px 10px;
    border-radius: 0 8px 8px 0;
    font-size: 0.76rem;
    color: #a7f3d0;
    font-style: italic;
    line-height: 1.35;
}

/* Responsive adjustments for codex grid */
@media (max-width: 740px) {
    .codex-detail-columns {
        grid-template-columns: 1fr;
    }
    .codex-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    .codex-card {
        padding: 3px 5px;
        gap: 5px;
    }
    .codex-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .codex-card-info {
        display: none;
    }
    .codex-card {
        justify-content: center;
        padding: 4px;
    }
    .codex-card-icon {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }
}

/* VIRTUAL TOUCH CONTROLS (FROSTED GLASS) */
.touch-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 15, 30, 0.85);
    padding: 8px 16px;
    border-radius: 12px;
    margin-top: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.action-buttons-group {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(40, 36, 62, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.08s ease, background 0.15s ease;
    touch-action: manipulation;
}

.control-btn:active, .control-btn.active {
    transform: scale(0.9);
    background: var(--bgp-magenta);
    border-color: var(--bgp-glow);
}

.btn-jump {
    background: rgba(0, 230, 118, 0.2);
    border-color: var(--accent-green);
    color: #a7f3d0;
}

.btn-shoot {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    color: #e9d5ff;
}

.btn-interact {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fde68a;
    border-radius: 12px;
    font-size: 0.74rem;
    width: 50px;
}

/* SPRINT / STAGE INFORMATION TRACK (NON-CLICKABLE PROGRESS INDICATORS) */
.sprint-info-track,
.sprint-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
    pointer-events: none; /* Disable all clicks/interactions */
    user-select: none;
}

.sprint-info-badge,
.sprint-select-btn {
    background: rgba(24, 20, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sprint-info-badge.active {
    border-color: rgba(0, 229, 255, 0.8);
    background: rgba(0, 229, 255, 0.14);
    color: #00e5ff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.sprint-info-badge.completed {
    border-color: rgba(0, 230, 118, 0.6);
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    font-weight: 600;
}

.sprint-info-badge.locked {
    opacity: 0.6;
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.06);
}

.stage-status-icon {
    font-size: 0.78rem;
}

/* MODALS: Minimalist Glassmorphic */
.game-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(6, 4, 14, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 250;
    backdrop-filter: blur(8px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.modal-content {
    background: linear-gradient(155deg, #221c38 0%, #120f22 100%);
    border: 1px solid rgba(224, 40, 125, 0.35);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(224, 40, 125, 0.2);
    text-align: center;
    color: #fff;
    animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-logo {
    height: 38px;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-weight: 800;
}

.modal-body {
    font-size: 0.84rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 18px;
}

.victory-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(14, 11, 24, 0.85);
    padding: 10px;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.victory-stats div {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.victory-stats strong {
    font-size: 1.05rem;
    color: var(--accent-gold);
    margin-top: 3px;
}

.golive-badge {
    background: linear-gradient(90deg, rgba(224, 40, 125, 0.3), rgba(136, 14, 79, 0.3));
    padding: 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 8px;
    border: 1px solid var(--bgp-magenta);
}

.btn-primary {
    background: linear-gradient(90deg, var(--bgp-magenta), var(--bgp-glow));
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(224, 40, 125, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 40, 125, 0.6);
}

/* TUTORIAL MODAL SPECIFICS */
.tutorial-modal-content {
    max-width: 820px;
    width: min(94vw, 820px);
    max-height: 92vh;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    padding: 16px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-x-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    z-index: 10;
}

.modal-x-btn:hover {
    color: var(--bgp-glow);
}

.tutorial-header {
    text-align: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.tutorial-header .modal-logo {
    height: 30px;
    margin-bottom: 3px;
}

.tutorial-header .modal-title {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.tutorial-subtitle {
    font-size: 0.74rem;
    color: var(--bgp-glow);
    font-weight: 600;
}

.tutorial-tabs {
    display: flex;
    gap: 6px;
    background: rgba(14, 11, 24, 0.8);
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.tut-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 4px;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-align: center;
}

.tut-tab.active {
    background: var(--bgp-magenta);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(224, 40, 125, 0.35);
}

.tutorial-body-scrollable {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}

.tutorial-body-scrollable::-webkit-scrollbar {
    width: 5px;
}

.tutorial-body-scrollable::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tutorial-body-scrollable::-webkit-scrollbar-thumb {
    background: var(--bgp-magenta);
    border-radius: 3px;
}

.tut-step-content {
    display: none;
}

.tut-step-content.active {
    display: block;
}

.tut-step1-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.tut-hero-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 0;
    box-sizing: border-box;
    height: 100%;
}

.tut-hero-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tut-info-card {
    background: rgba(22, 18, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    box-sizing: border-box;
    height: 100%;
}

.controls-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px;
    background: rgba(22, 18, 36, 0.85);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.control-guide-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.key-combo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.key-badge {
    background: #25203a;
    border: 1px solid #3e365e;
    border-bottom: 2px solid #161226;
    color: var(--accent-cyan);
    font-family: monospace;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.proactive-tut-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.proactive-tut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(24, 20, 38, 0.85);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.proactive-tut-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hazard-tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.hazard-card {
    background: rgba(24, 20, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.hazard-card strong {
    font-size: 0.78rem;
    color: var(--accent-gold);
}

.hazard-card span:last-child {
    font-size: 0.7rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.tutorial-nav-buttons {
    display: flex;
    gap: 8px;
}

/* FOOTER */
.page-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.page-footer strong {
    color: var(--text-primary);
}

/* RETRO GOLD BUTTON & HEADER ACTIONS */
.btn-retro-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 165, 0, 0.25));
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.btn-retro-gold:hover {
    background: #ffd700;
    color: #1a1829;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

.header-action-wrap {
    margin-left: auto;
}

/* PROACTIVE UNLOCK MODAL (PAUSE INTERAKTIF - SINGLE GLANCE NO SCROLL) */
.proactive-unlock-content {
    max-width: 780px;
    width: min(94vw, 780px);
    text-align: left;
    padding: 12px 18px;
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.unlock-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.unlock-badge-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.unlock-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.unlock-subtitle {
    font-size: 0.66rem;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.unlock-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 1px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unlock-acronym-tag {
    font-size: 0.68rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* 2-Column Grid Layout for Proactive Modal */
.unlock-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
    flex: 1 1 auto;
}

.unlock-col-left, .unlock-col-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: space-between;
}

.gesture-showcase-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.14), rgba(255, 165, 0, 0.07));
    border: 1.5px solid #ffd700;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 0;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.12);
    box-sizing: border-box;
    flex: 1;
}

.gesture-icon-badge {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.gesture-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gesture-label {
    font-size: 0.68rem;
    color: #ffd700;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.gesture-desc {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 1px;
    line-height: 1.3;
}

/* Superpower Showcase Box */
.superpower-showcase-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 8px 12px;
    box-sizing: border-box;
    flex: 1;
    transition: all 0.2s ease;
}

.superpower-showcase-box.has-superpower {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.16), rgba(255, 113, 206, 0.1));
    border: 1.5px solid #ffd700;
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.18);
}

.superpower-showcase-box.is-mindset {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), rgba(124, 131, 253, 0.1));
    border: 1.5px solid #00e5ff;
    box-shadow: 0 3px 12px rgba(0, 229, 255, 0.18);
}

.superpower-icon-badge {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.superpower-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.superpower-label {
    font-size: 0.68rem;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.superpower-desc {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 1px;
    line-height: 1.3;
}

.unlock-info-card {
    background: rgba(22, 18, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    flex: 1.1;
}

.unlock-section strong {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 1px;
}

.unlock-section p {
    font-size: 0.76rem;
    color: #e2e8f0;
    line-height: 1.3;
}

.unlock-quote {
    font-style: italic;
    color: #fbc2eb !important;
}

.commitment-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.35);
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 0;
    box-sizing: border-box;
    flex: 0.9;
}

.commitment-check {
    font-size: 1.1rem;
    color: var(--accent-green);
    flex-shrink: 0;
}

.commitment-text strong {
    font-size: 0.68rem;
    color: var(--accent-green);
    letter-spacing: 0.5px;
    display: block;
}

.commitment-text p {
    font-size: 0.74rem;
    color: #ffffff;
    font-weight: 600;
    margin-top: 1px;
    line-height: 1.25;
}

.unlock-footer {
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-primary-confirm {
    background: linear-gradient(90deg, #00e676, #00b0ff);
    color: #0c1b18;
    border: none;
    width: 100%;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 230, 118, 0.35);
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    touch-action: manipulation;
}

.btn-primary-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.5);
}

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

.unlock-footer-hint {
    font-size: 0.66rem;
    color: #94a3b8;
    margin-top: 3px;
}

/* LEADERBOARD MODAL STYLES */
.leaderboard-modal-content {
    max-width: 680px;
    width: 95%;
    text-align: left;
    padding: 20px 24px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 12px;
}

.leaderboard-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.prize-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(224, 40, 125, 0.2));
    border: 1px solid #ffd700;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.2);
}

.prize-gift-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.prize-text strong {
    font-size: 0.82rem;
    color: #ffd700;
    letter-spacing: 0.5px;
    display: block;
}

.prize-text p {
    font-size: 0.78rem;
    color: #f1f5f9;
    margin-top: 2px;
    line-height: 1.35;
}

/* LEADERBOARD INFO & ADMIN TOOLBAR */
.leaderboard-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(22, 18, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.info-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.info-tag {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.info-text {
    color: #cbd5e1;
    font-size: 0.76rem;
}

.btn-admin-toggle {
    background: rgba(224, 40, 125, 0.15);
    border: 1px solid var(--bgp-magenta);
    color: #ff65a3;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-admin-toggle:hover, .btn-admin-toggle.active {
    background: var(--bgp-magenta);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(224, 40, 125, 0.4);
}

/* ADMIN CONTROLS BAR */
.admin-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(224, 40, 125, 0.2), rgba(30, 24, 48, 0.95));
    border: 1.5px solid var(--bgp-magenta);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-badge {
    background: var(--bgp-magenta);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.admin-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-admin-sm {
    background: rgba(38, 34, 60, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-admin-sm:hover {
    background: var(--surface-hover);
    border-color: #ffd700;
    color: #ffd700;
}

.btn-admin-add {
    background: rgba(0, 230, 118, 0.2);
    border-color: var(--accent-green);
    color: #a7f3d0;
}
.btn-admin-add:hover {
    background: var(--accent-green);
    color: #0c1b18;
}

.btn-admin-reset {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}
.btn-admin-reset:hover {
    background: #ef4444;
    color: #fff;
}

.btn-admin-exit {
    background: rgba(148, 163, 184, 0.2);
    border-color: #94a3b8;
    color: #e2e8f0;
}

/* TABLE ROW ACTION BUTTONS FOR ADMIN */
.admin-th-col {
    width: 120px;
    text-align: center !important;
}

.admin-td-actions {
    text-align: center !important;
    white-space: nowrap;
}

.btn-row-action {
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.1s ease;
    margin: 0 2px;
}

.btn-row-action:hover {
    transform: scale(1.08);
}

.btn-edit-row {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
}

.btn-del-row {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid #ef4444;
}

.leaderboard-table-wrap {
    max-height: 260px;
    overflow-y: auto;
    background: rgba(16, 13, 26, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.leaderboard-table th {
    background: rgba(30, 24, 48, 0.95);
    color: #94a3b8;
    padding: 8px 10px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rank-gold {
    background: rgba(255, 215, 0, 0.12) !important;
    color: #ffd700;
    font-weight: 700;
}

.rank-silver {
    background: rgba(192, 192, 192, 0.1) !important;
    color: #e2e8f0;
    font-weight: 600;
}

.rank-bronze {
    background: rgba(205, 127, 50, 0.1) !important;
    color: #f6ad55;
    font-weight: 600;
}

.rank-cell {
    white-space: nowrap;
}

.score-cell {
    font-family: monospace;
    font-weight: 700;
    color: #ffd700;
}

.time-cell {
    font-family: monospace;
    color: var(--accent-cyan);
}

.leaderboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.leaderboard-rule {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* MASTERPIECE FINALE CARDS GALLERY */
.masterpiece-showcase-container {
    margin: 14px 0;
    padding: 12px;
    background: rgba(18, 14, 30, 0.9);
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.masterpiece-showcase-header {
    text-align: center;
    margin-bottom: 10px;
}

.masterpiece-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 600px) {
    .masterpiece-cards-grid {
        grid-template-columns: 1fr;
    }
}

.final-masterpiece-card {
    background: rgba(26, 21, 42, 0.85);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fmc-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-family: monospace;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fmc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fmc-title {
    font-size: 0.78rem;
    color: #ffffff;
}

.fmc-gesture {
    font-size: 0.7rem;
    color: #ffd700;
}

.fmc-commit {
    font-size: 0.68rem;
    font-style: italic;
    color: #cbd5e1;
}

/* SAVE SCORE FORM IN VICTORY */
.save-score-section {
    background: rgba(22, 18, 36, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 10px;
    text-align: left;
}

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

.name-save-input-group input {
    flex: 1;
    background: #141122;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
}

.name-save-input-group input:focus {
    border-color: #ffd700;
}

.save-feedback-text {
    font-size: 0.76rem;
    margin-top: 6px;
    font-weight: 600;
}

/* ============================================================
   SHARE HIGH SCORE MODAL & PREVIEW CARD
   ============================================================ */
.share-score-content {
    max-width: 480px;
    width: 95%;
    background: linear-gradient(160deg, #18132e 0%, #0d0a1b 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 215, 0, 0.2);
}

.share-preview-card {
    background: linear-gradient(145deg, #1e1838, #120e24);
    border: 1.5px solid rgba(255, 215, 0, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.share-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e0287d, #ffd700, #00e5ff);
}

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

.spc-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--bgp-magenta);
    background: rgba(224, 40, 125, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(224, 40, 125, 0.25);
}

.spc-player-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.spc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.spc-stat-box {
    background: rgba(14, 11, 25, 0.8);
    border-radius: 8px;
    padding: 8px 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.spc-stat-label {
    font-size: 0.62rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 3px;
}

.spc-stat-val {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: monospace;
}

.spc-stat-val.gold {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.spc-stat-val.cyan {
    color: var(--accent-cyan);
}

.spc-stat-val.green {
    color: #00e676;
}

.spc-quote {
    font-size: 0.74rem;
    font-style: italic;
    color: #cbd5e1;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    line-height: 1.35;
}

.share-actions-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-share-channel {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-share-channel:hover {
    transform: translateY(-2px);
}

.btn-wa {
    background: #25D366;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-wa:hover {
    background: #1ebc59;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-copy {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
    border: 1.5px solid #00e5ff;
}

.btn-copy:hover {
    background: #00e5ff;
    color: #0c1b18;
    box-shadow: 0 4px 14px rgba(0, 229, 255, 0.4);
}

.btn-native {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1.5px solid #ffd700;
}

.btn-native:hover {
    background: #ffd700;
    color: #0c1b18;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
}

.btn-share-row {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
    border: 1px solid #00e5ff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-share-row:hover {
    background: #00e5ff;
    color: #0c1b18;
    transform: scale(1.06);
}

/* ============================================================
   WORK REMINDER MODAL (STAGE 3 PLAYTIME LIMIT)
   ============================================================ */
.work-reminder-content {
    max-width: 480px;
    width: 95%;
    border-color: #ff9f43 !important;
    box-shadow: 0 16px 50px rgba(0,0,0,0.85), 0 0 35px rgba(255, 159, 67, 0.4) !important;
    background: linear-gradient(165deg, #241926 0%, #150f1d 100%);
    animation: reminderPulse 2s infinite alternate;
}

@keyframes reminderPulse {
    0% {
        box-shadow: 0 16px 50px rgba(0,0,0,0.85), 0 0 25px rgba(255, 159, 67, 0.3);
    }
    100% {
        box-shadow: 0 16px 50px rgba(0,0,0,0.85), 0 0 40px rgba(255, 159, 67, 0.6);
    }
}

.reminder-badge {
    display: inline-block;
    background: rgba(255, 159, 67, 0.18);
    border: 1px solid #ff9f43;
    color: #ffbe76;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.reminder-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   ON-CANVAS MOBILE TOUCH CONTROLS
   ============================================================ */
.canvas-onscreen-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 8;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px 10px;
}

.canvas-ctrl-group {
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.canvas-ctrl-left {
    align-items: flex-end;
}

.canvas-ctrl-right {
    align-items: flex-end;
    gap: 5px;
}

.canvas-ctrl-center-guide {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.canvas-guide-pill {
    background: rgba(15, 12, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.canvas-btn {
    background: rgba(18, 14, 30, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: #ffffff;
    min-width: 52px;
    height: 52px;
    padding: 2px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    opacity: 0.95;
}

.canvas-btn .cb-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.canvas-btn .cb-text {
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Button Variants */
.canvas-btn-dir {
    border-color: rgba(0, 229, 255, 0.5);
    color: #00e5ff;
}
.canvas-btn-dir:hover, .canvas-btn-dir.active {
    background: rgba(0, 229, 255, 0.35);
    border-color: #00e5ff;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.65);
    transform: scale(0.92);
}

.canvas-btn-jump {
    border-color: rgba(255, 215, 0, 0.65);
    color: #ffd700;
    min-width: 62px;
    height: 62px;
}
.canvas-btn-jump:hover, .canvas-btn-jump.active {
    background: rgba(255, 215, 0, 0.35);
    border-color: #ffd700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.75);
    transform: scale(0.92);
}

.canvas-btn-shoot {
    border-color: rgba(224, 40, 125, 0.55);
    color: #ff65a3;
    min-width: 52px;
    height: 52px;
}
.canvas-btn-shoot:hover, .canvas-btn-shoot.active {
    background: rgba(224, 40, 125, 0.35);
    border-color: #ff65a3;
    box-shadow: 0 0 16px rgba(224, 40, 125, 0.75);
    transform: scale(0.92);
}

.canvas-btn-interact {
    border-color: rgba(0, 230, 118, 0.5);
    color: #00e676;
    min-width: 52px;
    height: 52px;
}
.canvas-btn-interact:hover, .canvas-btn-interact.active {
    background: rgba(0, 230, 118, 0.35);
    border-color: #00e676;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.65);
    transform: scale(0.92);
}

/* Dynamic Button States: Dimmed, Locked & Contextual Can-Interact */
.canvas-btn.btn-dimmed {
    opacity: 0.32 !important;
    filter: grayscale(40%);
    box-shadow: none !important;
}

.canvas-btn.btn-locked {
    opacity: 0.35 !important;
    filter: grayscale(60%);
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

.canvas-btn.can-interact {
    opacity: 1 !important;
    border-color: #00e676 !important;
    background: rgba(0, 230, 118, 0.38) !important;
    box-shadow: 0 0 18px rgba(0, 230, 118, 0.8) !important;
    animation: pulseGreenGlow 1.2s infinite ease-in-out;
}

@keyframes pulseGreenGlow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(0, 230, 118, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px rgba(0, 230, 118, 0.95);
        transform: scale(1.06);
    }
}

@media (max-width: 640px) {
    .canvas-onscreen-controls {
        padding: 6px 8px;
    }
    .canvas-btn {
        min-width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    .canvas-btn .cb-icon {
        font-size: 1.25rem;
    }
    .canvas-btn .cb-text {
        font-size: 0.52rem;
    }
    .canvas-btn-jump {
        min-width: 62px;
        height: 62px;
    }
    .canvas-btn-jump .cb-icon {
        font-size: 1.5rem;
    }
    .canvas-ctrl-center-guide {
        display: none;
    }
}

/* ============================================================
   TUTORIAL STEP 3: 10 POIN MASTERPIECE (POWER-UP VS MINDSET)
   ============================================================ */
.tut-step-header-box {
    text-align: left;
}

.proactive-tut-scroll-container {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.proactive-category-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 8px;
}

.cat-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.pill-powerup {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid #ffd700;
    color: #ffd700;
}

.pill-mindset {
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid #00e5ff;
    color: #00e5ff;
}

.cat-sub {
    font-size: 0.68rem;
    color: #94a3b8;
}

.proactive-tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .proactive-tut-grid {
        grid-template-columns: 1fr;
    }

    .tut-step1-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .controls-guide-grid {
        grid-template-columns: 1fr;
    }

    .hazard-tut-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .unlock-body-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.proactive-card-item {
    background: rgba(22, 18, 36, 0.85);
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.proactive-card-item.has-powerup {
    border-left: 3.5px solid #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.08);
}

.proactive-card-item.no-powerup {
    border-left: 3.5px solid #00e5ff;
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.08);
}

.pci-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pci-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pci-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pci-title {
    font-size: 0.76rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pci-effect-tag {
    font-size: 0.65rem;
    font-weight: 700;
}

.tag-powerup {
    color: #ffd700;
}

.tag-mindset {
    color: #00e5ff;
}

.pci-desc {
    font-size: 0.7rem;
    color: #cbd5e1;
    line-height: 1.35;
    margin: 0;
}

/* ============================================================
   MOBILE ADAPTIVE LAYOUT (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        background: #090812;
    }

    .brand-header {
        width: 100vw;
        max-width: 100vw;
        margin-bottom: 0;
        padding: 6px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        gap: 8px;
    }

    .brand-logo-img {
        height: 28px;
    }

    .brand-title {
        font-size: 0.92rem;
    }

    .brand-subtitle {
        font-size: 0.68rem;
    }

    .mascot-tag {
        font-size: 0.64rem;
        padding: 1px 6px;
    }

    /* Mobile View Switcher */
    .mobile-view-switcher {
        display: flex;
        padding: 6px 10px;
        margin-bottom: 0;
        width: 100vw;
        max-width: 100vw;
        background: rgba(14, 11, 24, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .mvs-tab {
        padding: 5px 11px;
        font-size: 0.72rem;
        border-radius: 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* DS Console Edge-to-Edge */
    .ds-console {
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        gap: 0;
    }

    .ds-top-screen-housing {
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #000;
    }

    .screen-header-bar {
        padding: 4px 8px;
        font-size: 0.72rem;
        gap: 4px;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
    }

    .hud-item {
        padding: 2px 6px;
        gap: 4px;
        font-size: 0.68rem;
    }

    .hud-label {
        font-size: 0.62rem;
    }

    .hud-hp-bar-container {
        width: 38px;
        height: 7px;
    }

    .hud-value {
        font-size: 0.72rem;
    }

    .canvas-container {
        width: 100vw;
        max-width: 100vw;
        aspect-ratio: 800 / 480;
        border-radius: 0;
    }

    #gameCanvas {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        display: block;
    }

    .ds-hinge-section {
        display: none;
    }

    /* Bottom Screen Housing */
    .ds-bottom-screen-housing {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 10px 8px;
    }

    /* Bottom Screen: Always fully displayed in Portrait for complete Nintendo DS dual-screen experience */
    #dsBottomScreen {
        display: flex !important;
    }

    /* Modal responsiveness on mobile */
    .game-modal {
        padding: 8px;
    }

    .modal-content, .leaderboard-modal-content {
        width: 100%;
        max-width: 100%;
        padding: 14px 12px;
        max-height: 92vh;
        max-height: 92dvh;
        overflow-y: auto;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .tutorial-modal-content {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px;
        max-height: 92vh;
        max-height: 92dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 14px;
        box-sizing: border-box;
    }

    /* Codex Grid on Mobile */
    .codex-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* ============================================================
   MOBILE LANDSCAPE FULLSCREEN & HANDHELD EXPERIENCE
   ============================================================ */
@media (orientation: landscape) and (max-height: 550px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: #000 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
    }

    .brand-header {
        display: none !important;
    }

    .mobile-view-switcher {
        display: none !important;
    }

    .ds-hinge-section,
    #dsBottomScreen,
    .ds-bottom-screen-housing {
        display: none !important;
    }

    .ds-console,
    .ds-top-screen-housing {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background: #000 !important;
        overflow: hidden !important;
        z-index: 10 !important;
    }

    .screen-header-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 95 !important;
        background: rgba(10, 8, 20, 0.88) !important;
        backdrop-filter: blur(8px) !important;
        padding: max(3px, env(safe-area-inset-top, 3px)) max(12px, env(safe-area-inset-right, 12px)) 3px max(12px, env(safe-area-inset-left, 12px)) !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }

    .hud-hp-bar-container {
        width: 36px !important;
        height: 7px !important;
    }

    .canvas-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        aspect-ratio: unset !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #000 !important;
        overflow: hidden !important;
        z-index: 15 !important;
    }

    #gameCanvas {
        width: 100% !important;
        height: 100% !important;
        max-height: 100dvh !important;
        object-fit: contain !important;
        display: block !important;
    }

    /* Sembunyikan guide text tengah di landscape agar tidak overlap dengan HUD */
    .canvas-ctrl-center-guide {
        display: none !important;
    }

    /* Fixed Viewport Onscreen Controls: Dijamin tidak terpotong di browser mobile */
    .canvas-onscreen-controls {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        pointer-events: none !important;
        z-index: 100 !important;
        display: block !important;
        padding: 0 !important;
    }

    .canvas-ctrl-left {
        position: absolute !important;
        left: max(16px, env(safe-area-inset-left, 16px)) !important;
        bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
        display: flex !important;
        gap: 10px !important;
        pointer-events: auto !important;
    }

    .canvas-ctrl-right {
        position: absolute !important;
        right: max(16px, env(safe-area-inset-right, 16px)) !important;
        bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
        display: flex !important;
        align-items: flex-end !important;
        gap: 8px !important;
        pointer-events: auto !important;
    }

    .canvas-btn {
        width: 58px !important;
        height: 58px !important;
        min-width: 58px !important;
        border-radius: 50% !important;
        background: rgba(18, 14, 30, 0.85) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65) !important;
    }

    .canvas-btn .cb-icon {
        font-size: 1.45rem !important;
    }

    .canvas-btn .cb-text {
        font-size: 0.54rem !important;
    }

    .canvas-btn-jump {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        border-radius: 50% !important;
        border-color: #ffd700 !important;
        background: rgba(255, 215, 0, 0.3) !important;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5) !important;
    }

    .canvas-btn-jump .cb-icon {
        font-size: 1.7rem !important;
    }

    /* ========================================================
       MODALS IN MOBILE LANDSCAPE (Auto Adapt Size & Width)
       ======================================================== */
    .game-modal {
        padding: 4px 6px !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 300 !important;
    }

    .modal-content {
        max-height: 96vh !important;
        max-height: 96dvh !important;
        overflow-y: auto !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .tutorial-modal-content {
        width: 95vw !important;
        max-width: 860px !important;
        max-height: 96vh !important;
        max-height: 96dvh !important;
        padding: 8px 14px !important;
    }

    .modal-x-btn {
        top: 6px !important;
        right: 10px !important;
        font-size: 1.4rem !important;
    }

    .tutorial-header {
        margin-bottom: 4px !important;
    }

    .tutorial-header .modal-logo {
        height: 22px !important;
        margin-bottom: 1px !important;
    }

    .tutorial-header .modal-title {
        font-size: 0.95rem !important;
        margin-bottom: 1px !important;
    }

    .tutorial-subtitle {
        font-size: 0.68rem !important;
    }

    .tutorial-tabs {
        margin-bottom: 5px !important;
        padding: 2px !important;
        gap: 4px !important;
    }

    .tut-tab {
        padding: 3px 6px !important;
        font-size: 0.68rem !important;
    }

    .tutorial-body-scrollable {
        padding-right: 4px !important;
    }

    /* Step 1 Landscape: 2-column side-by-side */
    .tut-step1-grid {
        display: grid !important;
        grid-template-columns: 1.15fr 1fr !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .tut-hero-box {
        padding: 6px 10px !important;
        gap: 8px !important;
        margin-bottom: 0 !important;
    }

    .tut-hero-avatar {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.2rem !important;
    }

    .tut-hero-box h4 {
        font-size: 0.82rem !important;
        margin-bottom: 2px !important;
    }

    .tut-hero-box p {
        font-size: 0.72rem !important;
        line-height: 1.35 !important;
    }

    .tut-info-card {
        padding: 6px 10px !important;
    }

    .tut-info-card h5 {
        font-size: 0.82rem !important;
        margin-bottom: 2px !important;
    }

    .tut-info-card p {
        font-size: 0.72rem !important;
        line-height: 1.35 !important;
    }

    /* Step 2 Landscape: 2-column grid */
    .controls-guide-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
        padding: 6px 8px !important;
    }

    .control-guide-item {
        font-size: 0.72rem !important;
        padding: 3px 6px !important;
    }

    .key-badge {
        font-size: 0.66rem !important;
        padding: 1px 4px !important;
    }

    .tut-mobile-tip {
        margin-top: 5px !important;
        padding: 5px 8px !important;
    }

    .tut-mobile-tip p {
        font-size: 0.7rem !important;
    }

    /* Step 3 Landscape */
    .proactive-category-header {
        margin-bottom: 4px !important;
        gap: 2px !important;
    }

    .cat-pill {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }

    .cat-sub {
        font-size: 0.62rem !important;
    }

    .proactive-tut-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
        margin-bottom: 4px !important;
    }

    .proactive-card-item {
        padding: 5px 8px !important;
        gap: 2px !important;
    }

    .pci-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.64rem !important;
    }

    .pci-title {
        font-size: 0.72rem !important;
    }

    .pci-effect-tag {
        font-size: 0.62rem !important;
    }

    .pci-desc {
        font-size: 0.66rem !important;
        line-height: 1.25 !important;
    }

    /* Step 4 Landscape: 4-column horizontal */
    .hazard-tut-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
    }

    .hazard-card {
        padding: 5px 6px !important;
        gap: 2px !important;
    }

    .hazard-card span:first-child {
        font-size: 1.15rem !important;
    }

    .hazard-card strong {
        font-size: 0.72rem !important;
    }

    .hazard-card span:last-child {
        font-size: 0.64rem !important;
        line-height: 1.2 !important;
    }

    /* Footer in Landscape */
    .tutorial-footer {
        margin-top: 5px !important;
        padding-top: 4px !important;
        gap: 6px !important;
    }

    .tutorial-checkbox-box label {
        font-size: 0.68rem !important;
    }

    .tutorial-nav-buttons .btn-retro,
    .tutorial-nav-buttons .btn-primary {
        padding: 4px 12px !important;
        font-size: 0.74rem !important;
    }

    /* Proactive Unlock Modal in Landscape (NO SCROLL - Single Glance 100% Fit) */
    .proactive-unlock-content {
        width: 95vw !important;
        max-width: 800px !important;
        max-height: 96vh !important;
        max-height: 96dvh !important;
        padding: 8px 14px !important;
        overflow: hidden !important;
    }

    .unlock-header {
        gap: 8px !important;
        margin-bottom: 5px !important;
        padding-bottom: 4px !important;
    }

    .unlock-badge-circle {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.1rem !important;
    }

    .unlock-subtitle {
        font-size: 0.62rem !important;
    }

    .unlock-title {
        font-size: 0.92rem !important;
        margin: 0 !important;
    }

    .unlock-acronym-tag {
        font-size: 0.64rem !important;
    }

    .unlock-body-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        margin-bottom: 5px !important;
    }

    .gesture-showcase-box,
    .superpower-showcase-box {
        padding: 5px 8px !important;
        gap: 6px !important;
        border-radius: 8px !important;
    }

    .gesture-icon-badge,
    .superpower-icon-badge {
        font-size: 1.15rem !important;
    }

    .gesture-label,
    .superpower-label {
        font-size: 0.64rem !important;
    }

    .gesture-desc,
    .superpower-desc {
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
    }

    .unlock-info-card {
        padding: 5px 8px !important;
        gap: 2px !important;
        border-radius: 8px !important;
    }

    .unlock-section strong {
        font-size: 0.66rem !important;
        margin-bottom: 0 !important;
    }

    .unlock-section p {
        font-size: 0.7rem !important;
        line-height: 1.25 !important;
    }

    .commitment-card {
        padding: 5px 8px !important;
        gap: 6px !important;
        border-radius: 8px !important;
    }

    .commitment-check {
        font-size: 1rem !important;
    }

    .commitment-text strong {
        font-size: 0.64rem !important;
    }

    .commitment-text p {
        font-size: 0.7rem !important;
        line-height: 1.25 !important;
    }

    .btn-primary-confirm {
        padding: 6px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 16px !important;
    }

    .unlock-footer-hint {
        font-size: 0.62rem !important;
        margin-top: 2px !important;
    }

    /* Dialogue Modal (No Scroll) */
    #dialogueModal .modal-content {
        max-width: min(88vw, 420px) !important;
        padding: 10px 14px !important;
        overflow: hidden !important;
    }
    #dialogueModal .modal-title {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    #dialogueModal .modal-body {
        font-size: 0.78rem !important;
        margin-bottom: 8px !important;
        line-height: 1.35 !important;
    }
    #dialogueModal .btn-primary, #dialogueModal .modal-close-btn {
        padding: 6px 16px !important;
        font-size: 0.78rem !important;
    }

    /* Game Over Modal (No Scroll) */
    #gameOverModal .modal-content {
        max-width: min(88vw, 400px) !important;
        padding: 10px 14px !important;
        overflow: hidden !important;
    }
    #gameOverModal .modal-title {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    #gameOverModal .modal-body {
        font-size: 0.78rem !important;
        margin-bottom: 8px !important;
    }
    #gameOverModal .btn-primary {
        padding: 6px 16px !important;
        font-size: 0.78rem !important;
    }

    /* Work Reminder Modal (No Scroll) */
    #workReminderModal .modal-content {
        max-width: min(92vw, 560px) !important;
        padding: 8px 14px !important;
        overflow: hidden !important;
    }
    #workReminderModal .modal-title {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
    }
    #workReminderModal .reminder-badge {
        font-size: 0.66rem !important;
        margin-bottom: 4px !important;
        padding: 2px 6px !important;
    }
    #workReminderModal .modal-body {
        padding: 6px 10px !important;
        font-size: 0.72rem !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }
    #workReminderModal .reminder-actions button {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
    }

    /* Victory Modal in Landscape */
    #victoryModal .modal-content {
        max-width: min(92vw, 620px) !important;
        padding: 8px 14px !important;
    }
    #victoryModal .modal-logo {
        height: 22px !important;
        margin-bottom: 2px !important;
    }
    #victoryModal .modal-title {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    #victoryModal .modal-body {
        font-size: 0.75rem !important;
        margin-bottom: 6px !important;
    }
    #victoryModal .victory-actions button {
        padding: 5px 12px !important;
        font-size: 0.74rem !important;
    }

    /* Other Modals in Landscape */
    .leaderboard-modal-content,
    .share-score-content,
    .work-reminder-content {
        width: 95vw !important;
        max-width: 760px !important;
    }
}

/* ============================================================
   LANDSCAPE PROMPT MODAL STYLES
   ============================================================ */
.landscape-prompt-content {
    max-width: 400px;
    text-align: center;
    background: linear-gradient(160deg, #241a3e 0%, #120b22 100%);
    border: 2px solid #ffd700;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 215, 0, 0.35);
    border-radius: 20px;
    padding: 22px 18px;
    position: relative;
    color: #ffffff;
}

.rotate-phone-anim-box {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotate-phone-icon {
    font-size: 2.8rem;
    animation: rotatePhoneWiggle 2.2s infinite ease-in-out;
    transform-origin: center center;
}

.rotate-arrow-indicator {
    position: absolute;
    bottom: -2px;
    right: 2px;
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

@keyframes rotatePhoneWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    30% {
        transform: rotate(-25deg);
    }
    60% {
        transform: rotate(-90deg);
    }
    85% {
        transform: rotate(-90deg);
    }
}

/* ============================================================
   PLAY LIMIT (2X MAX ATTEMPTS) & HUD BADGE STYLES
   ============================================================ */
.hud-quota-badge {
    background: rgba(255, 159, 67, 0.18);
    border: 1px solid #ff9f43;
    color: #ffbe76;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.play-limit-modal-content {
    max-width: 480px;
    width: min(94vw, 480px);
    text-align: center;
    background: linear-gradient(160deg, #241a3e 0%, #120b22 100%);
    border: 2px solid #ff9f43;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 159, 67, 0.4);
    border-radius: 20px;
    padding: 20px 22px;
    position: relative;
    color: #ffffff;
    box-sizing: border-box;
}

.play-limit-badge {
    display: inline-block;
    background: rgba(255, 159, 67, 0.2);
    border: 1px solid #ff9f43;
    color: #ffd700;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

@media (orientation: landscape) and (max-height: 550px) {
    .play-limit-modal-content {
        padding: 10px 16px !important;
        max-width: min(92vw, 560px) !important;
        overflow: hidden !important;
    }
    .play-limit-modal-content .modal-title {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    .play-limit-badge {
        font-size: 0.68rem !important;
        margin-bottom: 6px !important;
        padding: 2px 8px !important;
    }
    .play-limit-modal-content .modal-body {
        font-size: 0.74rem !important;
        margin-bottom: 8px !important;
        line-height: 1.35 !important;
    }
    .play-limit-modal-content .btn-primary {
        padding: 6px 18px !important;
        font-size: 0.8rem !important;
    }
}

/* Rotate to Portrait Banner for Mobile End-Game */
.rotate-portrait-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.2), rgba(255, 215, 0, 0.2));
    border: 1.5px solid rgba(0, 229, 255, 0.5);
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 12px;
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
    animation: pulseBorder 2s infinite alternate;
}

.rotate-portrait-banner .rpb-icon {
    font-size: 1.4rem;
    animation: rotatePhone 1.8s ease-in-out infinite;
    display: inline-block;
}

@keyframes rotatePhone {
    0% { transform: rotate(0deg); }
    30% { transform: rotate(-90deg); }
    70% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

@keyframes pulseBorder {
    0% { border-color: rgba(0, 229, 255, 0.4); }
    100% { border-color: rgba(255, 215, 0, 0.8); }
}


