/* Target Rush Game Styles */

/* Game-specific overrides - uses main.css variables */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: #16213e; /* Dark gradient background for game canvas */
    color: var(--color-text);
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.content {
    text-align: center;
    padding: 2rem;
    max-width: 90%;
    pointer-events: auto;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.controls-inline {
    margin-bottom: 1rem;
}

.control-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 217, 61, 0.2); /* Use primary color with transparency */
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fff;
}

.instruction {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.score {
    font-size: 4rem;
    font-weight: 700;
    margin: 1rem 0;
    line-height: 1.2;
}

.best-score {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.hint {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1.5rem;
}

.home-link {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: #FFD93D; /* Primary yellow color */
    border-radius: 20px;
    transition: all 0.2s;
    z-index: 20;
    pointer-events: auto;
    font-weight: 600;
}

.home-link:hover {
    background: #FFC107;
    transform: translateX(-50%) scale(1.05);
}

/* Hide UI during gameplay */
.state-playing .ui-overlay {
    display: none;
}

/* HUD during play */
.hud {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
    pointer-events: none;
}

.hud-level {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.hud-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Result state */
.state-result .ui-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.state-result .controls-inline,
.state-result .instruction {
    display: none;
}

/* New best celebration */
.state-result.new-best .title {
    color: #FFD93D;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 217, 61, 0.5); }
    to { text-shadow: 0 0 40px rgba(255, 217, 61, 0.8); }
}

/* Responsive */
@media (max-width: 600px) {
    .title {
        font-size: 1.75rem;
    }

    .score {
        font-size: 3rem;
    }
}

/* How to play section */
.how-to-play,
.related-games {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: left;
}

.how-to-play h2,
.related-games h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.how-to-play p,
.how-to-play li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.how-to-play ol {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
}

.how-to-play li {
    margin-bottom: 0.5rem;
}

.related-games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-game-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.related-game-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Prevent text selection during gameplay */
.game-container * {
    user-select: none;
    -webkit-user-select: none;
}
