/* =========================================
   진로퀴즈 공통 CSS 변수 및 스타일
   - quiz_main.html, yesno_quiz.html, choice_quiz.html, challenge_quiz.html에서 공통 사용
========================================= */

:root {
    /* 파란색 계열 (YES/NO 퀴즈) */
    --quiz-blue-50: #eff6ff;
    --quiz-blue-100: #dbeafe;
    --quiz-blue-200: #bfdbfe;
    --quiz-blue-300: #93c5fd;
    --quiz-blue-400: #60a5fa;
    --quiz-blue-500: #3b82f6;
    --quiz-blue-600: #2563eb;
    --quiz-blue-700: #1d4ed8;
    --quiz-blue-800: #1e40af;

    /* 초록색 계열 (3지선다 퀴즈) */
    --quiz-green-50: #f0fdf4;
    --quiz-green-100: #dcfce7;
    --quiz-green-200: #bbf7d0;
    --quiz-green-300: #86efac;
    --quiz-green-400: #4ade80;
    --quiz-green-500: #22c55e;
    --quiz-green-600: #16a34a;
    --quiz-green-700: #15803d;
    --quiz-green-800: #166534;

    /* 빨간색 계열 (챌린지 퀴즈) */
    --challenge-red-50: #fef2f2;
    --challenge-red-100: #fee2e2;
    --challenge-red-200: #fecaca;
    --challenge-red-300: #fca5a5;
    --challenge-red-400: #f87171;
    --challenge-red-500: #ef4444;
    --challenge-red-600: #dc2626;
    --challenge-red-700: #b91c1c;
    --challenge-red-800: #991b1b;

    /* 오렌지색 계열 (챌린지 퀴즈 그라데이션) */
    --challenge-orange-400: #fb923c;
    --challenge-orange-500: #f97316;

    /* 사이드바 메뉴 색상 */
    --quiz-cyan-800: #155e75;
}

/* 공통 섹션 스타일 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-content {
    padding: 20px;
}

/* 알록달록 퀴즈 카드 색상 */
.quiz-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quiz-card {
    display: block;
    padding: 12px 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    border-radius: 8px;
}

.quiz-card:nth-child(10n+1) { background: #dbeafe; border: 1px solid #93c5fd; }
.quiz-card:nth-child(10n+1):hover { background: #bfdbfe; border-color: #3b82f6; }
.quiz-card:nth-child(10n+1) p { color: #2563eb; }

.quiz-card:nth-child(10n+2) { background: #dcfce7; border: 1px solid #86efac; }
.quiz-card:nth-child(10n+2):hover { background: #bbf7d0; border-color: #22c55e; }
.quiz-card:nth-child(10n+2) p { color: #16a34a; }

.quiz-card:nth-child(10n+3) { background: #fef3c7; border: 1px solid #fcd34d; }
.quiz-card:nth-child(10n+3):hover { background: #fde68a; border-color: #f59e0b; }
.quiz-card:nth-child(10n+3) p { color: #d97706; }

.quiz-card:nth-child(10n+4) { background: #fce7f3; border: 1px solid #f9a8d4; }
.quiz-card:nth-child(10n+4):hover { background: #fbcfe8; border-color: #ec4899; }
.quiz-card:nth-child(10n+4) p { color: #db2777; }

.quiz-card:nth-child(10n+5) { background: #e0e7ff; border: 1px solid #a5b4fc; }
.quiz-card:nth-child(10n+5):hover { background: #c7d2fe; border-color: #6366f1; }
.quiz-card:nth-child(10n+5) p { color: #4f46e5; }

.quiz-card:nth-child(10n+6) { background: #ccfbf1; border: 1px solid #5eead4; }
.quiz-card:nth-child(10n+6):hover { background: #99f6e4; border-color: #14b8a6; }
.quiz-card:nth-child(10n+6) p { color: #0d9488; }

.quiz-card:nth-child(10n+7) { background: #fee2e2; border: 1px solid #fca5a5; }
.quiz-card:nth-child(10n+7):hover { background: #fecaca; border-color: #ef4444; }
.quiz-card:nth-child(10n+7) p { color: #dc2626; }

.quiz-card:nth-child(10n+8) { background: #f3e8ff; border: 1px solid #d8b4fe; }
.quiz-card:nth-child(10n+8):hover { background: #e9d5ff; border-color: #a855f7; }
.quiz-card:nth-child(10n+8) p { color: #9333ea; }

.quiz-card:nth-child(10n+9) { background: #cffafe; border: 1px solid #67e8f9; }
.quiz-card:nth-child(10n+9):hover { background: #a5f3fc; border-color: #06b6d4; }
.quiz-card:nth-child(10n+9) p { color: #0891b2; }

.quiz-card:nth-child(10n+10) { background: #fef9c3; border: 1px solid #fde047; }
.quiz-card:nth-child(10n+10):hover { background: #fef08a; border-color: #eab308; }
.quiz-card:nth-child(10n+10) p { color: #ca8a04; }

.quiz-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.quiz-card p {
    font-size: 0.8rem;
    margin: 0;
}

/* 반응형 */
@media (max-width: 768px) {
    .quiz-card-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   사이드바 메뉴 스타일 (2줄 배치 + 면색 적용)
========================================= */
/* 사이드바 메뉴 2줄 배치 */
.sidebar-nav-link {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 12px;
}

.sidebar-nav-link.menu-home {
    background: #cffafe !important;
    color: var(--quiz-cyan-800) !important;
    border-left: 3px solid #22d3d1 !important;
    font-weight: 600;
}
.sidebar-nav-link.menu-home:hover {
    background: #a5f3fc !important;
}
.sidebar-nav-link.menu-home i {
    color: var(--quiz-cyan-800) !important;
}
.sidebar-nav-link.menu-home .sidebar-nav-desc {
    color: #0e7490;
}

.sidebar-nav-link.menu-yesno {
    background: var(--quiz-blue-100) !important;
    color: var(--quiz-blue-800) !important;
    border-left: 3px solid var(--quiz-blue-400) !important;
    font-weight: 600;
}
.sidebar-nav-link.menu-yesno:hover {
    background: var(--quiz-blue-200) !important;
}
.sidebar-nav-link.menu-yesno i {
    color: var(--quiz-blue-800) !important;
}
.sidebar-nav-link.menu-yesno .sidebar-nav-desc {
    color: var(--quiz-blue-600);
}

.sidebar-nav-link.menu-choice {
    background: var(--quiz-green-100) !important;
    color: var(--quiz-green-800) !important;
    border-left: 3px solid var(--quiz-green-400) !important;
    font-weight: 600;
}
.sidebar-nav-link.menu-choice:hover {
    background: var(--quiz-green-200) !important;
}
.sidebar-nav-link.menu-choice i {
    color: var(--quiz-green-800) !important;
}
.sidebar-nav-link.menu-choice .sidebar-nav-desc {
    color: var(--quiz-green-600);
}

.sidebar-nav-link.menu-challenge {
    background: var(--challenge-red-100) !important;
    color: var(--challenge-red-800) !important;
    border-left: 3px solid var(--challenge-red-400) !important;
    font-weight: 600;
}
.sidebar-nav-link.menu-challenge:hover {
    background: var(--challenge-red-200) !important;
}
.sidebar-nav-link.menu-challenge i {
    color: var(--challenge-red-800) !important;
}
.sidebar-nav-link.menu-challenge .sidebar-nav-desc {
    color: var(--challenge-red-600);
}
