/* ===== 0731创意编程 - 主样式 ===== */
:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --secondary: #004E89;
    --accent: #1A936F;
    --accent-light: #2EC4B6;
    --warning: #FFB703;
    --danger: #EF476F;
    --bg: #F0F4FF;
    --white: #FFFFFF;
    --text: #2D3748;
    --text-light: #718096;
    --border: #E2E8F0;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ===== 导航栏 ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
}

.nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu>li>a:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-menu .btn-register {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 20px;
}

.nav-menu .btn-register:hover {
    background: var(--primary-dark);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* 消息铃铛 */
.nav-msg-bell {
    position: relative;
    list-style: none;
}
.nav-msg-bell a {
    position: relative; display: flex; align-items: center;
    padding: 8px 12px; color: var(--text); font-size: 1.1rem;
    text-decoration: none; transition: color 0.2s;
}
.nav-msg-bell a:hover { color: var(--primary); }
.msg-badge {
    position: absolute; top: 0; right: 2px;
    background: var(--danger); color: #fff; font-size: 0.65rem;
    font-weight: 700; min-width: 18px; height: 18px;
    border-radius: 9px; display: flex; align-items: center;
    justify-content: center; padding: 0 4px; line-height: 1;
}

/* 消息面板 */
.msg-panel-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 999; cursor: default;
}
.msg-panel-overlay.active { display: block; }
.msg-panel {
    display: none; position: fixed; top: 60px; right: 16px;
    width: 420px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px);
    background: #fff; border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 1000; flex-direction: column; overflow: hidden;
}
.msg-panel.active { display: flex; }
.msg-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    background: #FAFBFC;
}
.msg-panel-header h3 { font-size: 1.05rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.msg-panel-header h3 i { color: var(--primary); }
.msg-panel-actions { display: flex; gap: 8px; align-items: center; }
.msg-action-btn {
    background: none; border: none; color: var(--text-light); cursor: pointer;
    font-size: 0.8rem; padding: 4px 10px; border-radius: 6px; transition: all 0.2s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.msg-action-btn:hover { background: #EDF2F7; color: var(--primary); }
.msg-close-btn {
    background: none; border: none; color: var(--text-light); cursor: pointer;
    font-size: 1rem; padding: 4px 8px; border-radius: 6px; transition: all 0.2s;
}
.msg-close-btn:hover { background: #EDF2F7; color: var(--danger); }
.msg-panel-body { flex: 1; overflow-y: auto; padding: 0; }
.msg-loading { text-align: center; padding: 40px; color: var(--text-light); }
.msg-empty { text-align: center; padding: 40px; color: var(--text-light); }
.msg-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: #CBD5E0; }

/* 消息列表项 */
.msg-item {
    display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #F1F5F9;
    cursor: pointer; transition: background 0.15s; align-items: flex-start;
}
.msg-item:hover { background: #FAFBFC; }
.msg-item.unread { background: #FFF8E1; }
.msg-item.unread:hover { background: #FFF3CD; }
.msg-item-icon {
    width: 36px; height: 36px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.msg-item-icon.login { background: #E8F5E9; color: #2E7D32; }
.msg-item-icon.logout { background: #FFEBEE; color: #C62828; }
.msg-item-icon.system { background: #E3F2FD; color: #1565C0; }
.msg-item-content { flex: 1; min-width: 0; }
.msg-item-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.msg-item-text { font-size: 0.82rem; color: var(--text-light); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item-time { font-size: 0.72rem; color: #A0AEC0; margin-top: 4px; }
.msg-item .unread-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
    flex-shrink: 0; margin-top: 6px;
}
.msg-panel-footer {
    padding: 12px 20px; border-top: 1px solid var(--border); text-align: center;
}
.msg-panel-footer a {
    font-size: 0.85rem; color: var(--primary); text-decoration: none;
}
.msg-panel-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .msg-panel { top: 56px; right: 4px; left: 4px; width: auto; max-width: none; border-radius: 12px; }
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    list-style: none;
    padding: 8px 0;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--bg);
    color: var(--primary);
}

.user-menu .dropdown-menu {
    right: 0;
    left: auto;
}

/* ===== Hero区域 ===== */
.hero {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 30%, #FFB703 60%, #1A936F 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="50" cy="70" r="2.5" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="85" r="2" fill="rgba(255,255,255,0.06)"/><circle cx="90" cy="80" r="1.5" fill="rgba(255,255,255,0.08)"/></svg>') repeat;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero 两栏布局 */
.hero-row {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-main {
    flex: 1;
    text-align: center;
}

.hero-main h1 {
    font-size: 2.5rem;
}

.hero-main p {
    max-width: none;
    margin: 0 auto 24px;
}

.hero-main .hero-btns {
    justify-content: center;
}

/* Hero 右侧新闻公告面板 */
.hero-news {
    width: 320px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    text-align: left;
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.hero-news-header {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hero-news-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
}

.hero-news-list::-webkit-scrollbar {
    width: 4px;
}

.hero-news-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.hero-news-item {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.hero-news-item:last-child {
    border-bottom: none;
}

.hero-news-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hero-news-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-news-text {
    font-size: 0.8rem;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.hero-news-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 4px;
}

/* ===== 公告详情页 ===== */
.announcement-detail-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.announcement-detail-main {
    flex: 1;
    min-width: 0;
}

.announcement-detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.announcement-detail-header {
    padding: 32px 32px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-detail-header h1 {
    font-size: 1.6rem;
    margin: 8px 0 12px;
    color: #2d3748;
}

.announcement-pin-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400E;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.announcement-detail-meta {
    display: flex;
    gap: 16px;
    color: #a0aec0;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.announcement-detail-meta i {
    margin-right: 4px;
}

.announcement-detail-body {
    padding: 32px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #4a5568;
    word-break: break-word;
    white-space: pre-line;
}

/* 富文本内容区样式 */
.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.rich-content table td,
.rich-content table th {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
}

.rich-content table th {
    background: #f7fafc;
    font-weight: 600;
}

.rich-content blockquote {
    border-left: 4px solid #FF6B35;
    margin: 12px 0;
    padding: 8px 16px;
    background: #fff7ed;
    color: #9a3412;
}

.rich-content pre {
    background: #1a1a2e;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.rich-content pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin: 16px 0 8px;
    color: #2d3748;
}

.rich-content p {
    margin: 8px 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 24px;
    margin: 8px 0;
}

.rich-content ul li,
.rich-content ol li {
    margin: 4px 0;
}

.rich-content a {
    color: #FF6B35;
    text-decoration: underline;
}

.rich-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
}

.rich-content iframe,
.rich-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.announcement-detail-footer {
    padding: 16px 32px;
    border-top: 1px solid #f0f0f0;
}

/* 侧边栏 */
.announcement-detail-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.announcement-sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 20px;
}

.announcement-sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #2d3748;
}

.announcement-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announcement-sidebar-list li {
    border-bottom: 1px solid #f0f0f0;
}

.announcement-sidebar-list li:last-child {
    border-bottom: none;
}

.announcement-sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: #4a5568;
    transition: color 0.2s;
    font-size: 0.9rem;
    gap: 8px;
}

.announcement-sidebar-list a:hover {
    color: var(--primary);
}

.announcement-sidebar-date {
    color: #a0aec0;
    font-size: 0.75rem;
    flex-shrink: 0;
}



.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--white);
    color: var(--primary) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white) !important;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

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

.btn-accent {
    background: var(--accent);
    color: var(--white) !important;
}

.btn-accent:hover {
    background: #158467;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: var(--white) !important;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
}

/* ===== 通用区块 ===== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--secondary);
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* ===== 卡片 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #FF6B35, #FFB703);
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-scratch {
    background: #FFE0B2;
    color: #E65100;
}

.badge-python {
    background: #C8E6C9;
    color: #1B5E20;
}

.badge-cpp {
    background: #BBDEFB;
    color: #0D47A1;
}

.badge-live {
    background: #FFCDD2;
    color: #B71C1C;
    animation: pulse 2s infinite;
}

.badge-upcoming {
    background: #E8EAF6;
    color: #283593;
}

.badge-ended {
    background: #E0E0E0;
    color: #616161;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===== 特性卡片 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-icon.orange {
    background: #FFF3E0;
    color: var(--primary);
}

.feature-icon.blue {
    background: #E3F2FD;
    color: var(--secondary);
}

.feature-icon.green {
    background: #E8F5E9;
    color: var(--accent);
}

.feature-icon.purple {
    background: #F3E5F5;
    color: #9C27B0;
}

.feature-icon.red {
    background: #FFEBEE;
    color: var(--danger);
}

.feature-icon.yellow {
    background: #FFF8E1;
    color: #F9A825;
}

.feature-icon.teal {
    background: #E0F2F1;
    color: #00897B;
}

.feature-icon.pink {
    background: #FCE4EC;
    color: #E91E63;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== 表单 ===== */
.form-container {
    max-width: 480px;
    margin: 60px auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 6px;
    font-size: 1.6rem;
}

.form-container .form-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 28px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .btn {
    width: 100%;
    justify-content: center;
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #FFEBEE;
    color: #B71C1C;
    border: 1px solid #FFCDD2;
}

.alert-success {
    background: #E8F5E9;
    color: #1B5E20;
    border: 1px solid #C8E6C9;
}

.alert-info {
    background: #E3F2FD;
    color: #0D47A1;
    border: 1px solid #BBDEFB;
}

/* ===== 编辑器页面 ===== */
.editor-container {
    display: flex;
    height: calc(100vh - 64px);
}

.editor-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
}

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    background: var(--white);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.editor-area {
    flex: 1;
    display: flex;
}

.editor-code {
    flex: 1;
    background: #1E1E2E;
    color: #CDD6F4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    padding: 20px;
    border: none;
    resize: none;
    outline: none;
    line-height: 1.6;
    tab-size: 4;
}

.editor-output {
    width: 380px;
    background: #181825;
    border-left: 1px solid var(--border);
    color: #CDD6F4;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    padding: 20px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.editor-output .output-header {
    color: var(--text-light);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* ===== C++ 三栏布局：代码 | 输入+输出 ===== */
.cpp-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.cpp-code-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cpp-io-panel {
    width: 400px;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
}

.cpp-input-section,
.cpp-output-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cpp-input-section {
    flex: 0 0 35%;
    min-height: 140px;
    border-bottom: 2px solid var(--border);
}

.cpp-output-section {
    flex: 1;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.panel-header-input {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #0D47A1;
}

.panel-header-output {
    background: linear-gradient(135deg, #1E1E2E, #181825);
    color: #A6E3A1;
}

.panel-header i {
    margin-right: 6px;
}

.btn-clear-input {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: inherit;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.btn-clear-input:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
}

.panel-header-output .btn-clear-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.panel-header-output .btn-clear-input:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.cpp-code-editor {
    flex: 1;
    background: #1E1E2E;
    color: #CDD6F4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    padding: 20px;
    border: none;
    resize: none;
    outline: none;
    line-height: 1.6;
    tab-size: 4;
    width: 100%;
}

.cpp-input-editor {
    flex: 1;
    background: #F8FAFC;
    color: #2D3748;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    padding: 16px;
    border: none;
    resize: none;
    outline: none;
    line-height: 1.5;
    width: 100%;
    min-height: 80px;
}

.cpp-input-editor::placeholder {
    color: #94A3B8;
    font-style: italic;
}

.cpp-output-content {
    flex: 1;
    margin: 0;
    background: #181825;
    color: #CDD6F4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    padding: 16px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 作品展示 ===== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.work-preview {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.work-preview.scratch-bg {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.work-preview.python-bg {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.work-preview.cpp-bg {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
}

.work-info {
    padding: 16px;
}

.work-info h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.work-info p {
    color: var(--text-light);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.work-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.work-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.work-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== 用户概览卡 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

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

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ===== 个人中心 ===== */
.profile-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    margin-bottom: 16px;
}

.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.profile-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.profile-tab.active,
.profile-tab:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 30px;
}

.footer-col h3,
.footer-col h4 {
    color: var(--white);
    margin-bottom: 14px;
}

.footer-col h3 {
    font-size: 1.3rem;
}

.footer-col h4 {
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--warning);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom a:hover {
    color: var(--warning);
}

/* ===== 分类标签 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ================================================================
   全端响应式适配（平板 · 手机 · 小屏手机）
   ================================================================ */

/* ----- 平板 (769px - 1024px) ----- */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-main h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-news {
        width: 280px;
    }

    /* 编辑器平板布局 */
    .cpp-io-panel {
        width: 320px;
        min-width: 260px;
    }

    .editor-sidebar {
        width: 240px;
    }

    .editor-output {
        width: 300px;
    }

    /* 卡片网格 */
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .work-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .section {
        padding: 48px 0;
    }

    .container {
        padding: 0 20px;
    }
}

/* ----- 手机 (≤768px) ----- */
@media (max-width: 768px) {

    /* 容器 */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .section {
        padding: 40px 0;
    }

    /* 导航栏 */
    .nav-toggle {
        display: block;
    }

    .navbar .container {
        padding: 0 12px;
        height: 56px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-lg);
        gap: 0;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .nav-menu.open {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 1.4rem;
    }

    /* Hero */
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-row {
        flex-direction: column;
        gap: 20px;
    }

    .hero-news {
        width: 100%;
        max-height: 220px;
    }

    .hero-main h1 {
        font-size: 1.6rem;
    }

    .hero-btns {
        gap: 10px;
    }

    .hero-btns .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* 标题 */
    .section-title {
        font-size: 1.5rem;
    }

    .section-desc {
        font-size: 0.9rem;
        margin-bottom: 28px;
    }

    /* 卡片网格 */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 24px 16px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .feature-card h3 {
        font-size: 0.95rem;
    }

    /* 作品网格 */
    .work-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .work-preview {
        height: 160px;
    }

    .work-card h3 {
        font-size: 0.95rem;
    }

    .work-card p {
        font-size: 0.8rem;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .stat-card .stat-number {
        font-size: 1.8rem !important;
    }

    .stat-card .stat-label {
        font-size: 0.82rem;
    }

    /* 编辑器布局 */
    .editor-container {
        flex-direction: column;
        height: auto;
    }

    .editor-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .editor-area {
        flex-direction: column;
    }

    .editor-code,
    .editor-output {
        height: 300px;
    }

    .editor-output {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    /* C++ 三栏布局 */
    .cpp-workspace {
        flex-direction: column;
    }

    .cpp-io-panel {
        width: 100%;
        min-width: auto;
        border-left: none;
        border-top: 2px solid var(--border);
        flex-direction: column;
    }

    .cpp-input-section {
        max-height: 150px;
    }

    .cpp-code-editor {
        min-height: 350px;
    }

    /* 表单 */
    .form-container {
        margin: 20px 12px;
        padding: 24px;
    }

    .form-container h2 {
        font-size: 1.3rem;
    }

    /* 页脚 */
    .footer {
        padding: 36px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-col h3 {
        font-size: 1.1rem;
    }

    .footer-col h4 {
        font-size: 0.9rem;
    }

    /* 过滤栏 */
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding-bottom: 4px;
    }

    .filter-tag {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    /* 弹窗 */
    .modal {
        width: 92% !important;
        max-width: 92% !important;
        margin: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px !important;
    }

    /* 公告详情 */
    .announcement-detail-layout {
        flex-direction: column;
    }

    .announcement-detail-sidebar {
        width: 100%;
        position: static;
    }

    .announcement-detail-header,
    .announcement-detail-body,
    .announcement-detail-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .announcement-detail-header h1 {
        font-size: 1.3rem;
    }

    /* 面包屑 */
    .breadcrumb {
        padding: 10px 0;
        font-size: 0.82rem;
    }

    /* 表格 */
    .table-container {
        border-radius: var(--radius-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th,
    td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    th {
        font-size: 0.75rem;
    }

    /* 分页 */
    .pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* 浮动按钮 */
    .floating-btns {
        bottom: 20px;
        right: 12px;
        gap: 8px;
    }

    .floating-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    /* 空状态 */
    .empty-state {
        padding: 40px 16px;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

    /* 作品详情页双栏变单栏 */
    body [style*="grid-template-columns:1fr 340px"] {
        grid-template-columns: 1fr !important;
    }

    /* Scratch 播放器缩放 */
    body [style*="width:916px"] {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
    }

    body [style*="width:916px; height:730px"] {
        width: 100% !important;
        height: auto !important;
        min-height: 420px;
    }

    iframe[style*="width:916px"] {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 916 / 730;
        min-height: 380px;
    }

    /* 个人中心双栏 */
    body [style*="grid-template-columns:320px 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* 课程详情/学校头部 */
    body [style*="padding:40px"] {
        padding: 24px !important;
    }

    body [style*="height:300px"] {
        height: 200px !important;
    }

    /* 考试中心试卷卡片 */
    body [style*="grid-template-columns:repeat(auto-fill, minmax(380px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* 考试答题页 Hydro 分栏布局 */
    .oj-split-layout {
        flex-direction: column !important;
        min-height: auto !important;
    }

    .oj-panel-left {
        flex: none !important;
        min-width: auto !important;
        max-height: 50vh;
        border-right: none !important;
        border-bottom: 1px solid #E5E7EB !important;
    }

    .oj-panel-right {
        min-height: 60vh;
    }

    .oj-answer-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* OJ 首页表格 */
    .oj-problem-table th,
    .oj-problem-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

/* ----- 小屏手机 (≤480px) ----- */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-main h1 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero {
        padding: 32px 0;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-desc {
        font-size: 0.82rem;
    }

    /* 功能卡片小屏单列 */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .stat-card .stat-number {
        font-size: 1.4rem !important;
    }

    .stat-card .stat-label {
        font-size: 0.78rem;
    }

    /* 作品 */
    .work-stats {
        gap: 10px;
        font-size: 0.78rem;
    }

    iframe[style*="width:916px"] {
        min-height: 320px;
    }

    /* 过滤标签 */
    .filter-tag {
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
    }

    /* 导航 */
    .navbar .logo {
        font-size: 0.95rem;
    }

    .navbar .container {
        padding: 0 10px;
    }

    .btn {
        font-size: 0.82rem;
        padding: 8px 16px;
    }

    /* 表单 */
    .form-container {
        margin: 16px 8px;
        padding: 20px 16px;
        border-radius: var(--radius-sm);
    }

    /* 页脚单列 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-col h3 {
        font-size: 1rem;
    }

    /* 面包屑 */
    .breadcrumb {
        font-size: 0.78rem;
    }

    /* 浮动按钮缩小 */
    .floating-btns {
        bottom: 16px;
        right: 8px;
    }

    .floating-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    /* 考试/课程卡片头部 */
    body [style*="height:300px"] {
        height: 160px !important;
    }

    /* 考试答题页表格极致小屏 */
    .oj-problem-table th,
    .oj-problem-table td {
        padding: 6px 8px;
        font-size: 0.72rem;
    }

    .oj-problem-table .col-type {
        display: none;
    }

    .oj-problem-header {
        padding: 14px 16px 12px;
    }

    .oj-problem-header .oj-problem-name {
        font-size: 1rem;
    }

    /* OJ 分页小屏 */
    .pagination a,
    .pagination span {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text);
    font-weight: 500;
}

/* ===== 表格 ===== */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #F8FAFC;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: #F8FAFC;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== 工具类 ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ===== Scratch 加载动画 ===== */
.scratch-loader-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.scratch-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.scratch-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 积木块拼图 */
.scratch-blocks {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    align-items: flex-end;
}

.scratch-block {
    width: 36px;
    border-radius: 6px 6px 4px 4px;
    animation: scratch-block-bounce 1.2s ease-in-out infinite;
    position: relative;
}

.scratch-block::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
}

.scratch-block:nth-child(1) {
    height: 32px;
    background: #FF6B35;
    animation-delay: 0s;
}

.scratch-block:nth-child(2) {
    height: 44px;
    background: #4C97FF;
    animation-delay: 0.15s;
}

.scratch-block:nth-child(3) {
    height: 36px;
    background: #9966FF;
    animation-delay: 0.3s;
}

.scratch-block:nth-child(4) {
    height: 52px;
    background: #FFAB19;
    animation-delay: 0.45s;
}

.scratch-block:nth-child(5) {
    height: 40px;
    background: #40BF4F;
    animation-delay: 0.6s;
}

.scratch-block:nth-child(6) {
    height: 48px;
    background: #FF6680;
    animation-delay: 0.75s;
}

@keyframes scratch-block-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-18px);
    }

    50% {
        transform: translateY(0);
    }
}

/* 猫爪印 */
.scratch-paw {
    margin-bottom: 24px;
    animation: scratch-paw-walk 2s ease-in-out infinite;
}

.scratch-paw i {
    font-size: 2.5rem;
    color: #FFAB19;
    filter: drop-shadow(0 0 8px rgba(255, 171, 25, 0.4));
}

@keyframes scratch-paw-walk {
    0% {
        transform: translateX(-30px) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateX(-10px) scale(1.2);
        opacity: 1;
    }

    50% {
        transform: translateX(10px) scale(1);
        opacity: 0.3;
    }

    75% {
        transform: translateX(30px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateX(30px) scale(1);
        opacity: 0.3;
    }
}

/* 加载文字 */
.scratch-loader-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    animation: scratch-text-pulse 1.5s ease-in-out infinite;
}

.scratch-loader-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 8px;
}

@keyframes scratch-text-pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* 进度点 */
.scratch-dots {
    display: flex;
    gap: 6px;
    margin-top: 16px;
}

.scratch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: scratch-dot-bounce 1.4s ease-in-out infinite;
}

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

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

@keyframes scratch-dot-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.3;
    }

    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* ===== 弹窗/模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s;
    box-sizing: border-box;
}

.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.modal-body .help-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== 浮动按钮（回到顶部 + Bug反馈） ===== */
.floating-btns {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    color: #fff;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-btn-bug {
    background: linear-gradient(135deg, #EF476F, #FF6B6B);
}

.floating-btn-bug:hover {
    background: linear-gradient(135deg, #D63C5E, #EF476F);
}

.floating-btn-top {
    background: linear-gradient(135deg, #4C97FF, #6B5CE7);
    display: none;
    /* 默认隐藏，滚动后显示 */
}

.floating-btn-top:hover {
    background: linear-gradient(135deg, #3A7FE0, #5B4BD5);
}

/* ===== Bug 提交页面 ===== */
.bug-form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.bug-form-header {
    text-align: center;
    padding: 36px 24px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.bug-form-header h1 {
    font-size: 1.5rem;
    margin: 12px 0 8px;
    color: #2d3748;
}

.bug-form-header p {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
}

.bug-form {
    padding: 28px 32px 32px;
}

@media (max-width: 600px) {
    .bug-form {
        padding: 20px 16px 24px;
    }
}

.bug-note {
    background: #E3F2FD;
    border: 1px solid #BBDEFB;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #0D47A1;
    margin-bottom: 20px;
}

.bug-note a {
    color: #1565C0;
    font-weight: 600;
}

.bug-success-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 48px 32px;
}

.bug-success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.bug-success-card h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.bug-success-card p {
    color: #718096;
}

.bug-limit-info {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 14px;
    background: #FFF3CD;
    color: #856404;
    border-radius: 12px;
    font-size: 0.8rem;
}

.bug-blocked-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 48px 32px;
}

.bug-blocked-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.bug-blocked-card h2 {
    font-size: 1.5rem;
    color: #EF476F;
    margin-bottom: 12px;
}

.bug-blocked-card p {
    color: #4a5568;
    font-size: 1rem;
}

.bug-blocked-hint {
    color: #a0aec0 !important;
    font-size: 0.9rem !important;
    margin-top: 8px;
}

.bug-blocked-hint a {
    color: #4C97FF;
}

/* ===== Bug 反馈弹窗 ===== */
.bug-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s ease;
}
.bug-modal-overlay.show {
    display: flex;
}
.bug-modal-container {
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: scaleIn .25s ease;
}
.bug-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
}
.bug-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color .2s;
}
.bug-modal-close:hover {
    color: #EF476F;
}
.bug-modal-body {
    padding: 24px;
}
.bug-modal-desc {
    color: #718096;
    font-size: 0.9rem;
    margin: 0 0 12px;
}
.bug-modal-limit {
    display: inline-block;
    padding: 4px 14px;
    background: #FFF3CD;
    color: #856404;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 16px;
}
.bug-modal-error {
    background: #FDE8E8;
    color: #C53030;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 14px;
}
.bug-modal-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #EF476F, #E0335E);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
}
.bug-modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239,71,111,.3);
}
.bug-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.bug-modal-success {
    text-align: center;
    padding: 20px 0;
}
.bug-modal-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.bug-modal-success h2 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 8px;
}
.bug-modal-success p {
    color: #718096;
    font-size: 0.9rem;
}
.bug-modal-blocked {
    text-align: center;
    padding: 20px 0;
}
.bug-modal-blocked-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.bug-modal-blocked h2 {
    font-size: 1.3rem;
    color: #EF476F;
    margin-bottom: 8px;
}
.bug-modal-blocked p {
    color: #4a5568;
    font-size: 0.95rem;
}

/* ===== Bug 弹窗标签切换 ===== */
.bug-modal-tabs {
    display: flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 12px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 3px;
}
.bug-modal-tab {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    color: #718096;
    transition: all .2s;
    white-space: nowrap;
}
.bug-modal-tab.active {
    background: #fff;
    color: #EF476F;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.bug-modal-tab:hover:not(.active) {
    color: #4a5568;
}

/* ===== Bug 追踪列表 ===== */
.bug-track-summary {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.bug-track-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #e8ecf0;
    transition: all .2s;
}
.bug-track-item:hover {
    border-color: #d0d7de;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.bug-track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.bug-track-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.track-status-pending {
    background: #FFF3CD;
    color: #856404;
}
.track-status-processing {
    background: #CCE5FF;
    color: #004085;
}
.track-status-resolved {
    background: #D4EDDA;
    color: #155724;
}
.track-status-closed {
    background: #E2E3E5;
    color: #383D41;
}
.bug-track-time {
    font-size: 0.75rem;
    color: #a0aec0;
}
.bug-track-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 6px;
}
.bug-track-desc {
    font-size: 0.82rem;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 8px;
}
.bug-track-notes {
    margin-top: 8px;
    padding: 10px 14px;
    background: #EBF8FF;
    border-left: 3px solid #3182CE;
    border-radius: 0 8px 8px 0;
    font-size: 0.82rem;
    color: #2B6CB0;
    line-height: 1.5;
}
.bug-track-resolved-time {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #a0aec0;
}

/* ===== 小老虎吉祥物 ===== */
.mascot-tiger {
    position: fixed;
    z-index: 9999;
    cursor: grab;
    user-select: none;
    transition: none;
    pointer-events: auto;
}
.mascot-tiger:active { cursor: grabbing; }
.mascot-tiger-body {
    position: relative;
    width: 64px;
    height: 64px;
}
/* 虎头 */
.mascot-tiger-head {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 44px;
    background: linear-gradient(135deg, #f5a623 0%, #f7931e 60%, #e87d0e 100%);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
/* 耳朵 */
.mascot-tiger-ear {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background: #f5a623;
    border-radius: 50% 50% 30% 30%;
    border: 2px solid #d4750a;
}
.mascot-tiger-ear::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}
.mascot-tiger-ear.left { left: 4px; }
.mascot-tiger-ear.right { right: 4px; }
/* 额头花纹 王 */
.mascot-tiger-king {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 900;
    color: #4a2800;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
/* 眼睛 */
.mascot-tiger-eye {
    position: absolute;
    top: 16px;
    width: 11px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.mascot-tiger-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 7px;
    background: #1a1a2e;
    border-radius: 50%;
}
.mascot-tiger-eye::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
}
.mascot-tiger-eye.left { left: 9px; }
.mascot-tiger-eye.right { right: 9px; }
/* 鼻子 */
.mascot-tiger-nose {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 7px;
    background: #e85d75;
    border-radius: 50%;
}
/* 嘴巴 */
.mascot-tiger-mouth {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 6px;
    border-bottom: 2px solid #4a2800;
    border-radius: 0 0 50% 50%;
}
/* 腮红 */
.mascot-tiger-blush {
    position: absolute;
    top: 24px;
    width: 9px;
    height: 5px;
    background: rgba(255, 150, 150, .5);
    border-radius: 50%;
}
.mascot-tiger-blush.left { left: 4px; }
.mascot-tiger-blush.right { right: 4px; }
/* 条纹 */
.mascot-tiger-stripe {
    position: absolute;
    top: 2px;
    width: 3px;
    height: 12px;
    background: #4a2800;
    border-radius: 2px;
}
.mascot-tiger-stripe.s1 { left: 18px; }
.mascot-tiger-stripe.s2 { right: 18px; }
.mascot-tiger-stripe.s3 { left: 13px; top: 4px; height: 8px; }
.mascot-tiger-stripe.s4 { right: 13px; top: 4px; height: 8px; }
/* 身体 */
.mascot-tiger-torso {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 24px;
    background: linear-gradient(180deg, #f5a623 0%, #f7931e 100%);
    border-radius: 40% 40% 30% 30%;
}
.mascot-tiger-belly {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 14px;
    background: #fff8ee;
    border-radius: 50%;
}
/* 爪子 */
.mascot-tiger-paw {
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 10px;
    background: #f5a623;
    border-radius: 50%;
}
.mascot-tiger-paw.left { left: 10px; }
.mascot-tiger-paw.right { right: 10px; }
.mascot-tiger-paw::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}
/* 尾巴 */
.mascot-tiger-tail {
    position: absolute;
    bottom: 12px;
    right: 2px;
    width: 28px;
    height: 6px;
    background: #f5a623;
    border-radius: 3px;
    transform-origin: left center;
    animation: tailWag 1.2s ease-in-out infinite;
}
.mascot-tiger-tail::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -2px;
    width: 10px;
    height: 10px;
    background: #4a2800;
    border-radius: 50%;
}
/* 拖动时尾巴停止摆动 */
.mascot-tiger.dragging .mascot-tiger-tail { animation: none; }
/* 漂浮动画（非拖动时） */
.mascot-tiger:not(.dragging) .mascot-tiger-body {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes tailWag {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}
/* 气泡对话框 */
.mascot-bubble {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #f5a623;
    border-radius: 12px;
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #f5a623;
}
.mascot-bubble.show { opacity: 1; }
/* 休息提醒状态 */
.mascot-tiger.rest-reminder {
    animation: reminderPulse 0.8s ease-in-out 3;
}
.mascot-tiger.rest-reminder .mascot-bubble {
    border-color: #ff6b6b;
    background: #fff5f5;
    box-shadow: 0 0 20px rgba(255,107,107,.4);
    font-size: 13px;
    padding: 8px 14px;
    white-space: normal;
    max-width: 200px;
    text-align: center;
}
@keyframes reminderPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(255,165,0,.5)); }
    50% { filter: drop-shadow(0 0 18px rgba(255,107,107,.8)); }
}
/* 小屏适配 */
@media (max-width: 768px) {
    .mascot-tiger-body { transform: scale(.75); }
    .mascot-bubble { font-size: 10px; padding: 4px 8px; top: -38px; }
    .mascot-tiger.rest-reminder .mascot-bubble {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 160px;
    }
}

/* ===== 小老虎 AI 问答弹窗 ===== */
.tiger-ai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.tiger-ai-overlay.show { opacity: 1; pointer-events: auto; }
.tiger-ai-modal {
    position: fixed;
    right: 90px;
    bottom: 24px;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(.95);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.tiger-ai-modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.tiger-ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f5a623, #f7931e);
    color: #fff;
}
.tiger-ai-avatar { font-size: 1.8rem; }
.tiger-ai-header strong { display: block; font-size: .95rem; }
.tiger-ai-header small { font-size: .75rem; opacity: .85; }
.tiger-ai-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s;
}
.tiger-ai-close:hover { opacity: 1; }
.tiger-ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
    max-height: 340px;
}
.tiger-ai-msg { display: flex; }
.tiger-ai-msg.user { justify-content: flex-end; }
.tiger-ai-msg.ai { justify-content: flex-start; }
.tiger-ai-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.5;
    word-break: break-word;
}
.tiger-ai-msg.user .tiger-ai-bubble {
    background: #f5a623;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.tiger-ai-msg.ai .tiger-ai-bubble {
    background: #f0f2f5;
    color: #333;
    border-bottom-left-radius: 4px;
}
.tiger-ai-msg.ai .tiger-ai-bubble.error {
    background: #fff0f0;
    color: #c0392b;
}
.tiger-ai-footer {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.tiger-ai-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: .9rem;
    outline: none;
    transition: border-color .2s;
}
.tiger-ai-input:focus { border-color: #f5a623; }
.tiger-ai-input:disabled { background: #f5f5f5; }
.tiger-ai-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5a623, #f7931e);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform .2s, opacity .2s;
}
.tiger-ai-send:hover { transform: scale(1.08); }
.tiger-ai-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }
/* 移动端适配 */
@media (max-width: 768px) {
    .tiger-ai-modal {
        right: 60px;
        bottom: 16px;
        width: calc(100vw - 76px);
        max-width: 340px;
        max-height: 60vh;
    }
    .tiger-ai-body { max-height: 40vh; }
}

