/**
 * courseware.css — 课件外壳页 (course.html) 专用样式
 * 包含:课件 iframe 容器、AI 提示气泡、练习题面板、设置弹窗、反馈弹窗
 * 拆分自 course.html 内联 <style>(2026-05-13)
 */

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

#course-frame {
    width: 100%;
    height: calc(100vh - 70px);
    border: none;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 70px);
    gap: 16px;
}

/* ===== 课件加载 Loader v3 (升级小元 + 删除小知识胶囊) ===== */
.lesson-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-height: calc(100vh - 70px);
    padding: var(--spacing-xl) var(--spacing-lg);
}

/* 小元舞台 */
.lesson-loader__stage {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 占位状态(JS 加载前的纯背景圆) */
.lesson-loader__avatar--placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
    animation: placeholderPulse 1.6s ease-in-out infinite;
}
@keyframes placeholderPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.04); }
}

/* 小元主 SVG 容器(viewBox 800x800,由 stage 自动 scale) */
.lesson-loader__xiaoyuan {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 整体上下浮动 + 微旋(参考设计稿的 .float)*/
.lesson-loader__xiaoyuan .xy-float {
    animation: xyFloat 3.6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: 50% 50%;
}
@keyframes xyFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-12px) rotate(-1.8deg); }
}

/* 天线左右摇摆(参考设计稿的 .antenna)*/
.lesson-loader__xiaoyuan .xy-antenna {
    animation: xyAntennaWiggle 3.2s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: 50% 80%;
}
@keyframes xyAntennaWiggle {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(3deg); }
}

/* 文案区:fade 切换 */
.lesson-loader__messages {
    position: relative;
    height: 26px;
    min-width: 280px;
    text-align: center;
}

.lesson-loader__message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.lesson-loader__message.is-active {
    opacity: 1;
    transform: translateY(0);
}

/* 视觉感进度条(纯心理安慰) */
.lesson-loader__bar {
    margin-top: 4px;
    width: 240px;
    height: 4px;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.lesson-loader__bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: inherit;
    animation: loaderBarSweep 2s ease-in-out infinite;
}

@keyframes loaderBarSweep {
    0%   { transform: translateX(-100%); width: 30%; }
    50%  { width: 50%; }
    100% { transform: translateX(360%); width: 30%; }
}

@media (prefers-reduced-motion: reduce) {
    .lesson-loader__xiaoyuan .xy-float,
    .lesson-loader__xiaoyuan .xy-antenna,
    .lesson-loader__bar-fill,
    .lesson-loader__avatar--placeholder {
        animation: none;
    }
}

@media (max-width: 480px) {
    .lesson-loader__stage    { width: 220px; height: 220px; }
    .lesson-loader__bar      { width: 200px; }
    .lesson-loader__messages { min-width: 240px; }
}

/* AI 提示气泡 */
.ai-tip-bubble {
    position: fixed;
    right: 28px;
    bottom: 120px;
    max-width: 220px;
    background: rgba(255, 255, 255, 0.97);
    color: #334155;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: var(--z-tooltip, 700);
    cursor: pointer;
}

.ai-tip-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.97);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transform: rotate(45deg);
}

/* ===== 练习题面板 (v3: 右侧抽屉, 不再全屏遮挡课件) ===== */
.practice-panel {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: var(--z-modal, 500);
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    overflow: hidden;
}

.practice-panel.open { display: flex; }

.practice-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: 20px 0 0 20px;
    width: 100%;
    max-width: 640px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-shadow: -20px 0 50px -12px rgba(15, 23, 42, 0.35);
    animation: practiceSlideInRight 0.32s cubic-bezier(0.32, 0.72, 0.32, 1);
    display: flex;
    flex-direction: column;
}

@keyframes practiceSlideInRight {
    from { opacity: 0.5; transform: translateX(100%); }
    to   { opacity: 1;   transform: translateX(0); }
}

