/* 워드프로세서 1급 필기 - 스카이블루 테마 */
:root {
    --wp-primary: #0ea5e9;
    --wp-primary-dark: #0284c7;
    --wp-primary-light: #38bdf8;
    --wp-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --wp-gradient-light: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
}

/* Page Header */
.page-header {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: var(--wp-gradient-light);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-2xl);
}

.page-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--wp-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.page-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.page-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

.page-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.page-stats .stat {
    text-align: center;
}

.page-stats .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wp-primary);
}

.page-stats .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Section Styles */
.exam-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.section-desc {
    color: var(--text-secondary);
}

/* Subject List */
.subject-list {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.subject-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.subject-card:hover {
    border-color: var(--wp-primary);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.subject-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.subject-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp-gradient-light);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.subject-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.subject-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.subject-arrow {
    color: var(--wp-primary);
    font-size: 1.25rem;
}

/* Random Quiz Section */
.random-quiz-section {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-2xl);
}

.random-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.random-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.random-options {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.random-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--wp-primary);
    background: transparent;
    color: var(--wp-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.random-btn:hover {
    background: var(--wp-primary);
    color: white;
}

.random-btn.featured {
    background: var(--wp-gradient);
    border-color: transparent;
    color: white;
}

.random-btn.featured:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

/* Exam Date Section */
.exam-date-section {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.date-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.date-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.exam-date-list {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.exam-date-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-date-btn:hover {
    border-color: var(--wp-primary);
    color: var(--wp-primary);
}

/* Quiz Section */
.quiz-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.quiz-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.quiz-mode {
    padding: var(--space-xs) var(--space-md);
    background: var(--wp-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.quiz-progress {
    color: var(--text-secondary);
    font-weight: 500;
}

.quit-btn {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quit-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Question Card */
.question-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.question-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.question-number {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--wp-gradient);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.question-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.question-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.question-image-container {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.question-image-container img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Options Container */
.options-container {
    display: grid;
    gap: var(--space-md);
}

.option-btn {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover:not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--wp-primary);
    background: var(--wp-gradient-light);
}

.option-btn.selected {
    border-color: var(--wp-primary);
    background: var(--wp-gradient-light);
}

.option-btn.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.option-btn.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.option-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.option-btn.selected .option-number {
    background: var(--wp-primary);
    border-color: var(--wp-primary);
    color: white;
}

.option-btn.correct .option-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.option-btn.incorrect .option-number {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.option-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
}

.option-image {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.control-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--wp-primary);
    background: transparent;
    color: var(--wp-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    background: var(--wp-primary);
    color: white;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.question-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 과목별 그룹 스타일 */
.nav-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
}

.nav-group-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid;
}

.nav-group:nth-child(1) .nav-group-label {
    color: #0284c7;
    border-color: #0ea5e9;
}

.nav-group:nth-child(2) .nav-group-label {
    color: #059669;
    border-color: #10b981;
}

.nav-group:nth-child(3) .nav-group-label {
    color: #7c3aed;
    border-color: #8b5cf6;
}

.nav-group-btns {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    border-color: var(--wp-primary);
}

/* 1과목 스타일 (스카이블루 계열) */
.nav-btn.subject1 {
    border-color: #7dd3fc;
    color: #0369a1;
    background: #f0f9ff;
}

.nav-btn.subject1:hover {
    border-color: #0ea5e9;
    background: #e0f2fe;
}

.nav-btn.subject1.current {
    background: var(--wp-gradient);
    border-color: #0284c7;
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.nav-btn.subject1.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.nav-btn.subject1.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* 2과목 스타일 (그린 계열) */
.nav-btn.subject2 {
    border-color: #6ee7b7;
    color: #065f46;
    background: #ecfdf5;
}

.nav-btn.subject2:hover {
    border-color: #10b981;
    background: #d1fae5;
}

.nav-btn.subject2.current {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #047857;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.nav-btn.subject2.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.nav-btn.subject2.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* 3과목 스타일 (퍼플 계열) */
.nav-btn.subject3 {
    border-color: #c4b5fd;
    color: #5b21b6;
    background: #f5f3ff;
}

.nav-btn.subject3:hover {
    border-color: #8b5cf6;
    background: #ede9fe;
}

.nav-btn.subject3.current {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: #6d28d9;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.nav-btn.subject3.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.nav-btn.subject3.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* 기본 스타일 (랜덤, 과목별) */
.nav-btn.current {
    background: var(--wp-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.nav-btn.answered {
    background: var(--wp-gradient-light);
    border-color: var(--wp-primary);
    color: #0369a1;
}

.nav-btn.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.nav-btn.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Explanation Card */
.explanation-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border-left: 4px solid var(--wp-primary);
    margin-bottom: var(--space-xl);
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.result-icon {
    font-size: 1.5rem;
}

.result-text {
    font-size: 1.125rem;
    font-weight: 700;
}

.result-text.correct-text {
    color: #22c55e;
}

.result-text.incorrect-text {
    color: #ef4444;
}

.explanation-content {
    color: var(--text-secondary);
}

.correct-answer {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.explanation-text {
    line-height: 1.7;
}

/* Result Section */
.result-section {
    padding: var(--space-3xl) 0;
}

.result-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
}

.result-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
}

.result-score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--wp-primary);
    margin-bottom: var(--space-sm);
}

.result-percentage {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.result-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-btn:hover {
    border-color: var(--wp-primary);
    color: var(--wp-primary);
}

.result-btn.retry {
    background: var(--wp-gradient);
    border-color: transparent;
    color: white;
}

.result-btn.retry:hover {
    transform: scale(1.05);
}

/* Article Section - 시험 개요 */
.article-section {
    margin-bottom: var(--space-2xl);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Info Card Grid */
.info-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--wp-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
}

.info-card .info-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.info-card .info-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.info-card .info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Subject Table */
.subject-table {
    width: 100%;
    border-collapse: collapse;
}

.subject-table th,
.subject-table td {
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--border-color);
    text-align: left;
}

.subject-table th {
    background: var(--wp-gradient-light);
    font-weight: 600;
    color: var(--text-primary);
}

.subject-table td {
    color: var(--text-secondary);
}

.subject-table tr:hover td {
    background: rgba(14, 165, 233, 0.05);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--wp-gradient);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-3xl) + 3px);
    width: 28px;
    height: 28px;
    background: var(--wp-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--wp-primary);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--wp-primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--wp-primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Related Content */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.related-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover {
    border-color: var(--wp-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
}

.related-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.related-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.related-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .info-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: var(--space-xl);
    }

    .page-stats {
        gap: var(--space-lg);
    }

    .exam-section {
        padding: var(--space-lg);
    }

    .quiz-section {
        padding: var(--space-lg);
    }

    .question-card {
        padding: var(--space-lg);
    }

    .quiz-controls {
        flex-direction: column;
    }

    .question-nav {
        width: 100%;
        order: -1;
    }

    .nav-group {
        padding: var(--space-sm);
        max-width: 100%;
    }

    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .nav-group-label {
        font-size: 0.75rem;
    }

    .result-card {
        padding: var(--space-xl);
    }

    .result-actions {
        flex-direction: column;
    }

    .result-btn {
        width: 100%;
    }

    .info-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .info-card {
        padding: var(--space-lg);
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .random-options {
        flex-direction: column;
    }

    .random-btn {
        width: 100%;
    }

    .exam-date-list {
        flex-direction: column;
    }

    .exam-date-btn {
        width: 100%;
    }

    .info-card-grid {
        gap: var(--space-sm);
    }

    .info-card {
        padding: var(--space-md);
    }

    .info-card .info-icon {
        font-size: 1.5rem;
        margin-bottom: var(--space-sm);
    }
}

