:root {
    --primary-purple: #7B68EE;
    --light-purple: #9683FF;
    --dark-purple: #5D4BB7;
    --background: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --white: #FFFFFF;
    --error: #FF3B30;
    --success: #34C759;
    --gradient-start: #7B68EE;
    --gradient-end: #9683FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    padding: 16px 0;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.header-left .logo {
    height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-left h1 {
    margin: 0;
    font-size: 20px;
    color: white;
    font-weight: 600;
    text-align: center;
}

.nav-tabs {
    display: flex;
    gap: 16px;
    margin-top: 0;
    justify-content: center;
}

.nav-tab {
    padding: 8px 24px;
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.8;
    border-radius: 6px;
}

.nav-tab:hover {
    opacity: 1;
}

.nav-tab.active {
    opacity: 1;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .logo {
        height: 28px;
    }
    
    .header-left {
        gap: 12px;
    }

    .nav-tabs {
        gap: 24px;
        padding: 6px;
    }

    .nav-tab {
        padding: 6px 16px;
        font-size: 14px;
    }

    .nav-tab.active::after {
        left: 16px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: min(20px, calc((100vw - 80px) / 10));
    }
    
    .logo {
        height: 24px;
    }
    
    .header-left {
        gap: 12px;
    }
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #D2D2D7;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--background);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.2);
}

/* 按钮样式 */
.btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--white);
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

/* 排名表格样式 */
.stats-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--white);
    padding: 16px;
    border-radius: 12px;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 600;
}

.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
    table-layout: fixed;
}

.ranking-table th,
.ranking-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(210, 210, 215, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 1;
}

.ranking-table th:first-child {
    border-top-left-radius: 12px;
}

.ranking-table th:last-child {
    border-top-right-radius: 12px;
}

.ranking-table tr:hover {
    background: rgba(123, 104, 238, 0.05);
}

.ranking-table td:first-child {
    font-weight: 600;
    color: var(--primary-purple);
}

/* 当前用户高亮样式 */
.ranking-table tr.current-user {
    background: linear-gradient(90deg, rgba(123, 104, 238, 0.15), rgba(150, 131, 255, 0.15));
    position: relative;
    border-left: 4px solid var(--primary-purple);
}

.ranking-table tr.current-user td {
    background: rgba(123, 104, 238, 0.05);
}

.ranking-table tr.current-user td:first-child {
    font-weight: 700;
    color: var(--primary-purple);
    position: relative;
}

.ranking-table tr.current-user td.anonymous-name {
    font-weight: 600;
    color: var(--primary-purple);
    font-style: normal;
}

.ranking-table .anonymous-name {
    color: var(--text-secondary);
    font-style: italic;
}

/* 添加排名标记 */
.ranking-table td:first-child {
    position: relative;
    padding-left: 24px;
}

/* 页面标题样式 */
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 24px;
    text-align: center;
}

/* 统计数字动画 */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-card .value {
    animation: countUp 0.5s ease-out forwards;
}

/* 提示信息样式 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--error);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

/* 资讯卡片样式 */
.info-card {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-purple);
    background: linear-gradient(to right, rgba(123, 104, 238, 0.05), transparent);
}

.info-card .title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 12px;
}

.info-card .content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
}

.contact-info img {
    width: 24px;
    height: 24px;
}

/* 移除所有可点击元素的轮廓和点击效果 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 移除表单元素的默认样式 */
button, input, select, textarea {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    border-radius: 0;
}

/* 移除链接的默认样式 */
a {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    text-decoration: none;
}

/* 允许输入框和文本域可选择文本 */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* 修改公告卡片样式 */
.announcement-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.announcement-header {
    margin-bottom: 16px;
}

.announcement-header h3 {
    color: var(--primary-purple);
    font-size: 1.3em;
    margin: 0 0 12px 0;
}

.announcement-cover {
    width: 100%;
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    background: var(--background);
}

.announcement-cover img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
}

.announcement-content {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* 简化功能区块样式 */
.announcement-links,
.announcement-features,
.announcement-wechat {
    margin: 12px 0;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.announcement-links h4,
.announcement-features h4,
.announcement-wechat h4 {
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 1em;
    font-weight: 500;
}

.announcement-links ul,
.announcement-features ul {
    margin: 0;
    padding-left: 16px;
    list-style-type: circle;
}

.announcement-links li,
.announcement-features li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.announcement-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--background);
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .announcement-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .announcement-cover img {
        max-height: 300px;
    }
    
    .announcement-header h3 {
        font-size: 1.2em;
    }
    
    .announcement-content {
        font-size: 0.95em;
    }
    
    .announcement-links,
    .announcement-features,
    .announcement-wechat {
        padding: 10px;
        margin: 8px 0;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.btn-page {
    padding: 8px 16px;
    border: 1px solid var(--primary-purple);
    background: white;
    color: var(--primary-purple);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-purple);
    color: white;
}

.btn-page.active {
    background: var(--primary-purple);
    color: white;
}

.btn-page:disabled {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .btn-page {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .stats-container {
        gap: 12px;
    }

    .stat-card {
        flex: 0 0 calc(50% - 6px);
        min-width: unset;
        padding: 12px;
    }

    .stat-card h3 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .stat-card .value {
        font-size: 20px;
    }
}

/* 设置每列的宽度 */
.ranking-table th:nth-child(1),
.ranking-table td:nth-child(1) {
    width: 80px;
}

.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
    width: 100px;
}

.ranking-table th:nth-child(3),
.ranking-table td:nth-child(3) {
    width: 120px;
}

.ranking-table th:nth-child(4),
.ranking-table td:nth-child(4) {
    width: 120px;
}

.ranking-table th:nth-child(5),
.ranking-table td:nth-child(5),
.ranking-table th:nth-child(6),
.ranking-table td:nth-child(6),
.ranking-table th:nth-child(7),
.ranking-table td:nth-child(7),
.ranking-table th:nth-child(8),
.ranking-table td:nth-child(8) {
    width: 80px;
}

.ranking-table th:nth-child(9),
.ranking-table td:nth-child(9) {
    width: 120px;
}

/* 添加表格容器的水平滚动 */
.card > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 公众号文章链接样式优化 */
.announcement-wechat {
    background: #f8f8f8;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.announcement-wechat:hover {
    background: #f2f2f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.announcement-wechat h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 500;
}

.announcement-wechat a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #07C160;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(7, 193, 96, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: fit-content;
}

.announcement-wechat a:hover {
    background: rgba(7, 193, 96, 0.15);
    transform: translateX(4px);
}

.announcement-wechat svg {
    flex-shrink: 0;
}

.announcement-wechat a span {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .announcement-wechat {
        padding: 12px;
    }
    
    .announcement-wechat h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .announcement-wechat a {
        padding: 6px 12px;
        font-size: 14px;
    }
}