/* ==================== QUIZ STYLES ==================== */

:root {
    /* Warna dialiaskan ke palet resmi EPIC Academy (lihat style.css) supaya
       seluruh halaman punya identitas visual yang sama persis dengan homepage. */
    --primary-color: var(--primary-900);
    --secondary-color: var(--primary-600);
    --gold: var(--accent-500);
    --blue: var(--primary-600);
    --purple: #0A4E64;
    --light-bg: var(--cream);
}

/* ==================== QUIZ HERO ==================== */

.quiz-hero {
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(12,112,137,.35), transparent 60%),
        radial-gradient(700px 400px at 100% 100%, rgba(63,185,212,.18), transparent 55%),
        var(--brand-gradient);
    color: white;
    padding-bottom: 2.25rem;
    position: relative;
    overflow: hidden;
}

.quiz-hero h1 {
    font-size: 2.1rem;
}

.quiz-hero h1 em {
    color: var(--gold);
    font-style: italic;
}

/* ==================== QUIZ CONTAINER ==================== */

.quiz-container {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
    background: linear-gradient(135deg, #F1F6F8 0%, #ffffff 100%);
}

.quiz-section,
.results-section {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== PROGRESS BAR ==================== */

.quiz-progress-section {
    margin-bottom: 2rem;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.progress-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.progress-percent {
    font-weight: 700;
    color: var(--gold);
    font-size: 0.95rem;
}

.progress {
    background-color: #DDE7EA;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--gold), var(--purple));
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ==================== QUESTION CARD ==================== */

.question-card {
    background: white;
    border-radius: 14px;
    padding: 2.1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.7rem;
    animation: slideInUp 0.5s ease-out;
}

.question-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.7rem;
    line-height: 1.4;
}

/* ==================== QUESTION OPTIONS ==================== */

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-item {
    position: relative;
}

.option-input {
    display: none;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.05rem 1.3rem;
    background: #F1F6F8;
    border: 2px solid #DDE7EA;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.option-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(12,100,125, 0.1);
    transition: left 0.3s ease;
    z-index: 0;
}

.option-label span {
    position: relative;
    z-index: 1;
    flex: 1;
    color: #4A6069;
    font-weight: 500;
    margin-left: 1rem;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #DDE7EA;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option-input:checked + .option-label {
    background: rgba(12,100,125, 0.1);
    border-color: var(--gold);
}

.option-input:checked + .option-label::before {
    left: 0;
}

.option-input:checked + .option-label .option-radio {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: inset 0 0 0 3px white;
}

.option-label:hover {
    border-color: var(--gold);
    background: rgba(12,100,125, 0.05);
}

/* ==================== QUIZ NAV BUTTONS ==================== */

.quiz-nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.quiz-nav-buttons .btn {
    padding: 0.65rem 1.7rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gold {
    background: var(--gold);
    color: white;
    border: 2px solid var(--gold);
}

.btn-gold:hover {
    background: #2FA8C4;
    border-color: #2FA8C4;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid #DDE7EA;
    color: #4A6069;
}

.btn-outline-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ==================== RESULTS SECTION ==================== */

.results-header {
    text-align: center;
    padding: 1.7rem;
    background: linear-gradient(135deg, rgba(12,100,125, 0.1) 0%, rgba(12,112,137, 0.1) 100%);
    border-radius: 14px;
    margin-bottom: 2.4rem;
}

.results-header-content i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 0.85rem;
}

.results-header h2 {
    color: var(--primary-color);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.results-header p {
    color: #5E7982;
    font-size: 1rem;
}

/* ==================== RESULTS PROGRAMS ==================== */

.results-programs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.7rem;
    margin-bottom: 2.4rem;
}

.result-program-card {
    background: white;
    border-radius: 12px;
    padding: 1.7rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--gold);
    animation: slideInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.result-program-card.rank-2 {
    border-top-color: #0C7089;
    animation-delay: 0.1s;
}

.result-program-card.rank-3 {
    border-top-color: #0A4E64;
    animation-delay: 0.2s;
}

.result-program-card::before {
    content: attr(data-rank);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    background: var(--gold);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-program-card.rank-2::before {
    background: #0C7089;
}

.result-program-card.rank-3::before {
    background: #0A4E64;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.result-card-title h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-card-title p {
    color: #5E7982;
    font-size: 0.9rem;
}

.match-percentage {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.match-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(12,100,125, 0.1), rgba(12,100,125, 0.05));
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.result-program-card.rank-2 .match-circle {
    border-color: #0C7089;
    background: linear-gradient(135deg, rgba(12,112,137, 0.1), rgba(12,112,137, 0.05));
}

.result-program-card.rank-2 .match-circle {
    color: #0C7089;
}

.result-program-card.rank-3 .match-circle {
    border-color: #0A4E64;
    background: linear-gradient(135deg, rgba(10,65,85, 0.1), rgba(10,65,85, 0.05));
    color: #0A4E64;
}

.match-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5E7982;
    text-transform: uppercase;
}

.result-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #DDE7EA;
    border-bottom: 1px solid #DDE7EA;
    margin: 1rem 0;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.meta-item strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.meta-item span {
    color: #5E7982;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.result-card-why {
    margin-top: 1rem;
}

.result-card-why h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card-why h5 i {
    color: var(--gold);
}

.result-card-why p {
    color: #4A6069;
    line-height: 1.6;
}

/* ==================== RESULTS SUMMARY ==================== */

.results-summary {
    background: white;
    border-radius: 12px;
    padding: 1.7rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2.4rem;
}

.summary-stat {
    padding: 1.25rem;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #5E7982;
    font-size: 0.9rem;
}

/* ==================== RESULTS ACTIONS ==================== */

.results-actions {
    background: white;
    border-radius: 12px;
    padding: 1.7rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2.4rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.share-btn {
    padding: 0.65rem 1.3rem;
    border: 2px solid #DDE7EA;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4A6069;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.share-btn.whatsapp {
    border-color: #25d366;
    color: #25d366;
}

.share-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.1);
}

.share-btn.email {
    border-color: #ea4335;
    color: #ea4335;
}

.share-btn.email:hover {
    background: rgba(234, 67, 53, 0.1);
}

.share-btn.download {
    border-color: var(--gold);
    color: var(--gold);
}

.share-btn.download:hover {
    background: rgba(12,100,125, 0.1);
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 992px) {
    .quiz-hero h1 {
        font-size: 1.6rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .quiz-nav-buttons {
        flex-direction: column;
    }

    .quiz-nav-buttons .btn {
        justify-content: center;
    }

    .result-card-meta {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

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

@media (max-width: 768px) {
    .quiz-container {
        padding: 1.7rem 0;
    }

    .question-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .question-card h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .option-label {
        padding: 0.85rem 1.1rem;
    }

    .option-label span {
        font-size: 0.9rem;
    }

    .results-header h2 {
        font-size: 1.3rem;
    }

    .result-program-card {
        padding: 1.25rem;
    }

    .match-circle {
        width: 60px;
        height: 60px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .quiz-hero h1 {
        font-size: 1.35rem;
    }

    .question-card {
        padding: 1.05rem;
        border-radius: 12px;
    }

    .question-card h3 {
        font-size: 1rem;
        margin-bottom: 1.05rem;
    }

    .option-label {
        padding: 0.85rem;
    }

    .option-label span {
        font-size: 0.85rem;
    }

    .option-radio {
        width: 18px;
        height: 18px;
    }

    .quiz-nav-buttons {
        gap: 0.5rem;
    }

    .quiz-nav-buttons .btn {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }

    .results-header-content i {
        font-size: 2.1rem;
    }

    .results-header h2 {
        font-size: 1.1rem;
        margin-bottom: 0.65rem;
    }

    .result-program-card::before {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .result-card-meta {
        gap: 0.65rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}
