:root {
    --bg-color: #050505;
    --primary-cyan: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.5);
    --secondary-magenta: #ff00ea;
    --secondary-glow: rgba(255, 0, 234, 0.4);
    --accent-yellow: #f4ff00;
    --text-main: #ffffff;
    --text-dim: #888888;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --panel-radius: 20px;
    --font-main: 'Syncopate', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');

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

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.glow-text {
    text-shadow: 0 0 10px var(--primary-cyan), 0 0 20px var(--primary-cyan);
}

.glow-text-magenta {
    text-shadow: 0 0 10px var(--secondary-magenta), 0 0 20px var(--secondary-magenta);
}

/* Layout Containers */
.mobile-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Background Effects */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    transform: perspective(500px) rotateX(60deg) translateY(-100px);
    transform-origin: top;
    animation: grid-scroll 10s linear infinite;
}

@keyframes grid-scroll {
    from { background-position: 0 0; }
    to { background-position: 0 40px; }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--panel-radius);
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.neon-border {
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-glow), inset 0 0 5px var(--primary-glow);
}

.neon-border-magenta {
    border: 1px solid var(--secondary-magenta);
    box-shadow: 0 0 10px var(--secondary-glow), inset 0 0 5px var(--secondary-glow);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    width: 100%;
    margin-bottom: 12px;
}

.btn-primary {
    background: var(--primary-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    box-shadow: inset 0 0 5px var(--primary-glow);
}

.btn-magenta {
    background: var(--secondary-magenta);
    color: var(--text-main);
    box-shadow: 0 0 20px var(--secondary-glow);
}

/* Game Elements */
.logo {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin: 40px 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stat-box {
    text-align: center;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-main);
}

/* HUD Overlay */
.hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.3s ease;
}

.progress-bar.opponent {
    background: var(--secondary-magenta);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.combo-meter {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.combo-multiplier {
    font-size: 42px;
    font-family: var(--font-main);
    color: var(--accent-yellow);
    text-shadow: 0 0 15px rgba(244, 255, 0, 0.5);
}

/* Cards (Mode Selection) */
.mode-card {
    position: relative;
    padding: 24px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.mode-card:active {
    transform: scale(0.98);
}

.mode-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    color: var(--primary-cyan);
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}

.list-item:active {
    background: rgba(255,255,255,0.08);
}

.rank {
    width: 30px;
    font-family: var(--font-main);
    color: var(--text-dim);
}

.player-name {
    flex-grow: 1;
    font-weight: 600;
}

.player-score {
    font-family: var(--font-main);
    color: var(--primary-cyan);
}

.list-item.active {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary-cyan);
}

.list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.status-online { background: #00ff00; box-shadow: 0 0 5px #00ff00; }
.status-offline { background: #555; }

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-glow);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
}

.toggle-btn {
    width: 50px;
    height: 26px;
    background: #222;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
}

.toggle-btn.on {
    background: var(--primary-cyan);
}

.toggle-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

.toggle-btn.on::after {
    transform: translateX(24px);
}

.error-message {
    color: var(--secondary-magenta);
    font-size: 14px;
    margin-top: 8px;
    text-shadow: 0 0 5px var(--secondary-glow);
}

/* Gameplay Area Mockup */
.game-area {
    flex-grow: 1;
    position: relative;
    margin-top: 150px;
}

.target {
    position: absolute;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 0 15px var(--primary-glow);
    font-family: var(--font-main);
    font-weight: bold;
}

.target .typed {
    color: var(--primary-cyan);
}

.target .remaining {
    color: var(--text-main);
    opacity: 0.5;
}

/* Multiplayer specific components */
.player-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.badge-ready { background: rgba(0, 255, 0, 0.2); color: #00ff00; border: 1px solid #00ff00; }
.badge-waiting { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); border: 1px solid var(--glass-border); }

.chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 8px;
    max-width: 80%;
    font-size: 14px;
}

.chat-bubble.me {
    background: rgba(0, 242, 255, 0.1);
    border-right: 2px solid var(--primary-cyan);
    margin-left: auto;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    color: var(--text-main);
}

.social-btn:active {
    background: var(--glass-border);
}

/* Navigation Tabs */
.nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 15px 0 30px 0;
    border-top: 1px solid var(--glass-border);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 10px;
    text-transform: uppercase;
}

.nav-item.active {
    color: var(--primary-cyan);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}