@media (max-width: 640px) {
    .practice-content {
        max-width: 100%;
        border-radius: 0;
    }
    @keyframes practiceSlideInRight {
        from { opacity: 0; transform: translateY(40px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

.practice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(var(--primary-rgb), 0.08);
    flex-shrink: 0;
}

.practice-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.practice-header h3 svg {
    width: 24px;
    height: 24px;
    color: var(--primary-dark);
}

.practice-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #dc2626;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.practice-close:hover { background: rgba(239, 68, 68, 0.35); }

.practice-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.practice-knowledge {
    background: rgba(var(--primary-rgb), 0.12);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: #065f46;
}

.practice-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
}

.practice-loading .spinner {
    width: 50px;
    height: 50px;
}

/* ===== 题目 ===== */
.question-item {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.question-type.choice  { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.question-type.fill    { background: rgba(168, 85, 247, 0.15); color: #7c3aed; }
.question-type.code    { background: rgba(249, 115, 22, 0.15); color: #c2410c; }

.question-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* 选择题选项 */
.choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.choice-option:hover {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(99, 102, 241, 0.3);
}

.choice-option.selected {
    background: rgba(99, 102, 241, 0.18);
    border-color: #818cf8;
}

.choice-option.correct {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
}

.choice-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #f87171;
}

.choice-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.choice-option.selected .choice-radio {
    border-color: #818cf8;
    background: #818cf8;
}

.choice-option.selected .choice-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* 填空题 */
.fill-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
}

.fill-input:focus {
    border-color: #818cf8;
    background: #ffffff;
}

.fill-input.correct {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.fill-input.wrong {
    border-color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

/* 题目中的代码块 */
.question-code {
    background: #0d1117;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #e6edf3;
    overflow-x: auto;
    white-space: pre;
}

.question-code .keyword  { color: #ff7b72; }
.question-code .string   { color: #a5d6ff; }
.question-code .comment  { color: #8b949e; }
.question-code .number   { color: #79c0ff; }
.question-code .function { color: #d2a8ff; }

/* ===== 编程题代码编辑器 ===== */
.code-editor-wrapper {
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
    transition: border-color 0.2s;
}

.code-editor-wrapper:focus-within { border-color: #818cf8; }

.code-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #161b22;
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
}

.code-editor-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8b949e;
}

.code-editor-title::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #238636;
    border-radius: 50%;
}

.code-editor-lang {
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    font-size: 11px;
    color: #818cf8;
}

.code-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    background: transparent;
    border: none;
    color: #e6edf3;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    tab-size: 4;
}

.code-textarea::placeholder { color: #484f58; }

.code-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border-left: 3px solid #60a5fa;
}

.monaco-container {
    height: 220px;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.code-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #161b22;
    border-top: 1px solid rgba(71, 85, 105, 0.5);
}

.copy-code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* 程序输入区域 */
.stdin-section {
    border-top: 1px solid rgba(71, 85, 105, 0.5);
    background: #0d1117;
}

.stdin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #8b949e;
    font-size: 12px;
    transition: color 0.2s;
}

.stdin-toggle:hover { color: #e6edf3; }

.stdin-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.stdin-toggle.open svg { transform: rotate(90deg); }

.stdin-content {
    display: none;
    padding: 0 12px 12px;
}

.stdin-content.open { display: block; }

.stdin-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    background: #161b22;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 6px;
    color: #e6edf3;
    font-family: var(--font-mono);
    font-size: 13px;
    resize: vertical;
    outline: none;
}

.stdin-textarea:focus { border-color: #818cf8; }
.stdin-textarea::placeholder { color: #484f58; }

.stdin-hint {
    font-size: 11px;
    color: #6e7681;
    margin-top: 6px;
}

/* 运行结果 */
.code-output {
    margin-top: 12px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: #0d1117;
}

.code-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #161b22;
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
    font-size: 12px;
    color: #8b949e;
}

.code-output-body {
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.code-output-body.success { color: #4ade80; }
.code-output-body.error   { color: #f87171; }
.code-output-body.info    { color: #60a5fa; }
.code-output-body.waiting { color: var(--text-muted); }
.code-output-body.warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    padding-left: 12px;
}

/* ===== 答案反馈 ===== */
.question-feedback {
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
    line-height: 1.7;
}

.question-feedback.show { display: block; }

.question-feedback.correct {
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: #065f46;
}

.question-feedback.wrong {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.question-feedback.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

.feedback-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.feedback-section-title {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-code {
    background: #0d1117;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: #e6edf3;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* ===== 练习题 footer 提交栏 ===== */
.practice-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(241, 245, 249, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.practice-score {
    font-size: 16px;
    color: var(--text-muted);
}

.practice-score strong {
    color: var(--primary-dark);
    font-size: 24px;
}

.practice-submit {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.practice-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.practice-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.practice-retry {
    padding: 12px 24px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #6366f1;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.practice-retry:hover { background: rgba(99, 102, 241, 0.3); }

/* ===== 练习题设置弹窗 ===== */
.practice-settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: calc(var(--z-modal, 500) + 1);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.practice-settings-modal.open { display: flex; }

.practice-settings-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    animation: practiceSlideIn 0.3s ease;
}

.practice-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 16px 16px 0 0;
}

.practice-settings-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
}

.practice-settings-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.practice-settings-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.practice-settings-body { padding: 20px; }

.settings-group { margin-bottom: 20px; }
.settings-group:last-child { margin-bottom: 0; }

.settings-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.settings-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-option {
    flex: 1;
    min-width: 80px;
}

.settings-option input { display: none; }

.settings-option label {
    display: block;
    padding: 12px 16px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.settings-option input:checked + label {
    background: rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.5);
    color: var(--primary-dark);
}

.settings-option label:hover { background: rgba(226, 232, 240, 0.8); }

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

.settings-count select {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.settings-count select:focus { border-color: rgba(var(--primary-rgb), 0.5); }

.settings-count-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.practice-settings-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.settings-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.settings-btn-cancel {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
}

.settings-btn-cancel:hover { background: rgba(226, 232, 240, 0.85); }

.settings-btn-confirm {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
}

.settings-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

.difficulty-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== 反馈弹窗 ===== */
.feedback-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal, 500);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-modal.open { display: flex; }

.feedback-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    animation: feedbackSlideIn 0.3s ease;
}

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

.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.feedback-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.feedback-modal-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #dc2626;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.feedback-modal-close:hover { background: rgba(239, 68, 68, 0.35); }

.feedback-modal-body { padding: 24px; }

.feedback-selected-text {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid #818cf8;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: #4f46e5;
    max-height: 100px;
    overflow-y: auto;
}

.feedback-type-group { margin-bottom: 20px; }

.feedback-type-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.feedback-type-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-type-btn {
    padding: 8px 16px;
    background: rgba(241, 245, 249, 0.8);
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.feedback-type-btn:hover {
    background: rgba(226, 232, 240, 0.85);
    border-color: rgba(99, 102, 241, 0.3);
}

.feedback-type-btn.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: #818cf8;
    color: #7c3aed;
}

.feedback-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    background: rgba(241, 245, 249, 0.8);
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: var(--transition-fast);
}

.feedback-textarea:focus {
    border-color: #818cf8;
    background: #ffffff;
}

.feedback-textarea::placeholder { color: var(--text-muted); }

.feedback-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.feedback-cancel-btn {
    padding: 10px 20px;
    background: rgba(71, 85, 105, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.feedback-cancel-btn:hover { background: rgba(71, 85, 105, 0.3); }

.feedback-submit-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.feedback-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
