/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #1a5fb4 0%, #0d3b7a 100%);
    --btn-gradient: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --card-bg: rgba(13, 27, 51, 0.95);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --gold: #f7931a;
    --gold-light: #ffcd00;
    --option-bg: rgba(255, 255, 255, 0.03);
    --option-border: rgba(255, 255, 255, 0.1);
    --option-hover: rgba(255, 255, 255, 0.08);
    --option-selected: rgba(59, 130, 246, 0.15);
    --option-selected-border: rgba(59, 130, 246, 0.5);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --success-color: #22c55e;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a1628;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ========================================
   Loading Screen
======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 90% 60% at 50% 20%, rgba(200, 220, 255, 0.12) 0%, transparent 60%);
    animation: cloudMove 30s ease-in-out infinite;
}

@keyframes cloudMove {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-3%);
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(30, 64, 120, 0.4) 0%,
            rgba(15, 35, 70, 0.8) 40%,
            rgba(10, 22, 40, 0.95) 100%);
}

/* ========================================
   Quiz Wrapper & Container
======================================== */
.quiz-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quiz-container {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    padding: 32px 28px 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
}

/* ========================================
   Progress Bar
======================================== */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 20%;
    background: var(--btn-gradient);
    border-radius: 0 4px 4px 0;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ========================================
   Logo
======================================== */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ========================================
   Section Title
======================================== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-icon {
    font-size: 18px;
}

.section-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

/* ========================================
   Questions
======================================== */
.questions-container {
    position: relative;
    min-height: 200px;
}

.question {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.question.active {
    display: block;
}

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

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

.question-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ========================================
   Options
======================================== */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--option-bg);
    border: 1px solid var(--option-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.option:hover {
    background: var(--option-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.option input[type="radio"] {
    display: none;
}

.option.selected {
    background: var(--option-selected);
    border-color: var(--option-selected-border);
    box-shadow: 0 0 0 1px var(--option-selected-border);
}

.radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
}

.radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.option.selected .radio-circle {
    border-color: var(--accent-color);
}

.option.selected .radio-circle::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

/* ========================================
   Info Section
======================================== */
.info-section {
    text-align: center;
}

.info-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.info-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.info-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.info-text strong {
    color: var(--gold);
    font-weight: 600;
}

/* ========================================
   Registration Form
======================================== */
.form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.form-icon {
    font-size: 20px;
}

.form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 14px;
}

.form-input {
    width: 100%;
    padding: 16px 18px;
    background: var(--option-bg);
    border: 1px solid var(--option-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.25s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.phone-group {
    display: flex;
    gap: 10px;
}

.country-code {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: var(--option-bg);
    border: 1px solid var(--option-border);
    border-radius: 12px;
    flex-shrink: 0;
}

.flag {
    font-size: 18px;
}

.code {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.phone-input {
    flex: 1;
}

/* ========================================
   Success Section
======================================== */
.success-section {
    text-align: center;
    padding: 20px 0;
}

.success-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease-out;
}

.success-icon {
    width: 100%;
    height: 100%;
}

.success-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.success-note {
    font-size: 14px;
    color: var(--gold);
    font-weight: 500;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   Navigation Button
======================================== */
.btn-next {
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    background: var(--btn-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    letter-spacing: 0.5px;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.btn-next:active:not(:disabled) {
    transform: translateY(0);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-next:hover:not(:disabled) .btn-arrow {
    transform: translateX(4px);
}

.btn-next.submit-mode .btn-arrow {
    display: none;
}

.btn-next.hidden {
    display: none;
}

/* ========================================
   Loading State
======================================== */
.btn-next.loading {
    pointer-events: none;
}

.btn-next.loading .btn-arrow {
    display: none;
}

.btn-next.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 480px) {
    .quiz-wrapper {
        padding: 16px;
        align-items: flex-start;
        padding-top: 5vh;
    }

    .quiz-container {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .logo-text {
        font-size: 20px;
    }

    .question-title {
        font-size: 15px;
    }

    .option {
        padding: 12px 14px;
    }

    .option-text {
        font-size: 13px;
    }
}