:root {
    --primary-color: #E63946;
    /* Relatio Red */
    --primary-hover: #D62828;
    --bg-color: #0f111a;
    /* Dark background */
    --card-bg: transparent;
    --text-main: #FFFFFF;
    --text-muted: #A0AEC0;
    --border-color: #2D3748;
    --border-active: #E63946;
    --option-bg: #1A202C;
    --option-hover: #2D3748;
    --progress-bg: #2D3748;
    --font-family: 'Inter', sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: radial-gradient(circle at center top, #1c233f 0%, #0a0c10 100%);
    background-color: var(--bg-color);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    animation: fadeIn 0.8s ease-in-out;
}

.app-container {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    /* Mobile first full height */
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 600px) {
    .app-container {
        min-height: 100vh;
        margin: 0;
        overflow: hidden;
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    height: 45px;
    width: auto;
}

.quiz-header {
    padding: 24px 24px 0 24px;
    background-color: transparent;
    position: sticky;
    top: 0;
    z-index: 10;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--progress-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.4s ease-out;
    border-radius: 4px;
}

.step-counter {
    text-align: right;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.quiz-content {
    flex-grow: 1;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.question-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-main);
    text-align: center;
    animation: slideUp 0.5s ease;
}

.question-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-align: center;
    animation: slideUp 0.6s ease;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background-color: var(--option-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.7s ease;
}

.option-btn:hover {
    border-color: var(--border-active);
    background-color: var(--option-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.1);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background-color: var(--option-hover);
}

.option-btn.selected::after {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--option-hover), 0 0 0 5px var(--primary-color);
}

.option-content-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-img {
    width: 60px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Grid Layout for vertical choices */
.options-list.grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.options-list.grid-layout .option-btn {
    padding: 8px 8px 14px 8px;
}

.options-list.grid-layout .option-content-wrapper {
    flex-direction: column;
    text-align: center;
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
}

.options-list.grid-layout .option-img {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin-bottom: 0;
    border-radius: 6px;
}

.options-list.grid-layout .option-btn::after {
    display: none;
    /* Hide the radio circle for vertical cards to look cleaner */
}


.quiz-footer {
    padding: 24px;
    background-color: transparent;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: #FFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary.hidden {
    display: none;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Loading screen specifics */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    margin-top: 40px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Email capture */
.email-input {
    width: 100%;
    padding: 18px 20px;
    background-color: var(--option-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    margin-bottom: 16px;
    font-family: var(--font-family);
    transition: border-color 0.3s;
    color: var(--text-main);
}

.email-input:focus {
    outline: none;
    border-color: var(--primary-color);
}