:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-color: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.125);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #818cf8;
}

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

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

/* Animated Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-gradient);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: #4f46e5;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: #9333ea;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    background: #06b6d4;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.1);
    }
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 2rem 0;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-weight: 300;
}

.form-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(129, 140, 248, 0.4);
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.qr-result-centered {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-result-centered .qr-card {
    max-width: 250px;
    width: 100%;
}

.card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qr-image-wrapper {
    background: #fff;
    padding: 0.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-image-wrapper img {
    max-width: 100%;
    height: auto;
}

.token-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

code {
    background: #000;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.875rem;
    word-break: break-all;
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    color: #10b981;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--accent);
    color: #fff;
}

.value-text {
    word-break: break-all;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

footer p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .form-section {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-layout {
        grid-template-columns: 1fr;
    }

    .glass-container {
        padding: 1.5rem;
    }
}

/* ── Callback Section ─────────────────────────────── */
.callback-section {
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.cb-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cb-info code {
    background: rgba(129, 140, 248, 0.15);
    color: var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    max-height: unset;
    overflow: unset;
    word-break: break-all;
}

.cb-status {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: all 0.4s ease;
}

.cb-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.cb-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.cb-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.cb-data {
    background: #000;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #10b981;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    display: block;
}

.hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ── Branding & Access Overlay ─────────────────────── */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo-container img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.status-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    animation: overlayFadeIn 0.5s ease-out;
}

.status-overlay.hidden {
    display: none;
}

.overlay-content {
    max-width: 480px;
    padding: 48px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lock-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.overlay-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.overlay-content p {
    color: #64748b;
    font-weight: 500;
    margin-bottom: 32px;
    line-height: 1.6;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}