/* Design Tokens */
:root {
    --color-bg: #09090E;
    --color-surface: #161620;
    --color-mint: #23F7DE;
    --color-mint-dim: rgba(35, 247, 222, 0.3);
    --color-shamrock: #4ADE80;
    --text-primary: #F0F0F5;
    --text-secondary: #9CA3AF;
    --font-sans: 'Inter', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: floatOrb 12s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

.orb-1 {
    top: -15%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--color-mint) 0%, transparent 60%);
}

.orb-2 {
    bottom: -20%;
    left: -10%;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, var(--color-mint) 0%, transparent 60%);
    animation-delay: -4s;
    animation-duration: 15s;
}

.orb-3 {
    top: 30%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--color-mint) 0%, transparent 60%);
    animation-delay: -8s;
    animation-duration: 20s;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }

    33% {
        transform: translate(-100px, 150px) scale(1.3);
        opacity: 0.6;
    }

    66% {
        transform: translate(120px, -80px) scale(0.9);
        opacity: 0.25;
    }

    100% {
        transform: translate(-60px, -120px) scale(1.2);
        opacity: 0.18;
    }
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(35, 247, 222, 0.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(35, 247, 222, 0.008) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

.moving-grid {
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

/* Typography Utilities */
.mint-text {
    color: var(--color-mint);
}

.text-center {
    text-align: center;
}

h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.brand-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.webinar-banner {
    background: rgba(35, 247, 222, 0.05);
    border: 1px solid var(--color-mint-dim);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem auto 2.5rem;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 20px rgba(35, 247, 222, 0.1);
}

.webinar-badge {
    background: var(--color-mint);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.webinar-banner p {
    font-size: 1.625rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 100%;
    margin: 0 auto 2rem;
}

.form-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 530px;
    margin: 0 auto 1.5rem;
}

/* Layout */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.view {
    width: 100%;
    max-width: 700px;
    transition: opacity 0.6s ease;
}

.view.hidden {
    display: none;
}

.view.active-view {
    display: block;
}

/* Glass Panel */
.glass-panel {
    background: rgba(22, 22, 32, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: 1px solid var(--color-mint);
    background: transparent;
    color: var(--color-mint);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background: var(--color-mint);
    color: var(--color-bg);
    box-shadow: 0 0 20px rgba(35, 247, 222, 0.4);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.glow-effect {
    box-shadow: 0 0 15px rgba(35, 247, 222, 0.2);
}

/* Spots Pill */
.spots-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-mint);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

/* Success Icon */
.success-icon {
    color: var(--color-mint);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Quiz Specific */
.quiz-panel {
    padding: 2.5rem 3rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.question-tracker {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.question-title {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-mint), var(--color-shamrock));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.option-btn:hover {
    border-color: var(--color-mint-dim);
    background: rgba(35, 247, 222, 0.05);
    transform: translateX(4px);
}

.option-btn.correct {
    border-color: var(--color-shamrock);
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-shamrock);
}

.option-btn.wrong {
    border-color: #ff3c3c;
    background: rgba(255, 60, 60, 0.15);
    color: #ff3c3c;
}

/* Form */
.application-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-mint);
    box-shadow: 0 0 10px rgba(35, 247, 222, 0.1);
}

.row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quiz-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Terminal Box */
.terminal-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--color-mint);
}

.typing-text {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-bottom: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}

/* Scorecard & Share */
.scorecard-wrapper {
    margin: 2rem 0 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.scorecard {
    background: linear-gradient(145deg, rgba(35, 247, 222, 0.1), rgba(22, 22, 32, 0.8));
    border: 1px solid var(--color-mint);
    border-radius: 16px;
    padding: 1.5rem 3rem;
    box-shadow: 0 0 30px rgba(35, 247, 222, 0.15);
    display: inline-block;
}

.scorecard-header {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.scorecard-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.75rem;
    color: var(--color-mint);
    font-weight: 800;
    letter-spacing: 0.2em;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(35, 247, 222, 0.5);
    line-height: 1;
}

.btn-share {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

#btn-retry:hover {
    background: #ff3c3c !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.4) !important;
}

/* Utility Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

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

.pulse-entrance {
    animation: pulseEntrance 0.6s ease forwards;
}

@keyframes pulseEntrance {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.success-pulse {
    animation: successPulse 2s ease-in-out infinite alternate;
}

@keyframes successPulse {
    from {
        box-shadow: 0 0 20px rgba(35, 247, 222, 0.1);
    }

    to {
        box-shadow: 0 0 40px rgba(35, 247, 222, 0.2);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .glass-panel {
        padding: 2rem 1.5rem;
    }

    .quiz-panel {
        padding: 1.5rem;
    }

    .brand-logo {
        font-size: 2.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .row-group {
        grid-template-columns: 1fr;
    }

    .webinar-banner p {
        font-size: 1.2rem;
    }

    .score-value {
        font-size: 2.5rem;
    }
}