/* ===== 动画关键帧 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== 邮箱验证码 ===== */
.verify-code-row {
    display: flex;
    gap: 10px;
}
.verify-code-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 1.1rem !important;
    letter-spacing: 4px;
    text-align: center;
    font-family: 'Courier New', monospace !important;
}
.verify-code-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15) !important;
    outline: none;
}
.btn-send-code {
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-family: inherit;
}
.btn-send-code:hover {
    background: #158467;
}
.btn-send-code:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}
.btn-send-code.counting {
    background: #718096;
}

/* ===== 课程课件文件卡片 ===== */
.course-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.course-file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
}
.course-file-card:hover {
    border-color: #FF6B35;
    box-shadow: 0 4px 16px rgba(255,107,53,0.12);
    transform: translateY(-2px);
}
.course-file-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f7fafc;
    font-size: 1.6rem;
}
.course-file-info {
    flex: 1;
    min-width: 0;
}
.course-file-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.course-file-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: #a0aec0;
    margin-top: 4px;
}
.course-file-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff5f0;
    color: #FF6B35;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.course-file-card:hover .course-file-arrow {
    background: #FF6B35;
    color: #fff;
}

/* 课件卡片移动端响应 */
@media (max-width: 768px) {
    .course-files-grid {
        grid-template-columns: 1fr;
    }
}