/* ===========================
   QUIZ PAGE - PREMIUM DESIGN
   =========================== */

/* ---------- SECTION ---------- */
.quiz-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.quiz-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 25% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 70%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.quiz-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 150px 250px, rgba(212, 175, 55, 0.25), transparent),
        radial-gradient(1px 1px at 500px 180px, rgba(255, 215, 0, 0.35), transparent),
        radial-gradient(2px 2px at 750px 350px, rgba(212, 175, 55, 0.2), transparent);
    animation: quizTwinkle 5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes quizTwinkle {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ---------- CONTENT ---------- */
.quiz-content {
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.quiz-tag {
    display: inline-block;
    background: linear-gradient(135deg, #D4A373, #ffd700, #D4A373);
    background-size: 200% 200%;
    animation: shimmerTag 3s ease-in-out infinite;
    color: #000;
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

@keyframes shimmerTag {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.quiz-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.quiz-title .highlight {
    background: linear-gradient(135deg, #D4A373, #ffd700, #f0c040);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- LEADERBOARD BANNER ---------- */
.leaderboard-banner {
    display: block;
    max-width: 500px;
    margin: 0 auto 50px;
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.leaderboard-banner:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(212, 175, 55, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.1);
}

.leaderboard-banner-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
    transition: left 0.6s ease;
}

.leaderboard-banner:hover .leaderboard-banner-glow {
    left: 100%;
}

.leaderboard-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.leaderboard-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.leaderboard-banner-text {
    flex: 1;
    text-align: left;
}

.leaderboard-banner-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #D4A373;
    font-family: 'Inter', sans-serif;
}

.leaderboard-banner-text p {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
}

.leaderboard-banner-arrow {
    color: rgba(212, 175, 55, 0.6);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.leaderboard-banner:hover .leaderboard-banner-arrow {
    color: #D4A373;
    transform: translateX(4px);
}

/* ---------- QUIZ CARDS ---------- */
.quiz-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.quiz-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Left accent line */
.quiz-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    transition: width 0.3s ease;
}

.quiz-card:nth-child(1)::before { background: linear-gradient(180deg, #4ade80, #22c55e); }
.quiz-card:nth-child(2)::before { background: linear-gradient(180deg, #facc15, #eab308); }
.quiz-card:nth-child(3)::before { background: linear-gradient(180deg, #f97316, #ea580c); }
.quiz-card:nth-child(4)::before { background: linear-gradient(180deg, #818cf8, #6366f1); }

.quiz-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.quiz-card:nth-child(1):hover { box-shadow: 0 16px 40px rgba(74, 222, 128, 0.15); }
.quiz-card:nth-child(2):hover { box-shadow: 0 16px 40px rgba(250, 204, 21, 0.15); }
.quiz-card:nth-child(3):hover { box-shadow: 0 16px 40px rgba(249, 115, 22, 0.15); }
.quiz-card:nth-child(4):hover { box-shadow: 0 16px 40px rgba(129, 140, 248, 0.15); }

.quiz-card:hover::before {
    width: 6px;
}

/* ---------- CARD CONTENT ---------- */
.quiz-card-content {
    flex: 1;
    text-align: left;
}

.quiz-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.quiz-level-emoji {
    font-size: 1.6rem;
}

.quiz-level {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.quiz-card:nth-child(1) .quiz-level { color: #4ade80; }
.quiz-card:nth-child(2) .quiz-level { color: #facc15; }
.quiz-card:nth-child(3) .quiz-level { color: #f97316; }
.quiz-card:nth-child(4) .quiz-level { color: #818cf8; }

.quiz-name {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 600;
}

.quiz-desc {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ---------- START BUTTON ---------- */
.btn-start-quiz {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 215, 0, 0.08));
    color: #D4A373;
    padding: 11px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.btn-start-quiz:hover {
    background: linear-gradient(135deg, #D4A373, #ffd700);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
    border-color: transparent;
}

.btn-start-quiz svg {
    transition: transform 0.3s ease;
}

.btn-start-quiz:hover svg {
    transform: translateX(3px);
    stroke: #000;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .quiz-section {
        padding: 90px 0 60px;
    }

    .quiz-title {
        font-size: 2.2rem;
    }

    .quiz-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
        max-width: 90%;
    }

    .quiz-cards {
        gap: 16px;
    }

    .quiz-card {
        padding: 22px 20px;
    }

    .quiz-level {
        font-size: 1.2rem;
    }

    .quiz-desc {
        font-size: 0.85rem;
    }

    .leaderboard-banner {
        margin: 0 16px 40px;
        padding: 16px 20px;
    }

    .leaderboard-banner-icon {
        font-size: 1.6rem;
    }

    .leaderboard-banner-text h3 {
        font-size: 1rem;
    }
}

/* ---------- SEARCH BOX (ARTIKEL & TONTON) ---------- */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 163, 115, 0.3); /* Emas asli */
    border-radius: 50px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.search-box:hover, .search-box:focus-within {
    border-color: #D4A373; /* Emas asli */
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.2);
}

.search-icon {
    font-size: 1.2rem;
    color: #D4A373;
    margin-right: 12px;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 480px) {
    .quiz-title {
        font-size: 1.8rem;
    }

    .quiz-description {
        font-size: 0.85rem;
    }

    .quiz-card {
        padding: 18px 16px;
    }

    .quiz-level {
        font-size: 1.1rem;
    }

    .quiz-level-emoji {
        font-size: 1.3rem;
    }

    .quiz-desc {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }

    .btn-start-quiz {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
