/* =========================================
   MAIN CONTAINER
========================================= */

#cr-quiz-container {
    max-width: 760px;
    margin: 80px auto;
    padding: 60px 50px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    position: relative;
}

/* =========================================
   HEADINGS
========================================= */

#cr-quiz-container h2 {
    font-size: 30px;
    font-weight: 700;
    color: #111 !important;
    margin-bottom: 40px;
}

/* =========================================
   STEP SYSTEM
========================================= */

.cr-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.cr-step.active {
    display: block;
}

/* =========================================
   OPTIONS GRID
========================================= */

.cr-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* =========================================
   BUTTON RESET
========================================= */

#cr-quiz-container button {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    font-family: inherit;
}

/* =========================================
   OPTION BUTTONS
========================================= */

#cr-quiz-container .cr-options button {
    border: 2px solid #e5e7eb;
    background: #ffffff !important;
    padding: 18px 22px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #111 !important;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 1 !important;
}

/* Hover */

#cr-quiz-container .cr-options button:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-2px);
}

/* Active Click */

#cr-quiz-container .cr-options button:active {
    transform: scale(0.98);
}

/* Selected */

#cr-quiz-container .cr-options button.selected {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
}

/* =========================================
   PRIMARY ACTION BUTTON
========================================= */

.cr-primary-btn {
    padding: 14px 32px;
    background: #2563eb;
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cr-primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.cr-primary-btn:active {
    transform: scale(0.97);
}

/* =========================================
   PROGRESS BAR
========================================= */

#cr-progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 20px;
    margin-bottom: 45px;
    overflow: hidden;
}

#cr-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    transition: width 0.4s ease;
}

/* =========================================
   INPUT FIELD
========================================= */

#cr-quiz-container input[type="number"] {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    font-size: 16px;
    margin-top: 20px;
    outline: none;
    transition: 0.2s ease;
}

#cr-quiz-container input[type="number"]:focus {
    border-color: #2563eb;
}

/* =========================================
   RESULTS
========================================= */

#cr-results {
    margin-top: 60px;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

#cr-results h3 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}

#cr-results .result-card {
    background: #f9fafb;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s ease;
}

#cr-results .result-card:hover {
    background: #eef2ff;
}

/* =========================================
   LOADING STATE
========================================= */

#cr-loading {
    display: none;
    padding: 50px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

/* =========================================
   FADE IN ANIMATION
========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (min-width: 600px) {
    .cr-options {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .cr-options {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 500px) {
    #cr-quiz-container {
        padding: 40px 25px;
    }

    #cr-quiz-container h2 {
        font-size: 22px;
    }
}