/* === Countdown Math Styles === */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    min-height: calc(100vh - var(--nav-height));
    padding-top: calc(var(--nav-height) + var(--space-8));
}

.game-header {
    text-align: center;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
}

.difficulty-buttons {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px;
}

.difficulty-btn {
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

.difficulty-btn:hover {
    color: var(--text-primary);
}

.difficulty-btn--active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.target-display {
    text-align: center;
}

.target-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.target-number {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: var(--weight-black);
    color: var(--accent-cyan);
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.countdown-timer {
    width: 80px;
    height: 80px;
    position: relative;
}

.timer-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.timer-fg {
    fill: none;
    stroke: var(--accent-primary-bright);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-fg--warning {
    stroke: var(--warning);
}

.timer-fg--danger {
    stroke: var(--error);
}

.timer-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--weight-black);
}

.number-rack {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
}

.num-tile {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: var(--weight-black);
    font-family: var(--font-mono);
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.num-tile:hover:not(.num-tile--used) {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.num-tile--used {
    opacity: 0.3;
    cursor: default;
}

.num-tile--large {
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent-purple);
}

.ops-rack {
    display: flex;
    gap: var(--space-2);
}

.op-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-bright);
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.op-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.op-btn--active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.expression-area {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.expression {
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.expr-token {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.expr-num {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
}

.expr-op {
    color: var(--accent-primary-bright);
}

.expression-result {
    margin-top: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    min-height: 2rem;
}

.expression-result--correct {
    color: var(--success);
}

.expression-result--close {
    color: var(--warning);
}

.expression-result--wrong {
    color: var(--error);
}

.game-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

.solution-panel {
    width: 100%;
    max-width: 400px;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.solution-panel p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.solution-panel strong {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}