/* Base reset and retro casino theme */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'RetroMono';
    src: local('Courier New'), local('Consolas'), local('monospace');
}

:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-cabinet: #1a1a2e;
    --bg-panel: #0f0f1a;
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --gold-light: #ffe44d;
    --neon-green: #00ff41;
    --neon-red: #ff1744;
    --neon-blue: #00b0ff;
    --neon-purple: #e040fb;
    --text-primary: #e0e0e0;
    --text-dim: #666;
    --border-gold: #8b7500;
    --led-glow: 0 0 8px rgba(255, 215, 0, 0.6);
    --cabinet-shadow: 0 0 40px rgba(255, 215, 0, 0.1), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'RetroMono', 'Courier New', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
}

#app {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: url('/img/bg.jpg') no-repeat center;
    background-size: 100% 100%
}

/* Header */
#header {
    display: flex;
    align-items: center;
    height: 72px;
    background: linear-gradient(180deg, rgba(26,26,46,0.8) 0%, rgba(15,15,26,0.8) 100%);
    border-bottom: 2px solid var(--border-gold);
    padding: 0 12px;
    flex-shrink: 0;
    z-index: 10;
}

#header-logo {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 6px 0;
}

#logo-img {
    height: 100%;
    width: auto;
    image-rendering: pixelated;
    position: relative;
    z-index: 1;
}

#led-matrix-container {
    flex: 1;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    overflow: hidden;
}

#led-matrix {
    background: #050510;
    border: 1px solid #333;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

#header-user {
    flex-shrink: 0;
    margin-left: auto;
    cursor: pointer;
    position: relative;
}

/* Rank badge on profile avatar */
#rank-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 6px rgba(0,0,0,1), 0 0 10px rgba(255,215,0,0.5);
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--gold-dark);
    object-fit: cover;
    image-rendering: auto;
    position: relative;
    z-index: 1;
}

/* Footer */
#footer {
    display: flex;
    height: 62px;
    background: linear-gradient(0deg, rgba(26,26,46,0.8) 0%, rgba(15,15,26,0.8) 100%);
    border-top: 2px solid var(--border-gold);
    flex-shrink: 0;
    z-index: 10;
}

.footer-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #333;
    padding: 4px 8px;
}

.footer-cell:last-child {
    border-right: none;
}

.footer-interactive {
    cursor: pointer;
    transition: background 0.15s;
}

.footer-interactive:hover {
    background: rgba(255, 215, 0, 0.08);
}

.footer-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gold-dark);
    letter-spacing: 1px;
}

.footer-value {
    font-size: 17px;
    color: var(--gold);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
    white-space: nowrap;
}

/* Neon text */
.neon-text {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
    font-weight: bold;
}

.neon-text.accent {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6), 0 0 20px rgba(0, 255, 65, 0.3);
}

/* Buttons */
.btn-retro {
    font-family: inherit;
    font-size: 15px;
    padding: 10px 20px;
    border: 2px solid var(--gold-dark);
    background: var(--bg-secondary);
    color: var(--gold);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.15s;
}

.btn-retro:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: var(--gold);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.btn-primary {
    background: var(--gold-dark);
    color: #000;
}

.btn-primary:hover {
    background: var(--gold);
}

.btn-large {
    font-size: 17px;
    padding: 14px 28px;
    width: 100%;
}

/* User menu overlay */
#user-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

#user-menu-panel {
    background: var(--bg-cabinet);
    border: 2px solid var(--gold-dark);
    margin-top: 74px;
    margin-right: 12px;
    min-width: 220px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid #222;
    transition: background 0.12s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(255, 215, 0, 0.08);
    color: var(--gold);
}

.menu-danger {
    color: var(--neon-red);
}

.menu-danger:hover {
    background: rgba(255, 23, 68, 0.1);
    color: var(--neon-red);
}

/* Dialog */
#dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

#dialog-box {
    background: var(--bg-cabinet);
    border: 2px solid var(--gold-dark);
    padding: 24px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
}

#dialog-title {
    font-size: 16px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;
    text-align: center;
}

#dialog-input {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px;
    background: var(--bg-primary);
    border: 1px solid #444;
    color: var(--neon-green);
    text-align: center;
    margin-bottom: 12px;
}

#dialog-input:focus {
    outline: none;
    border-color: var(--gold);
}

#dialog-error {
    color: var(--neon-red);
    font-size: 13px;
    text-align: center;
    margin-bottom: 10px;
}

#dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
}
