/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    /* Color Palette - Extracted from Image */
    --bg-color: #050505;
    /* Deep Black */
    --panel-color: #0c0c0c;
    /* Slightly lighter for panels */
    --primary-color: #33FF00;
    /* Bright Neon Green */
    --dim-color: #1a8000;
    /* Dimmed Green */
    --text-main: #eeeeee;
    --text-dim: #666666;
    --border-color: #1a1a1a;

    /* Spacing & Layout */
    --app-max-width: 1400px;
    --header-height: 80px;

    /* Effects */
    --glow-strong: 0 0 15px rgba(51, 255, 0, 0.6);
    --glow-soft: 0 0 8px rgba(51, 255, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'VT323', monospace;
    height: 100vh;
    overflow-x: hidden;
    /* Subtle Grid Background */
    background-image:
        linear-gradient(rgba(20, 20, 20, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 20, 20, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dim-color);
}

/* Main Application Wrapper */
.app-wrapper {
    display: flex;
    flex-direction: column;
    /* Default: Mobile Stack */
    min-height: 100vh;
    padding: 20px;
    max-width: var(--app-max-width);
    margin: 0 auto;
    gap: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 10px 0;
    LETTER-SPACING: 0.2rem;
}

.brand-title {
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(51, 255, 0, 0.1);
}

.brand-title span {
    color: var(--primary-color);
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    flex: 1;
}

/* SECTION 1: MAIN FOCUS (Timer) */
.focus-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border: 1px solid #111;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000 100%);
    padding: 40px 20px;
    position: relative;
    border-radius: 4px;
}

/* Timer Display */
.timer-display {
    font-size: 18vw;
    /* Fluid for mobile */
    line-height: 1;
    color: var(--primary-color);
    text-shadow: var(--glow-strong);
    margin: 20px 0;
    font-variant-numeric: tabular-nums;
    font-family: 'VT323', monospace;
}

@media (min-width: 768px) {
    .timer-display {
        font-size: 10rem;
    }
}

/* Controls */
.preset-row,
.controls-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.t-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.t-btn:hover {
    border-color: #fff;
    color: #fff;
}

.t-btn.active,
.t-btn.primary {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: var(--glow-strong);
    font-weight: bold;
}

.t-btn.primary:hover {
    background: #4dff1a;
    /* Lighter green */
}

/* Activity Log */
.activity-section {
    width: 100%;
    padding: 10px;
    background: #080808;
    border: 1px solid #151515;
}

.activity-grid {
    display: flex;
    gap: 4px;
    height: 50px;
    align-items: flex-end;
    overflow-x: auto;
    padding-bottom: 5px;
}

/* Scrollbar horizontal for log */
.activity-grid::-webkit-scrollbar {
    height: 4px;
}

/* SECTION 2: SIDEBAR (Scoreboard) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #080808;
    border: 1px solid #151515;
    padding: 20px;
    min-height: 300px;
}

.panel-header {
    color: #fff;
    text-transform: uppercase;
    font-size: 1.4rem;
    border-bottom: 2px solid #222;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

/* Scoreboard List */
.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 400px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #0c0c0c;
    border: 1px solid #1a1a1a;
    color: #aaa;
    font-size: 1.1rem;
}

.score-row:first-child {
    border-color: var(--dim-color);
    color: #fff;
}

.score-row .rank {
    width: 25px;
    color: var(--primary-color);
}

.score-row .score {
    font-family: monospace;
}

/* Account / Auth */
.auth-container {
    margin-top: auto;
    border-top: 1px solid #222;
    padding-top: 20px;
}

.auth-input {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    padding: 10px;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'VT323';
    font-size: 1.1rem;
}

.auth-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* DESKTOP LAYOUT (Split View) */
@media (min-width: 1024px) {
    .app-wrapper {
        flex-direction: row;
        /* Split Side-by-Side */
        align-items: flex-start;
        height: 100vh;
        overflow: hidden;
    }

    header {
        position: absolute;
        top: 20px;
        left: 0;
        width: 100%;
        text-align: center;
        pointer-events: none;
        /* Let clicks pass through if overlapping */
        z-index: 10;
    }

    .content-area {
        flex-direction: row;
        height: 100%;
        margin-top: 0;
        padding-top: 80px;
        /* Space for absolute header */
    }

    /* Left Pane: Timer + Log */
    .focus-panel {
        flex: 2;
        /* 2/3 width */
        height: 100%;
        border-right: 1px solid #151515;
    }

    /* Right Pane: Sidebar */
    .sidebar {
        flex: 1;
        /* 1/3 width */
        height: 100%;
        border-left: 1px solid #1a1a1a;
        background: #060606;
    }
}