/* --- Root Variables & Theme Colors --- */
:root {
    --neon-blue: #00d4ff;
    --neon-glow: rgba(0, 212, 255, 0.4);
    --bg-dark: #050505;
    --card-bg: rgba(26, 26, 26, 0.9);
    --border-color: #333;
    --text-main: #ffffff;
    --text-dim: #888888;
    --glass: blur(10px);
    --sab: env(safe-area-inset-bottom, 0px);
}

/* --- Global Reset & Mobile Optimization --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: calc(90px + var(--sab));
    overflow-x: hidden;
}

/* --- Layout Containers --- */
.dashboard, .viewport-fix {
    width: 95%; max-width: 600px;
    margin: 0 auto; padding-top: 20px;
}

/* --- Header Bar (Top Stats) --- */
.header-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0, 0, 0, 0.9); padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000; backdrop-filter: var(--glass);
}
.header-bar a { text-decoration: none; font-size: 0.85rem; font-weight: bold; display: flex; align-items: center; gap: 6px; }
.money-link { color: #2ecc71; }
.race-credits { color: var(--neon-blue); }

/* --- Themed Glass Containers (The Blue Line) --- */
.table-container, .chat-container, .user-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--neon-blue) !important; /* THE BLUE LINE */
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
    backdrop-filter: var(--glass);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Typography --- */
h2, h3 {
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 15px;
}

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #222; }
.info-table th { color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; width: 40%; }
.info-table td { font-size: 0.95rem; color: #fff; }

/* --- Android Safe Inputs & Touch Targets --- */
input[type="text"], input[type="number"], select {
    background: #111; border: 1px solid #444; color: #fff;
    padding: 12px; border-radius: 6px; font-size: 16px !important; width: 100%;
}
.save-btn, .bank-btn {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-weight: bold; border-radius: 6px;
    background: rgba(0, 212, 255, 0.1); border: 1px solid var(--neon-blue); color: var(--neon-blue);
}
.save-btn:active { transform: scale(0.95); background: var(--neon-blue); color: #000; }

/* --- Navigation --- */
.mobile-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(10, 10, 10, 0.96); border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around;
    padding: 12px 0 calc(12px + var(--sab));
    z-index: 9999; backdrop-filter: var(--glass);
}
.mobile-nav a { color: var(--text-dim); text-decoration: none; text-align: center; font-size: 10px; flex: 1; display: flex; flex-direction: column; align-items: center; }
.mobile-nav i { font-size: 1.3rem; margin-bottom: 4px; }
.mobile-nav a.active { color: var(--neon-blue); text-shadow: 0 0 8px var(--neon-glow); }