/* Google I/O Aesthetic, Clean Geometric Shapes, Premium Dark Mode */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --primary-accent: #38bdf8;
    --secondary-accent: #818cf8;
    --text-main: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* No scrollbars on either view */
}

/* Stage View */
.stage-body {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#stageCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#overlay {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

.qr-container h2 {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#qrCode {
    border-radius: 12px;
    padding: 8px;
    background: white;
    margin-bottom: 12px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Mobile View */
.mobile-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e293b, var(--bg-dark));
}

.mobile-container {
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.mobile-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

input[type="text"] {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary-accent);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 8px;
    margin-bottom: 24px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.pulse-text {
    font-size: 2rem;
    color: var(--primary-accent);
    animation: pulse 1.5s infinite;
    margin-bottom: 16px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Splash Screen */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    transition: opacity 1s ease;
}

.splash-img {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.5);
    border-radius: 12px;
}

.splash-text {
    font-family: 'Press Start 2P', monospace;
    color: #4ade80; /* bright green like the loading bar */
    font-size: 1.5rem;
    margin-top: 40px;
    animation: blink 1.5s infinite;
}

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

.fade-out {
    opacity: 0;
    pointer-events: none;
}
