﻿/* ===================================
   现代化口令排名系统 - 深蓝白配色主题
   =================================== */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量 - 深蓝白配色方案 */
:root {
    /* 主色调 - 深蓝色系 */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;

    /* 次要色 */
    --secondary: #0ea5e9;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-gold: #fbbf24;

    /* 中性色 - 白色和灰色系 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    /* 文字颜色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* 边框和分割线 */
    --border-color: #e2e8f0;
    --border-dark: #cbd5e1;

    /* 阴影 */
    --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);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);

    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* 页面基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(to bottom right, #eff6ff, #dbeafe, #f8fafc);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 2rem 1rem;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===================================
   头部样式
   =================================== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===================================
   统计卡片区域
   =================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

.stat-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===================================
   提交区域
   =================================== */
.submit-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.password-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.password-input:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-input::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message {
    min-height: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.message.success {
    color: var(--accent-green);
}

.message.error {
    color: #ef4444;
}

/* ===================================
   排名区域
   =================================== */
.rank-section {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.rank-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 排名卡片 */
.rank-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease-out;
    position: relative;
}

.rank-item.clickable {
    cursor: pointer;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.rank-item.clickable:active {
    transform: scale(0.99);
}

/* 排名徽章 */
.rank-badge {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 14px 0 rgba(251, 191, 36, 0.4);
}

.rank-badge.top-2 {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

/* 口令信息区 */
.password-info {
    flex: 1;
    min-width: 0;
}

.password-title {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: #dbeafe;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.password-quantity {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-orange);
    background: #ffedd5;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid #fed7aa;
    margin-bottom: 0.5rem;
}

.password-quantity.no-quantity {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* 动态数量标签样式 */
.tag-quantity {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.tag-quantity.quantity-title {
    color: var(--primary);
    background: #dbeafe;
    border-color: #bfdbfe;
}

/* < 800: 蓝色 */
.tag-quantity.quantity-low {
    color: var(--primary);
    background-color: #dbeafe;
    /* 浅蓝背景 */
    border-color: #bfdbfe;
}

/* 40 ~ 60: 橙色 */
.tag-quantity.quantity-medium {
    color: var(--accent-orange);
    background-color: #ffedd5;
    /* 浅橙背景 */
    border-color: #fed7aa;
}

/* >= 900: 红色 */
.tag-quantity.quantity-high {
    color: #dc2626;
    /* 红色 */
    background-color: #fee2e2;
    /* 浅红背景 */
    border-color: #fecaca;
}

.tag-title {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

.password-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-all;
    line-height: 1.5;
}

.password-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* 复制提示 */
.copy-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.copy-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.copy-text {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
}

.rank-item:hover .copy-hint {
    color: var(--primary);
}

.rank-item:hover .copy-icon {
    transform: scale(1.1);
}

/* ===================================
   分页控制
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===================================
   加载和空状态
   =================================== */
.loading,
.empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===================================
   Toast提示
   =================================== */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.toast.error {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* ===================================
   动画定义
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@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);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   响应式设计
   =================================== */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.75rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .input-group {
        flex-direction: column;
    }

    .submit-section {
        padding: 1.25rem;
        /* Reduce padding to give more width to input */
    }

    .password-input {
        width: 100%;
    }

    .rank-item {
        grid-template-columns: 56px 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .rank-badge {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .password-meta {
        grid-column: 1 / -1;
        flex-direction: column;
        gap: 0.5rem;
    }

    .copy-hint {
        grid-column: 1 / -1;
        padding: 1rem;
        background: var(--bg-secondary);
        border-radius: var(--radius-md);
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.875rem;
    }
}

/* ===================================
   反馈按钮
   =================================== */
.feedback-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
}

.feedback-btn:active {
    transform: scale(0.95);
}

/* ===================================
   模态框
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group textarea,
.form-group input[type=\"text\"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    outline: none;
}

.form-group textarea:focus,
.form-group input[type=\"text\"]:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.modal-submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-submit-btn:active {
    transform: translateY(0);
}

.modal-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 提交区域样式 */
.submit-section {
    background: white;
    border-radius: 1rem;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out 0.1s both;
}

.section-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 反馈区域优化样式 */
.feedback-section {
    background: white;
    border-radius: 1rem;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out 0.2s both;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.feedback-textarea::placeholder {
    color: #94a3b8;
}

.feedback-bottom {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.feedback-info {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-contact {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-contact:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.feedback-contact::placeholder {
    color: #94a3b8;
}

.char-count {
    font-size: 13px;
    color: #94a3b8;
    text-align: right;
    margin-top: -6px;
}

.feedback-submit-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    align-self: flex-start;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
}

.feedback-submit-btn:active {
    transform: translateY(0);
}

.btn-icon-small {
    font-size: 16px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .feedback-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .feedback-info {
        width: 100%;
    }

    .feedback-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 合并的提交和反馈区域 */
.submit-feedback-section {
    background: white;
    border-radius: 1rem;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out 0.1s both;
}

.form-block {
    margin-bottom: 0;
}

.block-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 分隔线样式 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .submit-feedback-section {
        padding: 25px 20px;
    }

    .divider {
        margin: 25px 0;
    }
}

/* ========================================
   统一表单区域样式
   ======================================== */

/* 表单容器 */
.form-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.6s ease-out 0.1s both;
}

/* 表单块 */
.form-block {
    margin: 0;
}

.form-block+.form-block {
    margin-top: 0;
}

/* 统一标题样式 */
.form-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单行 */
.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 12px;
}

.form-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 统一输入框样式 */
.form-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* 统一文本域样式 */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    background: white;
}

.form-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea::placeholder {
    color: #94a3b8;
}

/* 统一按钮样式 */
.form-btn {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.btn-icon {
    font-size: 16px;
}

/* 分隔线 */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 28px 0;
}

/* 字符计数 */
.char-count {
    font-size: 13px;
    color: #94a3b8;
    text-align: right;
}

/* 消息提示 */
.message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .form-section {
        padding: 24px 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-btn {
        width: 100%;
    }

    .form-col {
        width: 100%;
    }
}

/* ========================================
   移动端和桌面端统一优化样式
   ======================================== */

/* 1. 容器响应式优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
        /* 减小移动端边距 */
    }

    .header {
        margin-bottom: 20px;
    }

    .title {
        font-size: 1.8rem;
        /* 调整移动端标题大小 */
    }

    .subtitle {
        font-size: 0.95rem;
    }
}

/* 2. 统计卡片优化 */
@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
        /* 保持两列，但减小间距 */
        gap: 10px;
    }

    .stat-item {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.8rem;
    }
}

/* 3. 提交与反馈区域统一优化 */
.submit-feedback-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* 更柔和的阴影 */
    margin-bottom: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    /* 更柔和的边框 */
}

/* 统一输入框风格 */
.password-input,
.feedback-textarea,
.feedback-contact {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    /* 更圆润的角 */
    background: #f8fafc;
    /* 极淡的背景色 */
    transition: all 0.3s ease;
    font-size: 15px;
}

.password-input:focus,
.feedback-textarea:focus,
.feedback-contact:focus {
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 提交口令输入组优化 */
.input-group {
    display: flex;
    gap: 12px;
}


/* 统一按钮风格 */
.submit-btn,
.feedback-submit-btn {
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    padding: 0 24px;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.submit-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.feedback-submit-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
    min-width: 120px;
}

.submit-btn:active,
.feedback-submit-btn:active {
    transform: scale(0.98);
}

/* 反馈底部区域优化 */
.feedback-bottom {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.feedback-info {
    flex: 1;
}

.feedback-contact {
    padding: 0 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .submit-feedback-section {
        padding: 20px;
        /* 减小内边距 */
    }

    .input-group {
        flex-direction: column;
        /* 垂直堆叠 */
    }

    .submit-btn {
        width: 100%;
        /* 按钮全宽 */
    }

    .feedback-bottom {
        flex-direction: column;
    }

    .feedback-submit-btn {
        width: 100%;
    }
}

/* 排名列表优化 */
.rank-item {
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid transparent;
}

.rank-item:hover {
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .rank-item {
        flex-direction: column;
        /* 垂直堆叠 */
        align-items: flex-start;
        gap: 12px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .rank-content {
        width: 100%;
    }

    .rank-stats {
        width: 100%;
        justify-content: space-between;
        /* 分散对齐 */
        margin-top: 8px;
    }

    .stat-badge {
        flex: 1;
    }
}

/* ===================================
   优化后的排名卡片样式
   =================================== */
.rank-section {
    position: relative;
    padding-bottom: 20px;
}

/* 排序工具栏 */
.sort-toolbar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sort-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sort-btn:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.sort-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 特定按钮颜色 */
/* 全部口令 - 默认蓝色 (Primary) */
.sort-btn[data-sort="new"] {
    color: var(--primary);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.sort-btn[data-sort="new"]:hover,
.sort-btn[data-sort="new"].active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* < 40 - 青色/绿松石 */
.sort-btn[data-sort="lt40"] {
    color: #0d9488;
    border-color: #ccfbf1;
    background: #f0fdfa;
}

.sort-btn[data-sort="lt40"]:hover,
.sort-btn[data-sort="lt40"].active {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* 40~60 - 橙色 */
.sort-btn[data-sort="40to60"] {
    color: #ea580c;
    border-color: #ffedd5;
    background: #fff7ed;
}

.sort-btn[data-sort="40to60"]:hover,
.sort-btn[data-sort="40to60"].active {
    background: #ea580c;
    color: white;
    border-color: #ea580c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* > 60 - 红色 */
.sort-btn[data-sort="gt60"] {
    color: #dc2626;
    border-color: #fee2e2;
    background: #fef2f2;
}

.sort-btn[data-sort="gt60"]:hover,
.sort-btn[data-sort="gt60"].active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

/* 排名序号 */
.rank-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
}

.rank-index .number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #94a3b8;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
}

/* 前三名特效 */
.rank-card.rank-1 .rank-index .number {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: white;
    box-shadow: 0 4px 10px rgba(189, 189, 189, 0.4);
}

.rank-card.rank-2 .rank-index .number {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    color: white;
    box-shadow: 0 4px 10px rgba(189, 189, 189, 0.4);
}

.rank-card.rank-3 .rank-index .number {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
    box-shadow: 0 4px 10px rgba(160, 82, 45, 0.4);
}

.rank-card.rank-1 {
    border: 2px solid #FDB931;
    background: linear-gradient(to right, #fff, #fff9e6);
}

.rank-card.rank-2 {
    border: 2px solid #BDBDBD;
    background: linear-gradient(to right, #fff, #f5f5f5);
}

.rank-card.rank-3 {
    border: 2px solid #CD7F32;
    background: linear-gradient(to right, #fff, #fff0e6);
}

/* 中间内容区 */
.rank-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}



.tag-title {
    background: #e0f2fe;
    color: #0284c7;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rank-code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    color: #334155;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-footer {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 操作按钮区域 - 电脑端样式 */
.rank-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 15px;
    align-items: flex-end;
}

.btn-copy-action {
    background: var(--bg-primary);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 70px;
}

.rank-card:hover .btn-copy-action {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.btn-copy-action:active {
    transform: scale(0.95);
}

/* 响应式调整 - 手机端优化 */
@media (max-width: 640px) {
    .rank-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        padding-bottom: 52px;
        /* 为底部按钮预留空间 */
    }

    .rank-index {
        position: absolute;
        top: 0;
        left: 0;
        width: 28px;
        height: 28px;
    }

    .rank-index .number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        border-radius: 0 0 12px 0;
    }

    .rank-body {
        grid-column: 1 / -1;
        padding-top: 12px;
    }

    .rank-header {
        gap: 6px;
        margin-bottom: 4px;
    }

    .tag-quantity {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .tag-title {
        font-size: 0.75rem;
        padding: 3px 8px;
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rank-code {
        font-size: 0.95rem;
        padding: 8px 10px;
    }

    .rank-footer {
        font-size: 0.75rem;
        gap: 10px;
    }

    /* 手机端按钮横向排列在底部 */
    .rank-action {
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 0;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: stretch;
    }

    .btn-report-action,
    .btn-copy-action {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 0;
        text-align: center;
        border-radius: 8px;
    }

    .btn-report-action {
        max-width: 80px;
    }
}

/* 统一输入框和按钮高度 */
.password-input,
.feedback-contact {
    height: 52px;
    font-size: 16px;
    /* 防止iOS缩放 */
}

.submit-btn,
.feedback-submit-btn {
    height: 52px;
}

/* 动画定义 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* 搜索框样式 */
.search-box {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* ===================================
   免责声明弹窗
   =================================== */
.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;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 1.25rem;
    text-align: center;
}

.modal-body {
    margin-bottom: 24px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 8px;
}

.modal-footer {
    text-align: center;
}

.modal-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.modal-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
}



.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    text-align: center;
    background: #f8fafc;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===================================
   反馈标签样式
   =================================== */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.tag-chip {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-chip:hover {
    background: #e2e8f0;
    color: #334155;
}

.tag-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

/* Force horizontal tags */
.tags-container {
    flex-direction: row !important;
}

/* ===================================
   全屏加载动画
   =================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===================================
   Tab Switching Animations
   =================================== */
.rank-list {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

/* State for fading out/hidden */
.rank-list.fade-out {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Ensure rank items also animate in nicely */


/* Optional: Smooth height transition wrapper if list sizes vary wildly */
/* .rank-section {
    transition: height 0.3s ease;
    
}

*/

/* ===================================
   折叠卡片样式
   =================================== */
.collapsible-card {
    transition: all 0.3s ease;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding-bottom: 0;
}

/* 当卡片折叠时，移除内部padding/margin影响，保持header的点击区域 */
.collapsible-card.collapsed .collapsible-header {
    margin-bottom: 0;
}

.toggle-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
}

.collapsible-header:hover .toggle-icon {
    color: var(--primary);
    background: #dbeafe;
}

.collapsible-content {
    max-height: 1000px;
    /* 足够大的高度 */
    opacity: 1;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-inner {
    padding-top: 1rem;
}

/* 折叠状态 */
.collapsible-card.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.collapsible-card.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* 默认折叠建议反馈 */
.collapsible-card.simplified.collapsed .collapsible-content {
    max-height: 0;
}

/* ===================================
   举报按钮样式 - 电脑端
   =================================== */
.btn-report-action {
    background: white;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 70px;
}

.btn-report-action:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
    transform: scale(1.05);
}

.btn-report-action:active {
    transform: scale(0.95);
}

/* ===================================
   已复制的口令卡片
   同一 IP 24 小时内不能重复复制同一个口令，已复制的卡片置灰
   =================================== */
.rank-card.copied {
    opacity: 0.55;
    cursor: not-allowed;
}

.rank-card.copied:hover {
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: rgba(226, 232, 240, 0.8);
}

.rank-card.copied .btn-copy-action,
.rank-card.copied:hover .btn-copy-action {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    transform: none;
    cursor: not-allowed;
}