/* ============================================================
   物理课堂互动系统 - 校园轻搞笑扁平卡通风
   主色调：珊瑚红 + 青绿 + 明黄 + 奶油白
   ============================================================ */

/* ── CSS 变量 ── */
:root {
    --coral: #FF6B6B;
    --coral-light: #FF8E8E;
    --teal: #4ECDC4;
    --teal-light: #7EDDD6;
    --yellow: #FFE66D;
    --yellow-dark: #F0D050;
    --cream: #FFF8F0;
    --white: #FFFFFF;
    --dark: #2D3436;
    --gray: #636E72;
    --gray-light: #B2BEC3;
    --gray-bg: #F5F6FA;
    --success: #00B894;
    --danger: #FF7675;
    --info: #74B9FF;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
    --shadow-card: 0 4px 16px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.04);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
             "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font);
    font-size: 16px;
    color: var(--dark);
    background: var(--gray-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   教师端样式
   ============================================================ */
.teacher-body {
    background: linear-gradient(135deg, #FFF8F0 0%, #F5F6FA 50%, #FFF0F0 100%);
    min-height: 100vh;
}

/* ── 顶部导航栏 ── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: var(--white);
    border-bottom: 3px solid var(--yellow);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo { font-size: 32px; animation: logoSpin 4s linear infinite; }
@keyframes logoSpin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

.topbar-left h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--coral), #E17055);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-teal {
    background: var(--teal-light);
    color: #00695C;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--gray);
}

.session-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--success);
}

.clock {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--dark);
    background: var(--gray-bg);
    padding: 4px 14px;
    border-radius: 20px;
}

/* ── Dashboard 三栏布局 ── */
.dashboard {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 20px;
    padding: 20px 28px;
    max-width: 1440px;
    margin: 0 auto;
}

/* ── 通用面板 ── */
.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--gray-light);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.panel-subtitle {
    font-size: 12px;
    color: var(--gray-light);
}

/* ── 二维码面板 ── */
.panel-qr { align-items: center; text-align: center; }

.qr-wrapper {
    background: var(--white);
    border: 3px dashed var(--teal);
    border-radius: var(--radius);
    padding: 16px;
    display: inline-block;
    transition: var(--transition);
}
.qr-wrapper:hover {
    border-color: var(--coral);
    transform: scale(1.02);
}

#qrcode canvas, #qrcode img {
    display: block;
    border-radius: 8px;
}

.qr-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-url {
    font-size: 11px;
    color: var(--gray-light);
    word-break: break-all;
    max-width: 100%;
    background: var(--gray-bg);
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.attendance-count {
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    color: var(--white);
    border-radius: var(--radius);
    padding: 16px 32px;
    margin-top: 8px;
}

.count-number {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.count-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ── 随机点名面板 ── */
.panel-picker {
    align-items: center;
    justify-content: center;
}

.picker-display {
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF8F0, #FFF0F0);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.picker-name {
    font-size: 56px;
    font-weight: 900;
    color: var(--coral);
    text-align: center;
    transition: all 0.1s ease;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.picker-name.spinning {
    animation: nameSpin 0.08s steps(1) infinite;
    color: var(--gray-light);
    font-size: 36px;
}
@keyframes nameSpin {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.picker-name.landed {
    animation: nameLand 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--coral);
    font-size: 56px;
}
@keyframes nameLand {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.picker-id {
    font-size: 16px;
    color: var(--gray);
    margin-top: 8px;
}

.picker-animation.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.picker-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.pick-count-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 被点名学生列表 */
.picked-students {
    width: 100%;
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.pick-student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #E8E8E8;
}
.pick-student-row:last-child { border-bottom: none; }

.pick-status {
    font-size: 13px;
    font-weight: 500;
}

/* ── 出题区 ── */
.question-area {
    width: 100%;
    text-align: center;
}

.question-card {
    background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
    border-left: 5px solid var(--yellow-dark);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: left;
    margin-bottom: 12px;
}

.question-chapter {
    display: inline-block;
    background: var(--teal);
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.question-content {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.7;
}

.question-difficulty {
    margin-top: 8px;
    font-size: 13px;
    color: var(--gray);
}

.question-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── 答题结果区 ── */
.result-area {
    text-align: center;
    padding: 20px;
}

.result-emoji {
    font-size: 72px;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-message {
    font-size: 20px;
    font-weight: 700;
    margin-top: 8px;
    color: var(--dark);
}

.result-attempts {
    font-size: 14px;
    color: var(--gray);
    margin-top: 4px;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── 统计面板 ── */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.stat-item.stat-wide {
    grid-column: 1 / -1;
}

.stat-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--teal);
}

.text-danger { color: var(--danger) !important; }
.stat-number.text-danger { color: var(--danger); }

.stat-label {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

/* ── 底部跑马灯 ── */
.ticker-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    background: var(--white);
    border-top: 2px solid var(--gray-light);
    margin: 0 28px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
}

.ticker-label {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    color: var(--dark);
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    font-size: 13px;
    color: var(--gray);
}

.ticker-scroll span {
    display: inline-block;
    padding: 2px 10px;
    margin: 0 4px;
    background: var(--teal-light);
    color: #00695C;
    border-radius: 12px;
    font-weight: 600;
}

.ticker-empty {
    background: transparent !important;
    color: var(--gray-light) !important;
}

/* ============================================================
   学生端样式（手机优化）
   ============================================================ */
.student-body {
    background: linear-gradient(180deg, #FFF8F0 0%, #FFECD2 50%, #FFE0E0 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.student-page {
    animation: fadeSlideUp 0.35s ease;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.student-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.student-card-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.student-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
}

.student-card-desc {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 20px;
}

.student-form { text-align: left; }
.form-row { display: flex; gap: 8px; }

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font);
    transition: var(--transition);
    background: var(--gray-bg);
}
.form-select {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm); font-size: 16px; font-family: var(--font);
    background: var(--gray-bg); cursor: pointer; appearance: auto;
}
.form-select:focus { outline: none; border-color: var(--teal); }

.form-group input:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.student-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
    margin-top: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-online { background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,184,148,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(0,184,148,0); }
}

.student-actions {
    margin-top: 16px;
}

/* 被点名高亮卡 */
.card-highlight {
    border: 3px solid var(--coral);
    animation: highlightPulse 1.5s infinite;
}
@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.3); }
    50% { box-shadow: 0 0 0 16px rgba(255,107,107,0); }
}

