/* ============================================
   SNAKE — Liquid Glass Landing Page
   Green theme with per-card accent colors
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-gradient-1: #040f04;
    --bg-gradient-2: #0a1f0a;
    --bg-gradient-3: #061210;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --accent-green: #34d399;
    --accent-orange: #e8853a;
    --accent-blue: #6c63ff;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    background: var(--bg-gradient-1);
    color: var(--text-primary);
}

body {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(52, 211, 153, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(52, 211, 153, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 50%),
        linear-gradient(160deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
}

/* ---- Floating Orbs ---- */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.30;
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
    width: 340px;
    height: 340px;
    background: var(--accent-green);
    top: -80px;
    left: -60px;
    animation-duration: 14s;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: #22c55e;
    bottom: -60px;
    right: -40px;
    animation-duration: 18s;
    animation-delay: -4s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-orange);
    top: 50%;
    left: 55%;
    opacity: 0.15;
    animation-duration: 16s;
    animation-delay: -8s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -25px) scale(1.08);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ---- Screens ---- */
.screen {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ---- Landing ---- */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    z-index: 2;
    padding: 24px;
    width: 100%;
    max-width: 1000px;
}

.title {
    font-size: clamp(56px, 10vw, 110px);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 40%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    animation: titlePulse 4s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    0% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(52, 211, 153, 0.0));
    }

    100% {
        filter: brightness(1.08) drop-shadow(0 0 30px rgba(52, 211, 153, 0.3));
    }
}

/* ---- Cards container ---- */
.cards-container {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    width: 100%;
}

/* ---- Liquid Glass Card ---- */
.glass-card {
    position: relative;
    width: 240px;
    height: 280px;
    border-radius: 28px;
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.glass-card:hover,
.glass-card:focus-visible {
    transform: translateY(-10px) scale(1.04);
}

.glass-card:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: 0.15s;
}

/* ---- Per-card accent colors ---- */

/* Claude cards — orange accent */
.glass-card.card-claude:hover,
.glass-card.card-claude:focus-visible {
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(232, 133, 58, 0.2);
}

.glass-card.card-claude .card-glow {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.04) 40%,
            rgba(232, 133, 58, 0.18) 100%);
}

.glass-card.card-claude:hover .card-glow {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.32) 0%,
            rgba(255, 255, 255, 0.06) 40%,
            rgba(232, 133, 58, 0.30) 100%);
}

.glass-card.card-claude .card-inner {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(232, 133, 58, 0.06) 100%);
    border-color: rgba(232, 133, 58, 0.15);
}

/* Codex card — blue/purple accent */
.glass-card.card-codex:hover,
.glass-card.card-codex:focus-visible {
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(108, 99, 255, 0.2);
}

.glass-card.card-codex .card-glow {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.04) 40%,
            rgba(108, 99, 255, 0.18) 100%);
}

.glass-card.card-codex:hover .card-glow {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.32) 0%,
            rgba(255, 255, 255, 0.06) 40%,
            rgba(108, 99, 255, 0.30) 100%);
}

.glass-card.card-codex .card-inner {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(108, 99, 255, 0.06) 100%);
    border-color: rgba(108, 99, 255, 0.15);
}

/* Default card glow (fallback) */
.card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.25) 0%,
            rgba(255, 255, 255, 0.05) 40%,
            rgba(52, 211, 153, 0.15) 100%);
    z-index: 0;
    opacity: 1;
    transition: opacity 0.4s, background 0.4s;
}

.card-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 28px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.10) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(52, 211, 153, 0.05) 100%);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.02),
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: border-color 0.4s, background 0.4s;
}

/* Specular highlight stripe */
.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.08) 0%,
            transparent 100%);
    border-radius: 28px 28px 0 0;
    pointer-events: none;
}

/* Shimmer sweep on hover */
.card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.08),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.glass-card:hover .card-inner::after {
    left: 140%;
}

/* ---- Card logo ---- */
.card-logo {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.codex-logo {
    border-radius: 22px;
}

.glass-card:hover .card-logo {
    transform: scale(1.08);
}

/* ---- Card label ---- */
.card-label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ---- Credit ---- */
.credit {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ---- Game Screen ---- */
#game-screen {
    background: #000;
    z-index: 10;
}

#game-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#back-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    background: rgba(5, 20, 5, 0.80);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

#back-btn:hover {
    background: rgba(52, 211, 153, 0.3);
    border-color: rgba(52, 211, 153, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 211, 153, 0.2);
}

#back-btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

#back-btn svg {
    transition: transform 0.3s;
}

#back-btn:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   RESPONSIVE — Mobile Support
   ============================================ */

/* Tablets */
@media (max-width: 800px) {
    .cards-container {
        gap: 20px;
    }

    .glass-card {
        width: 200px;
        height: 240px;
    }

    .card-logo {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }

    .card-label {
        font-size: 14px;
    }

    .landing-content {
        gap: 32px;
    }
}

/* Mobile portrait */
@media (max-width: 520px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .landing-content {
        gap: 24px;
        padding: 20px 16px;
        justify-content: center;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .title {
        font-size: clamp(42px, 14vw, 64px);
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
    }

    .glass-card {
        width: 90%;
        max-width: 320px;
        height: auto;
        min-height: 100px;
    }

    .card-inner {
        flex-direction: row;
        justify-content: flex-start;
        padding: 18px 20px;
        gap: 16px;
    }

    .card-logo {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        flex-shrink: 0;
    }

    .card-label {
        font-size: 14px;
        text-align: left;
    }

    .credit {
        font-size: 11px;
    }

    #back-btn {
        bottom: 16px;
        left: 16px;
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* Disable hover effects on touch */
    .glass-card:hover {
        transform: none;
        box-shadow: none;
    }

    .glass-card:active {
        transform: scale(0.97);
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .title {
        font-size: 36px;
    }

    .landing-content {
        gap: 18px;
        padding: 16px 12px;
    }

    .glass-card {
        width: 95%;
        min-height: 90px;
    }

    .card-logo {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .card-label {
        font-size: 13px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .landing-content {
        gap: 16px;
        padding: 12px 24px;
        flex-direction: column;
        justify-content: center;
    }

    .title {
        font-size: 36px;
    }

    .cards-container {
        flex-direction: row;
        gap: 16px;
    }

    .glass-card {
        width: 160px;
        height: 160px;
    }

    .card-inner {
        flex-direction: column;
        padding: 14px;
        gap: 10px;
    }

    .card-logo {
        width: 56px;
        height: 56px;
    }

    .card-label {
        font-size: 12px;
    }

    .credit {
        font-size: 10px;
    }
}