:root {
    --primary-color: #7AB2D3;
    /* Soft Blue */
    --secondary-color: #4A90E2;
    --accent-color: #FFB347;
    /* Soft Orange */
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --grey-light: #e0e0e0;
    --success: #28a745;

    --color-yellow: #f1c40f;
    --color-orange: #e67e22;
    --color-red: #e74c3c;
}

.quiz-wrapper-style {
    font-family: 'Nunito', sans-serif;
    /* Default Mobile Background: Simple & Clean */
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Changed from center to allow scrolling without clipping top */
    min-height: 100vh;
    width: 100%;
    padding: 40px 0;
    /* Add vertical breathing room */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.quiz-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {

    /* PC-Only Soft Animation */
    .quiz-wrapper-style {
        background: linear-gradient(-45deg, #E0F7FA, #E3F2FD, #F3E5F5, #ffffff);
        background-size: 400% 400%;
        animation: gradientBG 20s ease infinite;
    }

    .quiz-container {
        min-height: auto;
        border-radius: 20px;
        margin: 40px 0;
        overflow: hidden;
    }
}

/* Header */
.quiz-header {
    background: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--grey-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--grey-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Quiz Steps */
#quiz-form {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phase-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.3;
}

/* Options */
.options-grid {
    display: grid;
    gap: 15px;
}

.option-card {
    border: 2px solid var(--grey-light);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option-card:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.option-card.selected {
    border-color: var(--secondary-color);
    background-color: #e6f2ff;
    box-shadow: 0 0 0 1px var(--secondary-color);
}

.option-card input {
    display: none;
    /* Or we can leave a custom radio, but let's hide default and style card */
}

.option-text {
    font-size: 1rem;
    font-weight: 600;
}

/* Buttons */
.btn-next,
.btn-finish {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 30px;
    width: 100%;
    display: block;
    transition: background 0.3s, transform 0.2s;
}

.btn-next:hover,
.btn-finish:hover {
    background-color: #357abd;
    transform: scale(1.02);
}

.btn-next:disabled,
.btn-finish:disabled {
    background-color: var(--grey-light);
    cursor: not-allowed;
    transform: none;
}

.btn-finish {
    background-color: var(--success);
}

.btn-finish:hover {
    background-color: #218838;
}

/* Info Box */
.info-box {
    background: #f9f9f9;
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
}

/* Cycle Diagram */
.cycle-diagram .cycle-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 5px;
}

.cycle-diagram .step {
    background: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.cycle-diagram .step.warning {
    color: white;
    background: var(--color-red);
    border-color: var(--color-red);
}

/* WhatsApp Message CSS */
.whatsapp-message {
    background-color: #dcf8c6;
    border-radius: 10px;
    padding: 15px;
    position: relative;
    max-width: 90%;
    margin: 0 auto 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.whatsapp-message::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 10px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: #dcf8c6;
    border-left: 0;
    border-top: 0;
}

.msg-header {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
}

.msg-body {
    font-style: italic;
    color: #333;
}

/* Slider CSS */
.slider-container {
    text-align: center;
    margin: 30px 0;
}

/* Range Slider - Premium Design */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 0%, #e0e0e0 0%, #e0e0e0 100%);
    outline: none;
    transition: all 0.3s ease;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

input[type=range]::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

input[type=range]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

input[type=range]::-moz-range-track {
    height: 12px;
    border-radius: 10px;
    background: #e0e0e0;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

.slider-btn:active {
    transform: scale(0.9);
}

/* Slider & Time Card Improvements */
.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.time-display-card {
    background: #ffffff;
    width: 100%;
    max-width: 200px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--grey-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.time-display-card #hours-display {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    color: var(--secondary-color);
    /* Highlight number in brand color */
}

.time-display-card .unit {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feedback-text {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1rem;
    display: block;
    /* Ensure it's visible if needed, or toggle via JS */
}

/* Controls Layout */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
    padding: 10px 0;
}

.control-btn {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    transition: all 0.2s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.4);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(74, 144, 226, 0.3);
}

/* Reset basic range styles to fit new layout */
input[type=range] {
    flex-grow: 1;
    margin: 0 10px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
}

.dot.yellow {
    background-color: var(--color-yellow);
}

.dot.orange {
    background-color: var(--color-orange);
}

.dot.red {
    background-color: var(--color-red);
}


/* Warning Section Styles */
.warning-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

.warning-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.warning-item {
    background: #fff5f5;
    padding: 15px;
    border-left: 4px solid #e74c3c;
    border-radius: 8px;
    line-height: 1.6;
}

.social-proof-section {
    margin: 30px 0;
}


/* Analysis Loader Overlay */
/* Analysis Loader & Social Proof Loader Overlay */
#analysis-loader,
#social-proof-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.analysis-content {
    text-align: center;
    max-width: 80%;
    width: 400px;
}

.loader-bar-container {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 10px;
    transition: width 0.1s linear;
}

#analysis-percentage {
    font-weight: 800;
    font-size: 2.5rem;
    /* Larger */
    color: #333;
    /* High contrast */
    margin-top: 10px;
}

/* Results Arrow Transform */
.comparison-visual {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.side i {
    font-size: 2rem;
    color: #888;
}

.side.B i {
    color: var(--success);
}

.arrow-transform {
    font-size: 1.5rem;
    color: var(--secondary-color);
}


/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

/* Spinner */
.loader-hidden {
    display: none !important;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}