/* 全局样式 */
:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --lighter-blue: #93c5fd;
    --lightest-blue: #dbeafe;
    --dark-blue: #1e40af;
    --darker-blue: #1e3a8a;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--lightest-blue) 0%, var(--bg-light) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.nav-brand i {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link.active {
    color: var(--primary-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu a {
    text-decoration: none;
}

.user-name {
    color: var(--text-dark);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--lighter-blue);
    color: var(--dark-blue);
}

.btn-secondary:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-nuclear {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #9ca3af;
    border: 2px solid #6b7280;
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-nuclear:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000000;
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6),
                0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.btn-nuclear:active {
    transform: translateY(0) scale(1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* 主内容区 */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* 首页样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-gray);
}

/* 文章瀑布流 */
.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.articles-header h2 {
    color: var(--text-dark);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 首页文章网格 - 一行4个，最多2行 */
.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
    overflow: hidden;
}

.home-articles-grid .article-card {
    min-width: 0;
}

/* 文章列表页网格 - 一行3个 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.articles-container .article-card {
    min-width: 0;
}

.article-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.article-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.article-card h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}

.article-meta i {
    color: var(--primary-blue);
}

.article-preview {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.stat-item i {
    color: var(--primary-blue);
}

.rating-badge {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 文章详情页面 */
.article-detail-page {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.article-detail-page h1 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
}

