/* ============================================
   8-BIT RETRO GAMING COMING SOON PAGE
   ============================================ */

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

:root {
    --ice-light: #e8f4fc;
    --ice-primary: #7dd3fc;
    --ice-secondary: #38bdf8;
    --ice-deep: #0284c7;
    --ice-dark: #0c4a6e;
    --retro-black: #0f0f23;
    --retro-green: #4ade80;
    --retro-yellow: #fbbf24;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --font-pixel: 'Press Start 2P', monospace;
}

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

body {
    font-family: var(--font-pixel);
    background: var(--retro-black);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    image-rendering: pixelated;
}

/* Scanlines */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    z-index: 1000;
}

/* Background */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at center, #1e3a5f 0%, var(--retro-black) 70%);
}

.snowflake-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.snowflake {
    position: absolute;
    color: var(--ice-primary);
    font-size: 8px;
    opacity: 0.6;
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(110vh);
        opacity: 0;
    }
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
}

/* Header */
.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-size: clamp(0.6rem, 2vw, 0.9rem);
    line-height: 2.2;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0 var(--ice-dark), 0 0 20px var(--ice-primary);
}

.highlight {
    color: var(--ice-primary);
    text-shadow: 3px 3px 0 var(--ice-deep), 0 0 30px var(--ice-primary);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 3px 3px 0 var(--ice-deep), 0 0 20px var(--ice-primary);
    }

    to {
        text-shadow: 3px 3px 0 var(--ice-deep), 0 0 40px var(--ice-primary), 0 0 60px var(--ice-secondary);
    }
}

.subtitle {
    font-size: 0.5rem;
    color: var(--ice-primary);
    line-height: 2;
    animation: blink-text 1.5s step-end infinite;
}

@keyframes blink-text {
    50% {
        opacity: 0.5;
    }
}

/* Ice Section */
.ice-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ice-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(125, 211, 252, 0.3) 0%, transparent 60%);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.ice-block {
    position: relative;
    width: 200px;
    height: 260px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.ice-block:hover {
    transform: scale(1.02);
}

.ice-block:active {
    transform: scale(0.98);
}

.ice-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 30px var(--ice-primary)) drop-shadow(0 0 60px rgba(125, 211, 252, 0.3));
    transition: all 0.2s ease;
}

.crack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crack-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    height: 3px;
    box-shadow: 0 0 10px #fff;
    animation: crackAppear 0.2s ease-out forwards;
}

@keyframes crackAppear {
    from {
        opacity: 0;
        transform: scaleX(0);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.ice-shards {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ice-shard {
    position: absolute;
    background: var(--ice-primary);
    opacity: 0;
    box-shadow: 0 0 10px var(--ice-primary);
}

.ice-shard.exploding {
    animation: shardExplode 0.8s ease-out forwards;
}

@keyframes shardExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0);
    }
}

/* Click Hint */
.click-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 16px;
    background: #000;
    border: 4px solid var(--ice-primary);
    color: var(--text-primary);
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    box-shadow: 0 0 20px var(--ice-primary);
    animation: bounce 1s ease-in-out infinite, border-pulse 0.5s step-end infinite;
    transition: opacity 0.3s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes border-pulse {
    50% {
        border-color: var(--ice-secondary);
    }
}

.hint-icon {
    font-size: 1rem;
}

/* Hidden Message */
.hidden-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    pointer-events: none;
}

.hidden-message.revealed {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.message-card {
    background: #000;
    border: 4px solid var(--ice-primary);
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 0 60px var(--ice-primary), 0 0 100px rgba(125, 211, 252, 0.2);
    min-width: 300px;
}

.message-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: celebrateIcon 0.5s ease-out 0.3s both;
}

@keyframes celebrateIcon {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.message-title {
    font-size: 0.7rem;
    margin-bottom: 1rem;
    color: var(--retro-green);
    text-shadow: 2px 2px 0 #166534;
}

.message-text {
    font-size: 0.4rem;
    margin-bottom: 0.5rem;
    line-height: 2;
}

.launch-date {
    font-size: 0.6rem;
    color: var(--retro-yellow);
    text-shadow: 2px 2px 0 #92400e;
    animation: date-blink 1s step-end infinite;
}

@keyframes date-blink {
    50% {
        opacity: 0.7;
    }
}

/* Progress Bar */
.progress-container {
    text-align: center;
    animation: fadeIn 1s ease-out 0.5s both;
}

.progress-bar {
    width: 220px;
    height: 20px;
    background: #000;
    border: 3px solid var(--ice-primary);
    box-shadow: 0 0 15px var(--ice-primary);
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(180deg, var(--ice-light) 0%, var(--ice-primary) 30%, var(--ice-secondary) 70%, var(--ice-deep) 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.4rem;
    color: var(--ice-primary);
}

.progress-container.hidden {
    opacity: 0;
    display: none;
}

/* Footer */
.footer {
    margin-top: auto;
    text-align: center;
}

.footer-text {
    color: var(--ice-dark);
    font-size: 0.35rem;
}

/* Ice Block States */
.ice-block.cracking .ice-image {
    animation: shake 0.15s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px) rotate(-2deg);
    }

    75% {
        transform: translateX(8px) rotate(2deg);
    }
}

.ice-block.breaking .ice-image {
    animation: shatter 0.6s ease-out forwards;
}

@keyframes shatter {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
        filter: drop-shadow(0 0 60px #fff);
    }

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

.ice-block.broken {
    display: none;
}

/* Confetti */
.confetti {
    position: fixed;
    pointer-events: none;
    animation: confettiFall 2s ease-out forwards;
    z-index: 100;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

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

    .subtitle {
        font-size: 0.4rem;
    }

    .ice-block {
        width: 160px;
        height: 210px;
    }

    .message-card {
        min-width: 250px;
        padding: 1.5rem;
    }

    .click-hint {
        font-size: 0.35rem;
        padding: 8px 12px;
    }
}