:root {
    /* Colors */
    --clr-bg: #03050C;
    --clr-cyan: #00F0FF;
    --clr-magenta: #FF003C;
    --clr-text-main: #FFFFFF;
    --clr-text-muted: rgba(255, 255, 255, 0.7);
    --clr-glass-bg: rgba(10, 15, 30, 0.6);
    --clr-glass-border: rgba(0, 240, 255, 0.2);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.4);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* Mobile App Container Constraint */
.app-container {
    width: 100%;
    max-width: 480px; /* Force mobile layout on desktop */
    height: 100vh;
    height: 100dvh;
    position: relative;
    background-color: var(--clr-bg);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Desktop stylistic additions (simulating a phone) */
@media (min-width: 481px) {
    body {
        align-items: center;
        background: radial-gradient(circle at center, #111524 0%, #03050C 100%);
    }
    .app-container {
        height: 90vh;
        max-height: 850px;
        border-radius: 40px;
        border: 8px solid #1a1e2d;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
                    0 0 0 2px #323b56 inset;
    }
}

/* Background Setup */
.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(3, 5, 12, 0.2) 0%,
        rgba(3, 5, 12, 0.8) 50%,
        rgba(3, 5, 12, 1) 100%
    );
}

/* Main Content Positioning */
.content-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 40px 24px;
}

/* Header & Typography */
.header {
    text-align: center;
    margin-top: 20px;
    animation: fadeDown 1s ease-out forwards;
    opacity: 0;
    transform: translateY(-20px);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 0, 60, 0.15);
    border: 1px solid var(--clr-magenta);
    color: var(--clr-magenta);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 30px;
    margin-bottom: 24px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
}

.game-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, var(--clr-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.3));
}

.subtitle {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

/* View Container structure for switching forms */
.view-container {
    position: relative;
    width: 100%;
    margin-top: auto;
    perspective: 1000px;
}

.view-pane {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-pane.active {
    position: relative;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--clr-glass-bg);
    border: 1px solid var(--clr-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 30px 60px rgba(0,0,0, 0.4);
}

.glass-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--clr-cyan);
}

.glass-card p {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Form Styles */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    border-radius: 14px;
    color: var(--clr-text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-smooth);
}

/* Input Focus States */
.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-color: var(--clr-cyan);
    background: rgba(0, 240, 255, 0.05);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -10px;
    left: 14px;
    font-size: 0.75rem;
    padding: 0 8px;
    background-color: #0c1221;
    color: var(--clr-cyan);
    border-radius: 4px;
}

.input-glow {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-neon);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.input-group input:focus ~ .input-glow {
    opacity: 0.5;
}

/* CTA Button */
.cta-button {
    position: relative;
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, #00F0FF 0%, #0080FF 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

.cta-button:active {
    transform: scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.2s;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    z-index: 1;
    animation: shine 3s infinite;
}

/* Button Loading State */
.cta-button.loading {
    pointer-events: none;
}
.cta-button.loading .btn-text {
    opacity: 0;
}
.cta-button.loading .loading-spinner {
    opacity: 1;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Success View Specifics */
.success-card {
    text-align: center;
    border-color: rgba(255, 0, 60, 0.3);
}

.success-card h2 {
    color: var(--clr-text-main);
}

.highlight-name {
    color: var(--clr-magenta);
}

.check-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 0, 60, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--clr-magenta);
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.2);
}

.check-icon {
    width: 32px;
    height: 32px;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

.view-pane.active .check-icon {
    animation: drawCheck 0.6s 0.3s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.avatars {
    display: flex;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
    border: 2px solid var(--clr-bg);
    margin-left: -10px;
}
.avatar:first-child { margin-left: 0; background: linear-gradient(45deg, #FF003C, #FF7B00); }
.avatar:nth-child(2) { background: linear-gradient(45deg, #00F0FF, #0051FF); z-index: -1; }
.avatar:nth-child(3) { background: linear-gradient(45deg, #8A2BE2, #FF00FF); z-index: -2; }

.proof-text {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

/* Animations */
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}
