/* ============================================
   TYPEBLASTER - 3-COLUMN LAYOUT
   Responsive Grid System
   ============================================ */

/* Main Container */
.game-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    grid-template-rows: 100vh;
    gap: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Column 1: Stats Panel */
.stats-panel {
    grid-column: 1;
    background: var(--bg-panel);
    border-right: 1px solid var(--neon-cyan);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    overflow: hidden;
    z-index: 10;
    font-size: 0.97rem;
    /* Reduce all text by 3% */
    height: 100vh;
    max-height: 100vh;
}

.panel-header {
    text-align: center;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--grid-color-bright);
    margin-bottom: var(--spacing-sm);
}

.game-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
}

.game-title .highlight {
    color: var(--neon-magenta);
    text-shadow: 0 0 10px var(--neon-magenta-glow);
}

.version {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--grid-color-bright);
    border-radius: 2px;
    padding: 4px 8px;
    text-align: center;
    transition: all var(--transition-fast);
    transform: scale(0.9);
    transform-origin: center;
    margin: 1px 0;
}

.stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.stat-label {
    font-size: 0.5rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan-glow);
    line-height: 1.2;
}

.stat-value.high-score {
    color: var(--neon-yellow);
    text-shadow: 0 0 5px rgba(255, 238, 0, 0.5);
}

.stat-value.timer {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green-glow);
}

.timer-card {
    border-color: var(--neon-green);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 255, 157, 0.1) 100%);
}

/* Controls Info */
.controls-info {
    flex: 0 0 auto;
    padding: var(--spacing-sm);
    background: var(--bg-card);
    border: 1px solid var(--grid-color-bright);
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.controls-info h3 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--neon-magenta);
    margin-bottom: var(--spacing-xs);
    letter-spacing: 1px;
}

.controls-info ul {
    list-style: none;
    padding: 0;
}

.controls-info li {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 2px 0;
    padding-left: var(--spacing-sm);
    position: relative;
}

.controls-info li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
}

/* Game Controls */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Column 2: Game Panel */
.game-panel {
    grid-column: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    overflow: hidden;
}

.canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Prevent scrollbars when canvas resizes */
}

.canvas-container canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

/* Mobile Input Overlay */
.mobile-input-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: none;
}

.mobile-input {
    background: rgba(10, 10, 15, 0.9);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    text-align: center;
    width: 280px;
    caret-color: var(--neon-cyan);
    text-transform: uppercase;
}

.mobile-input::placeholder {
    color: var(--text-muted);
}

.mobile-input:focus {
    outline: none;
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

/* Current Input Display */
.current-input-display {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan-glow);
    letter-spacing: 4px;
    pointer-events: none;
    z-index: 50;
}

/* Column 3: Ad Panel */
.ad-panel {
    grid-column: 3;
    background: var(--bg-panel);
    border-left: 1px solid var(--neon-cyan);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
    overflow: hidden;
    z-index: 10;
    height: 100vh;
    max-height: 100vh;
}

.ad-container {
    background: var(--bg-card);
    border: 1px solid var(--grid-color-bright);
    border-radius: 4px;
    padding: var(--spacing-sm);
}

.ad-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
}

.adsense-slot {
    min-height: 250px;
    min-width: 250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-slot ins.adsbygoogle {
    width: 100% !important;
    height: 100% !important;
    min-width: 250px !important;
    min-height: 250px !important;
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border: 2px dashed var(--grid-color-bright);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ad-placeholder.small {
    height: 250px;
}

.ad-placeholder-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.ad-placeholder-text span:first-child {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
}

.ad-placeholder-text .neon-text-sub {
    font-size: 1rem;
    color: var(--neon-magenta);
}

.ad-instructions {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: var(--spacing-md);
    line-height: 1.6;
}