.question-display {
    background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.q-badge {
    display: inline-block;
    background: var(--teal);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.q-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.6;
}

.timeout-area {
    text-align: center;
    margin-top: 12px;
}

/* 答题结果 */
.result-big-emoji {
    font-size: 80px;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-attempts-info {
    font-size: 13px;
    color: var(--gray);
    margin: 8px 0 16px;
}

/* 平时分展示 */
.score-display {
    padding: 20px 0;
}

.score-big {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--coral), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.score-detail-item {
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.score-detail-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--teal);
}
.score-detail-num.danger { color: var(--danger); }

.score-detail-label {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    text-align: center;
    max-width: 90vw;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
}

/* ============================================================
   按钮系统
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--coral), var(--coral-light));
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255,107,107,0.45);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    color: white;
    box-shadow: 0 4px 15px rgba(78,205,196,0.3);
}
.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(78,205,196,0.45);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-light);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.btn-ghost {
    background: transparent;
    color: var(--gray);
    border: none;
    font-weight: 500;
}
.btn-ghost:hover { color: var(--dark); }

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
    border-radius: 40px;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-bounce:hover {
    animation: btnBounce 0.5s ease;
}
@keyframes btnBounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(-4px); }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray);
    cursor: pointer;
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--teal);
    width: 18px;
    height: 18px;
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-card.modal-wide {
    max-width: 800px;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gray-bg);
    position: sticky;
    top: 0;
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-bg);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.btn-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 20px;
}

/* 题库列表 */
.question-bank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--gray-bg);
    cursor: pointer;
    transition: var(--transition);
    gap: 12px;
}
.question-bank-item:hover {
    background: var(--teal-light);
}
.question-bank-item .q-preview {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.question-bank-item .q-meta {
    font-size: 11px;
    color: var(--gray);
    white-space: nowrap;
}

/* 成绩表格 */
.scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.scores-table th,
.scores-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--gray-bg);
}
.scores-table th {
    background: var(--gray-bg);
    font-weight: 700;
    position: sticky;
    top: 0;
}
.scores-table .score-cell {
    font-weight: 800;
    font-size: 16px;
    background: linear-gradient(135deg, var(--coral), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 签到名单 */
.checkin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.checkin-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--teal-light);
    color: #00695C;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
   撒花特效
   ============================================================ */
.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    animation: confettiFall 2s ease-out forwards;
    pointer-events: none;
}
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* ── 选项按钮 ── */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    text-align: left;
    font-size: 15px;
}

.option-btn.opt-hidden { display: none !important; }

.option-btn:hover {
    border-color: var(--teal);
    background: #F0FDFA;
    transform: translateX(4px);
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.selected {
    border-color: var(--info);
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(116,185,255,0.2);
}

.option-btn.correct {
    border-color: var(--success) !important;
    background: #ECFDF5 !important;
    animation: pulseGreen 0.6s ease;
}
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,184,148,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(0,184,148,0); }
}

