:root {
    --primary: #2D5BFF;
    --primary-dark: #1E3FB8;
    --secondary: #FF6B6B;
    --accent: #4ECDC4;
    --success: #51CF66;
    --warning: #FFD93D;
    --bg-main: #F8F9FE;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 20px;
    height: 100vh;
}

/* 暫時移除，稍後會加入完整的 RWD */

/* Header */
.header {
    grid-column: 1 / -1;
    background: var(--bg-card);
    padding: 24px 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: pulse 2s infinite;
}

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

.logo-text {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Sidebar */
.sidebar {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    animation: slideRight 0.6s ease;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenario-btn {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
    background: var(--bg-main);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.scenario-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.scenario-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.scenario-icon {
    font-size: 20px;
}

/* Main Chat Area */
.chat-container {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chat-header {
    padding: 20px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 20px;
    font-weight: 700;
}

.chat-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    animation: slideUp 0.4s ease;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--secondary), #FF8E53);
}

.message.ai .message-avatar {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 15px;
    position: relative;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, var(--secondary), #FF8E53);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai .message-bubble {
    background: var(--bg-main);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.ai .message-bubble.hidden {
    filter: blur(8px);
    user-select: none;
    cursor: pointer;
}

.toggle-visibility {
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 10px;
    background: var(--border);
    border-radius: 6px;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.toggle-visibility:hover {
    background: var(--primary);
    color: white;
}

.grammar-correction {
    background: #FFF3CD;
    border-left: 4px solid var(--warning);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 8px;
}

.grammar-correction-title {
    font-weight: 700;
    color: #856404;
    margin-bottom: 6px;
}

.word-explanation {
    background: #D1ECF1;
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 8px;
}

.word-explanation-title {
    font-weight: 700;
    color: #0C5460;
    margin-bottom: 6px;
}

.clickable-word {
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.clickable-word:hover {
    color: var(--primary-dark);
}

/* Input Area */
.input-area {
    padding: 24px 28px;
    background: var(--bg-main);
    border-top: 2px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.voice-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.voice-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.voice-btn.recording {
    animation: recordingPulse 1.5s infinite;
    background: linear-gradient(135deg, var(--secondary), #FF8E53);
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 107, 107, 0); }
}

.text-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 91, 255, 0.1);
}

.send-btn {
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Vocabulary Panel */
.vocabulary-panel {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    animation: slideLeft 0.6s ease;
}

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

.vocab-item {
    background: var(--bg-main);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
    cursor: pointer;
}

.vocab-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.vocab-word {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.vocab-definition {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.vocab-translation {
    font-size: 14px;
    color: var(--accent);
    background: rgba(45, 91, 255, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-weight: 500;
    line-height: 1.6;
    border-left: 3px solid var(--accent);
}

.vocab-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.vocab-action-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.vocab-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
    line-height: 1.6;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.status-bar {
    padding: 8px 16px;
    background: rgba(45, 91, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.loading-dots {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: loadingDot 1.4s infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDot {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== 登入/註冊 Modal 樣式 ===== */
.auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.auth-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal h2 {
    margin-bottom: 10px;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-modal p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 91, 255, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-btn-google {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn-google:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: var(--bg-card);
    padding: 0 12px;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg-main);
    border-radius: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-email {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.logout-btn {
    padding: 6px 12px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #FF5252;
}

/* ==================== 語音設定 ==================== */
.voice-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-main);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

.voice-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.2);
}

.voice-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.voice-slider::-moz-range-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.2);
}

/* ==========================================
   Quiz Styles
   ========================================== */

/* 測驗按鈕容器 */
.quiz-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-main);
    border-radius: 12px;
}

.quiz-start-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.quiz-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quiz-start-btn:active {
    transform: translateY(0);
}

/* 測驗 Modal */
.quiz-modal {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 0;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
}

.quiz-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.quiz-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.quiz-progress {
    position: absolute;
    bottom: 12px;
    left: 32px;
    font-size: 13px;
    opacity: 0.9;
}

.quiz-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quiz-content {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

/* 題目區域 */
.quiz-question {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-question h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.quiz-question p {
    font-size: 16px;
    color: var(--text-secondary);
    white-space: pre-line;
    line-height: 1.6;
}

.quiz-hint {
    margin-top: 12px;
    padding: 12px 16px;
    background: #FFF4E6;
    border-left: 4px solid var(--warning);
    border-radius: 8px;
    font-size: 14px;
    color: #B8860B;
}

/* 聽力測驗特殊樣式 */
.quiz-question.listening {
    padding: 40px;
    background: linear-gradient(135deg, #667eea22, #764ba222);
    border-radius: 16px;
    margin-bottom: 32px;
}

.listening-icon {
    font-size: 64px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-block;
}

.listening-icon:hover {
    transform: scale(1.1);
}

.quiz-replay-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-replay-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 選項區域 */
.quiz-options {
    display: grid;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: var(--bg-main);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz-option:hover:not(:disabled) {
    background: #E8EEFE;
    border-color: var(--primary);
    transform: translateX(8px);
}

.quiz-option:disabled {
    cursor: not-allowed;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    color: var(--text-primary);
}

.quiz-option.correct {
    background: #E6F9F0;
    border-color: var(--success);
    animation: correctPulse 0.6s ease;
}

.quiz-option.correct .option-letter {
    background: var(--success);
    color: white;
}

.quiz-option.correct .option-text::after {
    content: " ✓";
    color: var(--success);
    font-weight: 700;
}

.quiz-option.wrong {
    background: #FFEAEA;
    border-color: var(--secondary);
    animation: wrongShake 0.5s ease;
}

.quiz-option.wrong .option-letter {
    background: var(--secondary);
    color: white;
}

.quiz-option.wrong .option-text::after {
    content: " ✗";
    color: var(--secondary);
    font-weight: 700;
}

/* 測驗結果 */
.quiz-result {
    text-align: center;
}

.result-emoji {
    font-size: 72px;
    margin-bottom: 16px;
}

.quiz-result h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.result-score {
    margin: 32px 0;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    margin-bottom: 16px;
}

.score-number {
    font-size: 48px;
    font-weight: 800;
}

.score-total {
    font-size: 18px;
    opacity: 0.9;
}

.score-percentage {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.all-correct {
    font-size: 18px;
    color: var(--success);
    font-weight: 600;
    padding: 20px;
    background: #E6F9F0;
    border-radius: 12px;
    margin: 24px 0;
}

/* 錯題列表 */
.quiz-wrong-answers {
    text-align: left;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-main);
    border-radius: 12px;
}

.quiz-wrong-answers h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.wrong-answer-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--secondary);
}

.wrong-question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.wrong-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.your-answer {
    color: var(--secondary);
}

.correct-answer {
    color: var(--success);
    font-weight: 600;
}

/* 結果按鈕 */
.quiz-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.quiz-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.quiz-btn-secondary:hover {
    background: var(--bg-main);
}

/* 動畫 */
@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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