/* Eat & Run - Emerald Stealth Pro System */
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Oxanium', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --bg-dark: #0B0E11;
    --bg-arena: #050709;
    --surface-glass: rgba(26, 29, 33, 0.8);
    --accent-emerald: #10B981;
    --accent-hover: #059669;
    --accent-gold: #F59E0B;
    --accent-error: #ef4444;
    --text-primary: #EAECEF;
    --text-secondary: #94A3B8;
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 12px 40px rgba(0, 0, 0, 0.6);
    /* Cyberpunk palette (waiting room / logo-aligned screens) */
    --cp-bg: #050611;
    --cp-panel: #0B1022;
    --cp-border: #1A2550;
    --cp-text: #EAF2FF;
    --cp-muted: #A6B0D0;
    --cp-cyan: #2DE2E6;
    --cp-violet: #B537F2;
    --cp-magenta: #FF3CAC;
    --cp-success: #00F5A0;
    --cp-warning: #FFD166;
    --cp-danger: #FF4D6D;
    --cp-track: #141A2E;
    --cp-row: #0E1C2A;
    --cp-glow-violet: rgba(120, 80, 255, 0.25);
    --cp-glow-cyan: rgba(40, 220, 255, 0.18);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

* {
    font-family: var(--font-body) !important;
    color: var(--text-primary);
    box-sizing: border-box;
}

.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
}

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.page-shell {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
    box-sizing: border-box;
}

.card {
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
}

.btn-full {
    width: 100%;
}

h1,
h2,
h3,
h4,
.title,
[data-font="heading"] {
    font-family: var(--font-heading) !important;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    cursor: default;
}

/* Default dark background only when body is not the lobby */
body:not(.lobby-page) {
    background-color: var(--bg-dark);
}

html,
body,
canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

canvas {
    z-index: 1;
    position: relative;
    display: block;
    touch-action: none;
}

div {
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
}

.modal-panel {
    background-color: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-premium);
}

@media (max-width: 480px) {
    .modal-panel {
        padding: 16px;
    }
}

.modal-body {
    text-align: center;
}

.modal-icon {
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    color: var(--accent-error);
    background: rgba(239, 68, 68, 0.15);
}

.modal-icon.is-success {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.2);
}

.modal-icon.is-processing,
.modal-icon.is-game {
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.15);
}

.modal-icon.is-warning,
.modal-icon.is-error {
    color: var(--accent-error);
    background: rgba(239, 68, 68, 0.15);
}

/* Coin-like texture for circular elements (use with border-radius: 50% and a size) */
.coin-texture {
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45) 0%, transparent 45%),
        radial-gradient(circle at 68% 72%, rgba(0, 0, 0, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, hsl(38, 82%, 58%) 0%, hsl(38, 75%, 48%) 35%, hsl(38, 70%, 38%) 75%, hsl(38, 65%, 28%) 100%);
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.25),
        inset -2px -2px 5px rgba(0, 0, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.modal-icon-svg {
    width: 24px;
    height: 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: pre-line;
    line-height: 1.5;
    text-align: center;
}

.modal-actions {
    margin-top: 20px;
}

.modal-close-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    border-radius: 10px;
    border: none;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-hover) 100%);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* Professional Buttons */
.back-btn,
.btn-primary {
    background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-hover) 100%) !important;
    border: none !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 10px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    color: #fff !important;
}

.back-btn:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45) !important;
}


/* Visible placeholders on dark/glass inputs (lobby, modals) */
input::placeholder {
    color: var(--text-secondary);
    opacity: 0.9;
}

input[type="image"]:focus {
    border: none;
    outline: 1px solid transparent;
}

*:focus {
    outline: 1px solid transparent;
    border-style: none;
}