.option-btn.wrong {
    border-color: var(--danger) !important;
    background: #FFF5F5 !important;
    animation: shake 0.5s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}

.opt-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gray-bg);
    font-weight: 900;
    font-size: 16px;
    color: var(--dark);
    flex-shrink: 0;
}

.option-btn.selected .opt-letter {
    background: var(--info);
    color: white;
}

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

.option-btn.wrong .opt-letter {
    background: var(--danger);
    color: white;
}

.opt-text {
    flex: 1;
    line-height: 1.5;
}

/* ── 教师端选项展示 ── */
.options-display {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.opt-display-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #E0E0E0;
}

.opt-display-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--yellow);
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── 响应式：小屏幕堆叠布局 ── */
@media (max-width: 1100px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .panel-picker { min-height: auto; }
    .picker-name { font-size: 36px; }
    .picker-name.landed { font-size: 36px; }
    .ticker-bar { margin: 0 16px 16px; }
}

@media (max-width: 600px) {
    .topbar { padding: 10px 16px; }
    .topbar-left h1 { font-size: 16px; }
    .dashboard { padding: 10px; gap: 12px; }
    .count-number { font-size: 36px; }
}

/* ── 课程计划组件 ── */
.plan-section {
    border-top: 2px dashed var(--gray-light);
    padding-top: 12px;
}

.plan-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.plan-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}

.plan-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--yellow);
    color: #8B6914;
}

.plan-info {
    font-size: 12px;
    margin-bottom: 8px;
}

.text-muted { color: var(--gray-light); }

.plan-actions {
    display: flex;
    gap: 6px;
}

/* 计划管理弹窗 */
.plan-create-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-bg);
}

.plan-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
}
.plan-input:focus {
    outline: none;
    border-color: var(--teal);
}

.plan-list { display: flex; flex-direction: column; gap: 8px; }

.plan-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.plan-list-item:hover { background: var(--teal-light); }
.plan-list-item .pl-title {
    font-weight: 700;
    font-size: 15px;
}
.plan-list-item .pl-meta {
    font-size: 12px;
    color: var(--gray);
}
.plan-list-item .pl-actions {
    display: flex;
    gap: 6px;
}

.plan-detail-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-bg);
}

.plan-detail-count {
    font-size: 13px;
    color: var(--gray);
    margin-left: auto;
}

.plan-detail-questions {
    max-height: 50vh;
    overflow-y: auto;
}

/* 导入 */
.import-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Consolas', 'Courier New', monospace;
    resize: vertical;
    line-height: 1.6;
}
.import-textarea:focus {
    outline: none;
    border-color: var(--teal);
}

.import-sample h4 {
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--gray);
}

/* ── 班级标签 ── */
.class-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.class-tag {
    display: inline-block; padding: 6px 14px; border-radius: 20px;
    border: 2px solid var(--gray-light); font-size: 13px; font-weight: 600;
    transition: var(--transition); background: var(--white);
}
.class-tag:hover { border-color: var(--teal); background: #F0FDFA; }
.class-tag.active { border-color: var(--teal); background: var(--teal); color: white; }
.class-tag small { font-weight: 400; opacity: 0.7; }

/* ── 上课/下课按钮 ── */
.class-toggle {
    font-size: 20px !important;
    padding: 12px 28px !important;
    border-radius: 40px !important;
    font-weight: 900 !important;
    background: var(--gray-light);
    color: white;
    transition: all 0.3s ease;
}
.class-toggle.active {
    background: linear-gradient(135deg, var(--success), #00CEC9);
    animation: classPulse 2s infinite;
}
@keyframes classPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(0,184,148,0.4); }
    50% { box-shadow: 0 0 0 16px rgba(0,184,148,0); }
}

/* ── 班级选择器 ── */
.plan-select {
    flex: 1;
    padding: 6px 12px;
    border: 2px solid var(--gray-light);
    border-radius: 20px;
    font-size: 13px;
    font-family: var(--font);
    background: var(--white);
    cursor: pointer;
    min-width: 0;
}
.plan-select:focus {
    outline: none;
    border-color: var(--teal);
}

/* 班级学生列表 */
.class-student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    gap: 12px;
}
.class-student-row .cs-name {
    font-weight: 600;
    font-size: 14px;
}
.class-student-row .cs-id {
    font-size: 12px;
    color: var(--gray);
}
.class-student-row .cs-meta {
    font-size: 11px;
    color: var(--gray-light);
}
.class-student-row .cs-badge-manual {
    font-size: 10px;
    background: var(--yellow);
    color: #8B6914;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.class-student-row .cs-badge-auto {
    font-size: 10px;
    background: var(--teal-light);
    color: #00695C;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
