@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    background: #000000;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Countdown Screen Styles */
.countdown-screen {
    max-width: 900px;
    width: 100%;
    background: #1a1a2e;
    border: 4px solid #00ff00;
    padding: 60px 40px;
    box-shadow:
        0 0 40px rgba(0, 255, 0, 0.7),
        inset 0 0 30px rgba(0, 0, 0, 0.9);
    animation: countdownGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Floating Irish Icons Background */
.irish-icons-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.icon {
    position: absolute;
    font-size: 3em;
    opacity: 0.1;
    animation: floatIcon 20s infinite;
}

.icon-1 { top: 10%; left: 10%; animation-delay: 0s; }
.icon-2 { top: 20%; right: 15%; animation-delay: 2s; }
.icon-3 { top: 40%; left: 5%; animation-delay: 4s; }
.icon-4 { top: 60%; right: 10%; animation-delay: 6s; }
.icon-5 { top: 80%; left: 20%; animation-delay: 8s; }
.icon-6 { top: 30%; right: 25%; animation-delay: 10s; }
.icon-7 { top: 50%; left: 15%; animation-delay: 12s; }
.icon-8 { top: 70%; right: 20%; animation-delay: 14s; }
.icon-9 { top: 15%; left: 40%; animation-delay: 16s; }
.icon-10 { top: 85%; right: 30%; animation-delay: 18s; }

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.2;
    }
}

@keyframes countdownGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 0, 0.7), inset 0 0 30px rgba(0, 0, 0, 0.9); }
    50% { box-shadow: 0 0 60px rgba(0, 255, 0, 1), inset 0 0 30px rgba(0, 0, 0, 0.9); }
}

.countdown-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.teaser-text {
    color: #ff0000;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-shadow:
        0 0 20px rgba(255, 0, 0, 0.9),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: teaserFlash 1.5s ease-in-out infinite;
    letter-spacing: 3px;
}

@keyframes teaserFlash {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.countdown-title {
    color: #00ff00;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow:
        3px 3px 0px #008800,
        6px 6px 0px rgba(0, 0, 0, 0.5),
        0 0 30px #00ff00;
    animation: titlePulse 2s ease-in-out infinite;
}

.countdown-subtitle {
    color: #ffff00;
    font-size: 1.2em;
    margin-bottom: 50px;
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.9);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.time-box {
    background: #000;
    border: 4px solid #00ffff;
    padding: 20px;
    min-width: 120px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    animation: boxPulse 2s ease-in-out infinite;
}

@keyframes boxPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.time-value {
    color: #00ff00;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    font-family: 'Press Start 2P', monospace;
}

.time-label {
    color: #00ffff;
    font-size: 0.7em;
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.countdown-message {
    color: #ff00ff;
    font-size: 0.9em;
    margin-top: 40px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.7);
    animation: messageFade 2s ease-in-out infinite;
}

@keyframes messageFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.countdown-tagline {
    color: #00ffff;
    font-size: 0.7em;
    margin-top: 20px;
    line-height: 1.8;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
    opacity: 0.8;
}

.shamrock-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.countdown-shamrock {
    font-size: 3em;
    display: inline-block;
    animation: shamrockBounce 2s ease-in-out infinite;
}

.shamrock-row .countdown-shamrock:nth-child(2) {
    animation-delay: 0.3s;
}

.shamrock-row .countdown-shamrock:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes shamrockBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(360deg); }
}

/* Intro Screen Styles */
.intro-screen {
    display: none;
    max-width: 800px;
    width: 100%;
    background: #1a1a2e;
    border: 4px solid #00ff00;
    padding: 40px;
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    animation: introGlow 2s ease-in-out infinite;
}

@keyframes introGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.8); }
    50% { box-shadow: 0 0 50px rgba(0, 255, 0, 0.9), inset 0 0 20px rgba(0, 0, 0, 0.8); }
}

.intro-content {
    text-align: center;
}

