@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Space+Grotesk:wght@300;400;700&display=swap');

:root {
    --bg-dark: #050508;
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.4);
    --gold-gradient: linear-gradient(135deg, #f1d592 0%, #d4af37 50%, #996515 100%);
    --surface: rgba(15, 15, 20, 0.7);
    --surface-light: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    outline: none;
}

body {
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 20px;
}

/* ─── Animated Background Layer ─── */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(153, 101, 21, 0.05) 0%, transparent 40%),
        #050508;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--gold-gradient);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); opacity: 0; }
}

/* ─── Container ─── */
.container {
    background: var(--surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 32px;
    width: 100%;
    max-width: 440px;
    padding: 48px 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 
                inset 0 0 20px rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s var(--transition);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Header ─── */
header {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    text-align: center;
}

header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

header p {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* ─── Buttons ─── */
.main-content {
    position: relative;
    z-index: 1;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 24px;
    margin-bottom: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn i {
    font-size: 1.1rem;
    color: var(--accent);
}

.btn-primary {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-primary i {
    color: #000;
}

.btn:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 15px 35px var(--accent-glow);
    filter: brightness(1.1);
}

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

/* ─── Inputs ─── */
input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 24px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: var(--transition);
}

input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ─── Code Display ─── */
.code-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--accent);
    border-radius: 20px;
    padding: 24px;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 6px;
    margin: 24px 0;
    text-shadow: 0 0 20px var(--accent-glow);
    text-align: center;
}

#session-id-box.code-box {
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0;
    word-break: break-all;
    line-height: 1.6;
    border-style: solid;
}

/* ─── QR Code ─── */
.qr-display {
    background: #fff;
    padding: 16px;
    border-radius: 24px;
    margin: 0 auto 30px;
    display: inline-block;
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.3);
}

.qr-display img {
    border-radius: 12px;
}

/* ─── Footer ─── */
footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
        border-radius: 24px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
}