/* ===================================
   Linux 命令实验室 - 完整样式表
   PC端自适应设计
   =================================== */

/* 重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-purple: #a855f7;
    --accent-purple-hover: #9333ea;
    --accent-amber: #f59e0b;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --border-color: rgba(148, 163, 184, 0.2);
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* 页面包装器 */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================
   头部导航
   =================================== */
.site-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.badge-admin {
    background: linear-gradient(135deg, var(--accent-red), #f97316);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

/* ===================================
   按钮
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    gap: 0.5rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #16a34a);
    color: white;
}

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

/* ===================================
   主内容区
   =================================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===================================
   卡片
   =================================== */
.card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.25rem;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(139, 92, 246, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f8fafc, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.card-description {
    color: var(--text-secondary);
    font-size: 1rem;
    opacity: 0.85;
}

/* 居中卡片容器 */
.center-card {
    max-width: 520px;
    margin: 4rem auto;
    animation: fadeInUp 0.5s ease-out;
}

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

/* ===================================
   表单
   =================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), 0 0 20px rgba(139, 92, 246, 0.1);
}

.form-input:hover {
    border-color: rgba(148, 163, 184, 0.35);
}

select.form-input {
    cursor: pointer;
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* 验证码输入框 */
.verify-code-wrapper {
    display: flex;
    gap: 0.75rem;
}

.verify-code-wrapper .form-input {
    flex: 1;
    padding-right: 1rem;
}

.btn-verify {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* 密码显示切换 */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
}

.password-toggle:hover {
    opacity: 1;
}

/* ===================================
   登录页面样式
   =================================== */
.login-card {
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.label-icon {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.alert-icon {
    margin-right: 0.5rem;
}

.btn-icon {
    font-size: 0.95rem;
}

.link-icon {
    margin-right: 0.3rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.btn-login {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}

.btn-register {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
}

.login-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.link-forgot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.85;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.3), transparent);
}

.divider-text {
    color: rgba(148, 163, 184, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===================================
   提示框
   =================================== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-amber);
}

/* ===================================
   链接
   =================================== */
.link {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.2s;
}

.link:hover {
    color: #c084fc;
    text-decoration: underline;
}

/* ===================================
   首页 Hero 区域
   =================================== */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===================================
   功能卡片网格
   =================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===================================
   统计数据
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-purple);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===================================
   表格
   =================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

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

th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(168, 85, 247, 0.05);
}

/* ===================================
   Tabs 标签页
   =================================== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===================================
   题库练习页面
   =================================== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-amber));
    transition: width 0.3s;
}

.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.question-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.question-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-level-1 {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.tag-level-2 {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.tag-level-3 {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.tag-category {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover:not(.selected):not(.disabled) {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
}

.option-btn.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.2);
}

.option-btn.correct {
    border-color: var(--accent-green);
    background: rgba(34, 197, 94, 0.15);
}

.option-btn.incorrect {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.15);
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

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

.explanation-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.explanation-title {
    color: var(--accent-amber);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 结果页面 */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.result-score {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-detail {
    color: var(--text-secondary);
    margin: 0.5rem 0 1.5rem;
}

.result-status {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.result-status.pass {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-green);
}

.result-status.fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

/* ===================================
   证书页面
   =================================== */
.cert-card {
    background: var(--bg-card);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cert-info h3 {
    color: var(--accent-amber);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    gap: 1.5rem;
}

.cert-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===================================
   排行榜
   =================================== */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.leaderboard-rank {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b;
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #1e293b;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: white;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-score {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.leaderboard-points {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-amber);
}

/* ===================================
   后台管理
   =================================== */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-tab {
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.admin-tab.active {
    background: var(--accent-purple);
    color: white;
}

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* ===================================
   底部
   =================================== */
.site-footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

/* 必填标记 */
.required {
    color: var(--accent-red);
    font-weight: bold;
    margin-left: 0.25rem;
}

/* 页面内提示消息 */
.form-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-in-out;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.form-message.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

.hidden { display: none; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }

.bg-white { background-color: white; }
.bg-black { background-color: black; }
.bg-transparent { background-color: transparent; }

.text-white { color: white; }
.text-black { color: black; }
.text-gray { color: var(--text-secondary); }
.text-purple { color: var(--accent-purple); }
.text-amber { color: var(--accent-amber); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.cursor-pointer { cursor: pointer; }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ===================================
   响应式
   =================================== */
@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 0;
        gap: 0.75rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cert-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cert-actions {
        width: 100%;
        justify-content: center;
    }
    
    .table-wrapper {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.6rem 0.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .question-card {
        padding: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