.intro-title {
    color: #00ff00;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow:
        2px 2px 0px #008800,
        4px 4px 0px rgba(0, 0, 0, 0.5),
        0 0 20px #00ff00;
    animation: titlePulse 1.5s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.intro-tagline {
    color: #ffff00;
    font-size: 0.8em;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

.intro-story {
    background: #000;
    border: 3px solid #00ffff;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.intro-story p {
    color: #00ffff;
    font-size: 0.7em;
    line-height: 1.8;
    margin: 10px 0;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.intro-instructions {
    background: #000;
    border: 3px solid #ff00ff;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.intro-instructions h2 {
    color: #ff00ff;
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

.intro-instructions ul {
    list-style: none;
    padding: 0;
}

.intro-instructions li {
    color: #00ff00;
    font-size: 0.6em;
    line-height: 2;
    padding-left: 20px;
    position: relative;
}

.intro-instructions li:before {
    content: '>';
    position: absolute;
    left: 0;
    color: #ff00ff;
}

.intro-instructions strong {
    color: #ffff00;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.start-button {
    background: #00ff00;
    color: #000;
    border: 4px solid #00ff00;
    padding: 15px 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1em;
    cursor: pointer;
    margin: 30px 0;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.start-button:hover {
    background: #00ffff;
    border-color: #00ffff;
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

.start-button:active {
    transform: scale(0.95);
}

.intro-warning {
    color: #ff0000;
    font-size: 0.5em;
    margin-top: 20px;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    animation: warningBlink 1s ease-in-out infinite;
}

@keyframes warningBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.game-container {
    max-width: 1200px;
    width: 100%;
    background: #1a1a2e;
    border: 4px solid #00ff00;
    border-style: solid;
    padding: 20px;
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 4px solid #00ff00;
    padding-bottom: 15px;
    background: #000;
    padding: 15px;
}

.game-header h1 {
    color: #00ff00;
    font-size: 1.5em;
    text-shadow:
        2px 2px 0px #008800,
        4px 4px 0px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    color: #ffff00;
    font-style: normal;
    margin-top: 10px;
    font-size: 0.5em;
    letter-spacing: 1px;
}

.game-main {
    display: flex;
    gap: 20px;
}

#gameCanvas {
    border: 4px solid #00ff00;
    background: #000;
    cursor: crosshair;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-ui {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
}

.dialogue-box {
    background: #000;
    border: 4px solid #00ff00;
    padding: 15px;
    min-height: 140px;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 10px rgba(0, 255, 0, 0.1);
    position: relative;
}

.dialogue-box::before {
    content: '>';
    position: absolute;
    left: 5px;
    top: 5px;
    color: #00ff00;
    font-size: 12px;
}

#dialogueText {
    line-height: 1.8;
    color: #00ff00;
    font-size: 11px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    font-family: 'Courier New', monospace;
    margin-left: 20px;
}

.inventory-container {
    background: #000;
    border: 4px solid #00ff00;
    padding: 15px;
    flex: 1;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 10px rgba(0, 255, 0, 0.1);
}

.inventory-container h3 {
    color: #ffff00;
    margin-bottom: 10px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 5px;
    font-size: 12px;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.inventory {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inventory-item {
    background: #1a1a2e;
    border: 3px solid #00ffff;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.1s;
    font-size: 10px;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.inventory-item:hover {
    background: #00ffff;
    color: #000;
    text-shadow: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.8);
}

.inventory-item:active {
    transform: translateY(0px);
}

.stats {
    background: #000;
    border: 4px solid #00ff00;
    padding: 15px;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 10px rgba(0, 255, 0, 0.1);
}

.stats p {
    margin: 8px 0;
    font-size: 10px;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.stats span {
    color: #ffff00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

/* Retro scanline effect */
@keyframes flicker {
    0% { opacity: 0.05; }
    50% { opacity: 0.08; }
    100% { opacity: 0.05; }
}

.game-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@media (max-width: 1024px) {
    body {
        padding: 10px;
    }

    .game-main {
        flex-direction: column;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .game-header h1 {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 0.4em;
    }

    #dialogueText {
        font-size: 9px;
    }

    .inventory-item {
        font-size: 8px;
    }

    .stats p {
        font-size: 8px;
    }

    /* Countdown Screen Mobile */
    .countdown-screen {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0 auto;
    }

    .teaser-text {
        font-size: 0.9em;
        letter-spacing: 1px;
    }

    .countdown-title {
        font-size: 1.8em;
    }

    .countdown-subtitle {
        font-size: 0.8em;
    }

    .countdown-timer {
        gap: 10px;
        margin: 30px 0;
    }

    .time-box {
        min-width: 70px;
        padding: 15px 10px;
    }

    .time-value {
        font-size: 1.8em;
    }

    .time-label {
        font-size: 0.5em;
    }

    .countdown-message {
        font-size: 0.6em;
    }

    .countdown-tagline {
        font-size: 0.5em;
        line-height: 1.6;
    }

    .shamrock-row {
        gap: 20px;
    }

    .countdown-shamrock {
        font-size: 2em;
    }

    .icon {
        font-size: 2em;
    }

    /* Intro Screen Mobile */
    .intro-screen {
        padding: 30px 20px;
        max-width: 100%;
    }

    .intro-title {
        font-size: 1.5em;
    }

    .intro-tagline {
        font-size: 0.6em;
    }

    .intro-story {
        padding: 15px;
        margin: 20px 0;
    }

    .intro-story p {
        font-size: 0.55em;
    }

    .intro-instructions {
        padding: 15px;
        margin: 20px 0;
    }

    .intro-instructions h2 {
        font-size: 0.7em;
    }

    .intro-instructions li {
        font-size: 0.5em;
        line-height: 1.8;
    }

    .start-button {
        padding: 12px 25px;
        font-size: 0.7em;
    }

    .intro-warning {
        font-size: 0.4em;
    }

    /* Game Container Mobile */
    .game-container {
        padding: 15px;
    }

    .game-header {
        padding: 10px;
    }
}

/* CRT monitor glow effect */
@keyframes glow {
    0% { filter: brightness(1) contrast(1.1); }
    50% { filter: brightness(1.05) contrast(1.15); }
    100% { filter: brightness(1) contrast(1.1); }
}

#gameCanvas {
    animation: glow 4s ease-in-out infinite;
}
