@charset "windows-1251";

a.greenbutton { text-decoration:none;margin:1px;margin-right:0px;padding:5px;background: #d0f5d0; display:inline-block;box-sizing:border-box; text-decoration-skip-ink: none; COLOR: #004400; FONT-FAMILY: verdana,geneva,arial cyr,arial,helvetica,sans-serif; }
a.greenbutton:hover { text-decoration:underline;text-decoration-skip-ink: none; background:#c4f8c4; text-decoration-skip-ink: none; COLOR: #004400; FONT-FAMILY: verdana,geneva,arial cyr,arial,helvetica,sans-serif; }

:root {
    --bg-body: #f0fff0;
    --bg-light: #e0ffe0;
    --bg-medium: #d0eed0;
    --bg-dark: #d0f5d0;
    --bg-accent: #c4e1c4;
    --bg-arena: #e8f5e8;
    --text-primary: #003300;
    --text-secondary: #336633;
    --text-muted: #669966;
    --accent-green: #009900;
    --accent-dark-green: #006600;
    --danger: #990000;
    --warning: #cc6600;
    --border-color: #336633;
    --border-light: #66bb66;
    --target-red: #cc0000;
    --target-dark-red: #990000;
    --glass-bg: rgba(208, 238, 208, 0.95);
    --shadow-green: rgba(0, 51, 0, 0.2);
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 20px 10px;
    background: var(--bg-body);
    font-family: verdana, geneva, arial cyr, arial, helvetica, sans-serif;
    font-size: 9pt;
    color: var(--text-primary);
}

.home-link {
    position: fixed;
    top: 20px;
    left: 20px;
    color: var(--accent-green);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.home-link:hover {
    background: var(--bg-light);
    color: var(--accent-dark-green);
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px var(--shadow-green);
    align-items: center;
}

.game-arena {
    width: 400px;
    height: 400px;
    background: var(--bg-arena);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.game-arena::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 51, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 51, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.target {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: crosshair;
    transition: left 0.3s ease-out, top 0.3s ease-out, transform 0.1s ease;
    z-index: 10;
    background:
        radial-gradient(circle at center,
            var(--target-red) 0%,
            var(--target-red) 12%,
            #ffffff 13%,
            #ffffff 24%,
            var(--target-red) 25%,
            var(--target-red) 36%,
            #ffffff 37%,
            #ffffff 48%,
            var(--target-red) 49%,
            var(--target-red) 60%,
            #ffffff 61%,
            #ffffff 72%,
            var(--target-red) 73%,
            var(--target-red) 100%
        );
    border: 2px solid var(--target-dark-red);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: pulse 1s ease-in-out infinite, shrink 2s linear forwards;
    animation-play-state: paused;
}

.target.active {
    animation-play-state: running;
}

.target.hit {
    animation: hitFlash 0.2s ease-out;
    background: var(--accent-green) !important;
    border-color: var(--accent-dark-green);
    box-shadow: 0 0 15px var(--accent-green), 0 0 30px rgba(0, 153, 0, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
}

@keyframes shrink {
    0% { transform: scale(1); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: scale(0.3); opacity: 0; }
}

@keyframes hitFlash {
    0% { transform: scale(1.3); }
    100% { transform: scale(0); opacity: 0; }
}

.game-arena.miss {
    animation: missFlash 0.15s ease-out;
}

@keyframes missFlash {
    0% { box-shadow: inset 0 0 60px rgba(153, 0, 0, 0.2); }
    100% { box-shadow: none; }
}

.target-countdown-overlay {
    position: absolute;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: rgba(0, 51, 0, 0.3);
}

.target-countdown-number {
    font-size: 100px;
    line-height: 1;
    font-weight: bold;
    color: #ffffff;
    text-shadow:
        0 0 20px rgba(0, 153, 0, 0.8),
        3px 3px 6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.5);
}

.target-countdown-number-animate {
    animation: targetCountdownTick 1s ease forwards;
}

@keyframes targetCountdownTick {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.stats-bar {
    margin-top:1px;  
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 400px;
    padding: 12px 20px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--border-light);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.stat-label {
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: bold;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-dark-green);
}

.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg);
    z-index: 100;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    padding: 25px;
    max-width: 320px;
}

.overlay-content h1 {
    font-size: 24px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-dark-green);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.overlay-content.victory h1 {
    color: var(--accent-green);
}

.overlay-content.gameover h1 {
    color: var(--danger);
}

.overlay-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.instructions {
    list-style: none;
    margin-bottom: 18px;
    text-align: left;
    background: var(--bg-light);
    padding: 12px 15px;
    border: 1px dashed var(--border-light);
}

.instructions li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    position: relative;
    padding-left: 18px;
    font-size: 8pt;
}

.instructions li:last-child {
    margin-bottom: 0;
}

.instructions li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

.instructions li strong {
    color: var(--text-primary);
}

.final-stats {
    margin: 12px 0;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
}

.final-stats p {
    margin: 5px 0;
    font-size: 8pt;
    color: var(--text-primary);
}

.final-stats p strong {
    color: var(--text-secondary);
}

.btn {
    display: block;
    width: 100%;
    padding: 4px 15px;
    margin-top: 10px;
    font-size: 9pt;
    border: 1px solid #7d727d;
    cursor: pointer;
    color: #003300;
    font-family: verdana, geneva, arial cyr, arial, helvetica, sans-serif;
    text-decoration: none;
    text-shadow: 1px 1px 0px #dcffc4;
    background: linear-gradient(to bottom, #dceddc 5%, #bad4ba 100%);
    background-color: #dceddc;
}

.btn:hover {
    background: linear-gradient(to bottom, #dceddc 5%, #f0fff0 100%);
    background-color: #dceddc;
}

.btn:active {
    background: linear-gradient(to bottom, #bad4ba 5%, #dceddc 100%);
    background-color: #bad4ba;
    position: relative;
    top: 1px;
}

/* Confetti Container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