.article-detail-page .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-detail-page .rating-summary h3,
.article-detail-page .my-rating h3,
.article-detail-page .all-ratings h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.article-detail-page .ratings-list > div:last-child {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 评分表单 */
.rating-dimensions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rating-dimension {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-dimension label {
    font-weight: 600;
    color: var(--text-dark);
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.star {
    font-size: 2rem;
    color: var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #fbbf24;
    transform: scale(1.1);
}

/* 排行榜 */
.ranking-table {
    background: var(--bg-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.ranking-table table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 1rem;
    border-bottom: 1px solid #e8eef5;
    transition: all 0.2s ease;
}

.ranking-table tbody tr {
    transition: all 0.3s ease;
}

.ranking-table tbody tr:hover {
    background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 100%);
    transform: translateX(2px);
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.rank-badge:hover {
    transform: scale(1.1);
}

/* 金牌 - 温暖的金色渐变 */
.rank-1 { 
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.4);
}

/* 银牌 - 优雅的银色渐变 */
.rank-2 { 
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 50%, #c0c0c0 100%);
    box-shadow: 0 2px 12px rgba(192, 192, 192, 0.4);
}

/* 铜牌 - 温润的铜色渐变 */
.rank-3 { 
    background: linear-gradient(135deg, #cd7f32 0%, #e6a157 50%, #cd7f32 100%);
    box-shadow: 0 2px 12px rgba(205, 127, 50, 0.4);
}

/* 第4名 - 深蓝色渐变 */
.rank-4 { 
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #3b82f6 100%);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

/* 第5名 - 紫色渐变 */
.rank-5 { 
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

/* 第6名 - 粉紫色渐变 */
.rank-6 { 
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #ec4899 100%);
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
}

/* 第7名 - 橙红色渐变 */
.rank-7 { 
    background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f97316 100%);
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.35);
}

/* 第8名 - 青色渐变 */
.rank-8 { 
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 50%, #06b6d4 100%);
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35);
}

/* 第9名 - 翠绿色渐变 */
.rank-9 { 
    background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #10b981 100%);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

/* 第10名 - 靛蓝色渐变 */
.rank-10 { 
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #6366f1 100%);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* 其他排名 - 柔和的灰蓝色渐变 */
.rank-other { 
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 50%, #64748b 100%);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

/* 未评分徽章 */
.unrated-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #64748b;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #cbd5e1;
}

/* 便签墙 */
.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.note-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.note-content {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* 管理后台 */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.admin-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-section h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 管理后台表格样式 */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

.admin-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr {
    border-bottom: 2px solid var(--border-color);
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.admin-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.admin-table tbody tr:hover {
    background: var(--lightest-blue);
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table tbody td {
    padding: 1rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-right: 1px solid rgba(229, 231, 235, 0.5);
}

.admin-table tbody td:last-child {
    border-right: none;
}

.admin-table code {
    background: var(--lightest-blue);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.admin-table .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-table .badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.admin-table .badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-table .badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.admin-table .badge-success {
    background: #d1fae5;
    color: #065f46;
}

.admin-table .badge-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.admin-table .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* 管理后台区块 */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 提示消息 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    word-break: break-word;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

/* 提示框动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 个人主页样式 */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    font-size: 5rem;
    color: var(--primary-blue);
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.profile-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    color: var(--text-gray);
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-stats .stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.profile-stats .stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.profile-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.profile-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.profile-article-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.profile-article-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.profile-article-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.profile-article-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.profile-ratings {
    overflow-x: auto;
}

.profile-notes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.note-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.note-content {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.note-meta {
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem;
    }

    .main-content {
        padding: 0 1rem;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .articles-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .home-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    /* 评分卡片在平板上隐藏，避免布局问题 */
    .my-rating {
        position: static !important;
        width: 100% !important;
        margin-top: 1rem;
        right: auto !important;
    }

    /* 主题选择分页按钮 */
    .topic-pagination-controls {
        right: 0;
    }

    .topic-selection-grid {
        padding-right: 50px;
    }

    /* 管理后台网格 */
    .admin-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* 排行榜表格 */
    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    /* 导航栏 */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1001;
    }

    .nav-container {
        padding: 0.75rem 1rem;
        position: relative;
        flex-wrap: wrap;
    }

    .nav-brand {
        font-size: 0.95rem;
        flex: 1;
    }

    .nav-brand i {
        font-size: 1.2rem;
    }

    /* 汉堡菜单按钮 */
    .nav-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }

    /* 用户操作区 - 显示在导航栏右侧 */
    .nav-actions {
        display: flex;
        order: 3;
        gap: 0.5rem;
    }

    .nav-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .user-menu {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .user-name {
        font-size: 0.85rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-menu .btn,
    .user-menu a {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    #profileBtn {
        display: inline-block;
    }

    /* 下拉导航菜单 */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
        order: 4;
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--lightest-blue);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* 主内容区 */
    .main-content {
        padding: 1rem 0.75rem;
    }

    /* 首页 */
    .hero-section {
        padding: 1.5rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 文章网格 */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .articles-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 文章卡片 */
    .article-card {
        padding: 1rem;
    }

    .article-card h3 {
        font-size: 1.1rem;
    }

    .article-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .article-preview {
        font-size: 0.9rem;
    }

    .rating-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    /* 文章详情页 */
    .article-detail {
        padding: 1rem;
    }

    .article-detail h1 {
        font-size: 1.5rem;
    }

    .article-content {
        padding: 1rem !important;
        font-size: 0.95rem;
    }

    /* 评分卡片移到文章下方 */
    .my-rating {
        position: static !important;
        width: 100% !important;
        margin-top: 1rem;
        right: auto !important;
    }

    /* 评分统计 */
    .rating-summary {
        padding: 1rem !important;
    }

    /* 按钮 */
    .article-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .article-actions .btn {
        width: 100%;
    }

    .articles-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    /* 模态框 */
    .modal {
        width: 95%;
        max-width: 95%;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-close {
        font-size: 1.5rem;
    }

    /* 表单 */
    .form-group label {
        font-size: 0.9rem;
    }

    .form-control {
        font-size: 0.95rem;
        padding: 0.6rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* 主题选择 */
    .topic-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding-right: 40px;
    }

    .topic-card {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .topic-pagination-controls {
        right: 0;
        width: 35px;
    }

    .topic-pagination-btn {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }

    /* 富文本编辑器 */
    .ql-container {
        font-size: 0.95rem;
    }

    .ql-editor {
        min-height: 200px;
    }

    /* 排行榜 */
    .ranking-table {
        overflow-x: auto;
        font-size: 0.85rem;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .rank-badge {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }

    /* 管理后台 */
    .admin-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-section {
        padding: 1rem;
    }

    .admin-section h2 {
        font-size: 1.25rem;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.25rem;
    }

    /* 个人主页 */
    .profile-header {
        padding: 1.5rem 1rem;
    }

    .profile-header h1 {
        font-size: 1.5rem;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* 便签 */
    .notes-container {
        gap: 1rem;
    }

    .note-card {
        padding: 0.75rem;
    }

    .note-content {
        font-size: 0.9rem;
    }

    /* 页面标题 */
    .page-header h1 {
        font-size: 1.5rem;
    }

    /* 按钮组 */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* 响应式设计 - 超小屏幕 */
@media (max-width: 480px) {
    /* 导航栏 */
    .nav-brand span {
        display: none;
    }

    .nav-brand i {
        font-size: 1.5rem;
    }

    /* 主题选择改为单列 */
    .topic-selection-grid {
        grid-template-columns: 1fr;
        padding-right: 40px;
    }

    /* 模态框 */
    .modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    /* 表格更紧凑 */
    .admin-table th,
    .admin-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
    }

    /* 个人主页统计改为单列 */
    .profile-stats {
        grid-template-columns: 1fr;
    }

    /* 按钮文字缩小 */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--light-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* 隐藏浏览器扩展注入的元素 */
[class*="send-element"],
[class*="send-console"],
div[style*="position: fixed"][style*="bottom"],
div[style*="position: fixed"][style*="right"]:not(.modal-overlay) {
    display: none !important;
}

/* 核弹清空页面样式 */
.nuclear-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.nuclear-warning {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 3px solid #dc2626;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

.nuclear-icon {
    font-size: 5rem;
    color: #dc2626;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.nuclear-warning h1 {
    color: #991b1b;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.nuclear-subtitle {
    color: #7f1d1d;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nuclear-info {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: #f59e0b;
}

.nuclear-checklist {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.nuclear-checklist h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.nuclear-checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nuclear-checkbox:hover {
    background: var(--lightest-blue);
    border-color: var(--primary-blue);
}

.nuclear-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.nuclear-checkbox span {
    font-size: 1.05rem;
    color: var(--text-dark);
}

.nuclear-launch-container {
    position: relative;
    margin-top: 3rem;
    padding: 3rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nuclear-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s ease;
    transform-origin: top;
    z-index: 10;
    border: 3px solid #6b7280;
}

.nuclear-cover.open {
    transform: rotateX(90deg);
    opacity: 0;
}

.cover-top {
    text-align: center;
}

.cover-label {
    color: #fbbf24;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.cover-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: #4b5563;
    color: #9ca3af;
    border: 3px solid #6b7280;
    border-radius: 0.5rem;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.cover-button.enabled {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    border-color: #f59e0b;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); }
}

.cover-button.enabled:hover {
    transform: scale(1.05);
}

.nuclear-button-wrapper {
    text-align: center;
    position: relative;
}

.nuclear-button {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border: 6px solid #9ca3af;
    color: #d1d5db;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: not-allowed;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.5;
    margin: 0 auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nuclear-button i {
    font-size: 5rem;
}

.nuclear-button span {
    display: none;
}

.nuclear-button.active {
    opacity: 1;
    cursor: pointer;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-color: #9ca3af;
    color: #d1d5db;
}

.nuclear-button.active:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.6),
                0 0 60px rgba(220, 38, 38, 0.4),
                inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nuclear-button.active:active {
    transform: scale(0.98);
}

.button-glow {
    display: none;
}

.button-label {
    margin-top: 1.5rem;
    color: #fbbf24;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 创建文章页面样式 */
.create-article-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.create-article-container {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.create-article-container h1 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.create-article-container .form-group {
    margin-bottom: 2rem;
}

.create-article-container label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.create-article-container textarea {
    font-family: inherit;
    line-height: 1.6;
}

/* 核弹确认页面样式 */
.nuclear-confirm-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.nuclear-confirm-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nuclear-confirm-header {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 2rem;
    text-align: center;
}

.nuclear-confirm-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.nuclear-confirm-header h1 {
    margin: 0;
    font-size: 2rem;
}

.nuclear-confirm-warning {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 1.5rem;
    margin: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nuclear-confirm-warning i {
    font-size: 2rem;
    color: #dc2626;
}

.nuclear-confirm-warning p {
    margin: 0;
    color: #991b1b;
    font-weight: bold;
    font-size: 1.1rem;
}

.nuclear-confirm-inputs {
    padding: 0 2rem 2rem;
}

.nuclear-confirm-inputs .input-group {
    margin-bottom: 1.5rem;
}

.nuclear-confirm-inputs label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nuclear-confirm-inputs code {
    background: #fee2e2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #991b1b;
    font-weight: bold;
}

.nuclear-confirm-inputs .form-control {
    border: 2px solid #dc2626;
}

.nuclear-confirm-actions {
    padding: 2rem;
    background: var(--bg-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 拉杆样式 */
.lever-container {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 2px solid #9ca3af;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 2rem 2rem;
}

.lever-label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.lever-track {
    position: relative;
    width: 80px;
    height: 200px;
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border: 3px solid #7f1d1d;
    border-radius: 12px;
    margin: 0 auto 1rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lever-handle {
    position: absolute;
    top: 0;
    left: 5px;
    width: 70px;
    height: 60px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border: 3px solid #374151;
    border-radius: 8px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    user-select: none;
}

.lever-handle:hover {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.lever-handle:active {
    cursor: grabbing;
}

.lever-status {
    color: #dc2626;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Quill富文本编辑器样式优化 */
#articleEditor {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.ql-toolbar {
    background: var(--bg-light);
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.75rem;
}

.ql-container {
    border: none !important;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ql-editor {
    min-height: 400px;
    padding: 1.5rem;
}

.ql-editor.ql-blank::before {
    color: var(--text-gray);
    font-style: normal;
}

/* 工具栏按钮悬停效果 */
.ql-toolbar button,
.ql-toolbar .ql-picker-label {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.ql-toolbar button:hover,
.ql-toolbar .ql-picker-label:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.ql-toolbar button:active,
.ql-toolbar .ql-picker-label:active {
    background: rgba(0, 0, 0, 0.1);
}

/* 工具栏提示样式 */
.ql-toolbar button[title]::after,
.ql-toolbar .ql-picker-label[title]::after {
    content: attr(title);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.ql-toolbar button[title]:hover::after,
.ql-toolbar .ql-picker-label[title]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 隐藏Quill默认的选择器图标 */
.ql-toolbar .ql-picker-label::before {
    display: none !important;
}

.ql-toolbar .ql-picker-label {
    padding-left: 8px !important;
    padding-right: 20px !important;
}

/* 选择器下拉选项样式 */
.ql-toolbar .ql-picker-options .ql-picker-item::before {
    display: none !important;
}

.ql-toolbar .ql-picker-options .ql-picker-item {
    padding: 5px 10px;
}

/* 系统设置样式 */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    gap: 2rem;
    min-height: 100px;
}

.setting-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.setting-info {
    flex: 1;
    min-width: 0;
}

.setting-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-info h3 i {
    color: var(--primary);
}

.setting-description {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 开关按钮样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-slider:hover {
    opacity: 0.9;
}

/* 隐藏空白选项和没有data-label的选项 */
.ql-toolbar .ql-picker-options .ql-picker-item:not([data-label]) {
    display: none !important;
}

/* 文章内容显示样式 */
.article-content.ql-editor {
    min-height: auto;
}

.article-content.ql-editor p {
    margin-bottom: 1em;
}

.article-content.ql-editor h1,
.article-content.ql-editor h2,
.article-content.ql-editor h3,
.article-content.ql-editor h4,
.article-content.ql-editor h5,
.article-content.ql-editor h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.article-content.ql-editor ul,
.article-content.ql-editor ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.article-content.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1em 0;
}

.article-content.ql-editor a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.article-content.ql-editor blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--text-gray);
}

/* 主题管理页面 - 卡片式布局 */
.topics-manage-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.topic-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    /* 固定宽高比为1:1，使卡片呈正方形 */
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.topic-card.topic-inactive {
    opacity: 0.7;
    background: #f3f4f6;
}

.topic-card.topic-default {
    border: 2px solid var(--warning);
}

.topic-card.topic-competition {
    border: 2px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, white 100%);
}

.topic-badge-default,
.topic-badge-inactive,
.topic-badge-competition {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 1;
}

.topic-badge-default {
    background: var(--warning);
    color: white;
}

.topic-badge-inactive {
    background: var(--text-gray);
    color: white;
}

.topic-badge-competition {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(255, 193, 7, 0);
    }
}

/* 管理卡片悬停效果 */
.management-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.management-card:active {
    transform: translateY(-2px);
}

/* 密码输入错误抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* 取消比赛模态框增强样式 */
#cancelCompetitionModal .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

#cancelCompetitionModal .form-control.valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#cancelCompetitionModal #confirmLabel:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#cancelCompetitionModal #confirmLabel.checked {
    border-color: #28a745;
    background: #d4edda;
}

/* 密码输入框增强效果 */
#cancelPassword {
    transition: all 0.3s ease;
}

#cancelPassword:focus {
    transform: scale(1.02);
}

/* 提交按钮加载状态 */
#submitCancelBtn:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

/* 错误提示动画 */
#passwordError {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功指示器脉冲动画 */
#passwordStrength i {
    animation: checkPulse 0.5s ease;
}

@keyframes checkPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 23:59快捷按钮样式 */
.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.2);
}

.topic-card-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.topic-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    word-wrap: break-word;
}

.topic-card-body {
    padding: 0.75rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.topic-card-description {
    color: var(--text-gray);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topic-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.topic-stat i {
    color: var(--primary-blue);
    width: 0.875rem;
    font-size: 0.75rem;
}

.topic-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.topic-card-footer .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.75rem;
    }
    
    .topic-card {
        aspect-ratio: auto;
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
}

/* 发布文章页面 - 主题选择卡片 */
.topic-selection-container {
    position: relative;
    min-height: 140px;
}

.topic-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    padding-right: 50px;
    background: var(--bg-light);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 140px;
    align-content: start;
}

.topic-selection-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.topic-selection-card:hover {
    border-color: var(--primary-blue);
    background: var(--lightest-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.topic-selection-card.selected {
    border-color: var(--primary-blue);
    background: var(--lightest-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.topic-selection-card.topic-selection-none {
    border-style: dashed;
}

.topic-selection-card.topic-competition-card {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, white 100%);
}

.topic-selection-card.topic-competition-card:hover {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%);
}

.topic-selection-card.topic-expired {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #f3f4f6 !important;
}

.topic-selection-card.topic-expired:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 匿名主题卡片样式 */
.topic-selection-card.topic-anonymous-card {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    position: relative;
}

.topic-selection-card.topic-anonymous-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6c757d 0%, #495057 100%);
    border-radius: 0.5rem 0.5rem 0 0;
}

.topic-selection-card.topic-anonymous-card:hover {
    border-color: #495057;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.topic-selection-card.topic-anonymous-card.selected {
    border-color: #495057;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.15);
}

.topic-selection-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.topic-selection-desc {
    font-size: 0.7rem;
    color: var(--text-gray);
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* 主题分页控制按钮 */
.topic-pagination-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.topic-pagination-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #e5e7eb;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #6b7280;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

.topic-pagination-btn:hover:not(:disabled) {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transform: scale(1.05);
}

.topic-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.7);
    border-color: #e5e7eb;
    color: #d1d5db;
    box-shadow: none;
}

.topic-pagination-info {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
}

/* Toggle Switch 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* 排行榜控制面板 */
.ranking-control-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ranking-control-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 打印样式 */
@media print {
    .navbar,
    .nav-actions,
    .btn,
    .modal-overlay {
        display: none !important;
    }
}
