﻿#tofle_quiz_container {
    max-width: 500px;
    margin: 40px auto;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    font-family: 'Malgun Gothic', sans-serif;
}

.quiz-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

    .quiz-header h2 {
        margin: 0 0 5px 0;
        color: #1e293b;
        font-size: 22px;
    }

    .quiz-header p {
        margin: 0;
        color: #64748b;
        font-size: 13px;
    }

.quiz-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.quiz-hanzi-card {
    font-size: 110px;
    font-weight: bold;
    text-align: center;
    line-height: 150px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    margin-bottom: 20px;
}

.quiz-btn {
    display: block;
    width: 100%;
    padding: 13px;
    margin: 8px 0;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: 0.15s;
    box-sizing: border-box;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

    .btn-primary:hover {
        background: #4338ca;
    }

.btn-option {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
    text-align: center;
}

    .btn-option:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }

.btn-dark {
    background: #1e293b;
    color: #fff;
}

    .btn-dark:hover {
        background: #0f172a;
    }

.center {
    text-align: center;
}

.intro-txt {
    color: #475569;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.quiz-alert {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.result-board {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    text-align: center;
}

.final-score {
    font-size: 18px;
    margin: 10px 0;
}

    .final-score span {
        color: #4f46e5;
        font-weight: bold;
        font-size: 22px;
    }

.text-success {
    color: #16a34a;
    font-weight: bold;
}

.text-danger {
    color: #dc2626;
    font-weight: bold;
}
/* (기존 스타일에 아래 영단어 최적화 클래스들을 추가 및 병합해 줍니다) */

/* 영단어 카드 최적화 */
.quiz-hanzi-card.toeic-card {
    font-size: 46px; /* 알파벳 길이가 길기 때문에 폰트 크기를 영문에 맞춰 조정 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
    color: #1e3a8a; /* 신뢰감을 주는 네이비 블루 톤 변경 */
    padding: 0 15px;
    word-break: break-all;
}

/* 오답노트 영단어 출력부 */
.wrong-hanzi.toeic-wrong-word {
    font-size: 16px;
    width: auto;
    min-width: 110px;
    padding: 8px 12px;
    font-family: sans-serif;
    word-break: break-all;
    text-align: left;
}
/* 오답 리스트 레이아웃 구조 조정 */
.wrong-note-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.wrong-word-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 160px; /* 단어와 버튼 영역 확보 */
    padding-right: 15px;
    border-right: 1px solid #e2e8f0;
    margin-right: 15px;
}

.toeic-wrong-word {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

/* 현대적인 스피커 버튼 디자인 */
.btn-speaker {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.speaker-svg {
    width: 16px;
    height: 16px;
}

/* 마우스 오버 시 생동감 있는 시각 효과 */
.btn-speaker:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    transform: scale(1.05);
}

.btn-speaker:active {
    transform: scale(0.95);
}

.wrong-desc {
    flex: 1;
}
/* 상단 헤더 내 프린트 버튼 레이아웃 */
.wrong-note-container h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-print-action {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.print-svg {
    width: 14px;
    height: 14px;
}

.btn-print-action:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* ==========================================================================
   🖨️ 프린트 출력 전용 CSS (인쇄창 띄울 때만 브라우저가 자동 적용)
   ========================================================================== */
@media print {
    /* 1. 그누보드 전체 레이아웃 및 퀴즈 불필요 요소 전면 숨김 처리 */
    body, #hd, #ft, #aside, .quiz-header, .result-board, .quiz-btn, #hd_pop, .sound_only {
        display: none !important;
    }

    /* 2. 오답노트 영역만 화면 가득 노출 */
    #tofle_quiz_container {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .wrong-note-container {
        border: none !important;
        margin: 0 !important;
    }

    /* 3. 인쇄 용지 안에서 스크롤바가 생기지 않도록 차단 */
    .wrong-note-list {
        max-height: none !important;
        overflow-y: visible !important;
    }

    /* 4. 종이에 인쇄할 때는 불필요한 기능성 버튼 숨김 */
    .btn-print-action, .btn-speaker {
        display: none !important;
    }

    /* 5. 인쇄물 가독성을 위한 여백 및 경계선 강화 */
    .wrong-note-item {
        page-break-inside: avoid; /* 단어가 종이 경계선에서 잘리는 현상 방지 */
        border-bottom: 1px solid #94a3b8 !important;
        padding: 15px 0 !important;
    }

    .wrong-word-side {
        border-right: 2px solid #334155 !important;
    }
}
