/* ============================================
   TOP 排行榜增强版样式
   ============================================ */

:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(233,69,96,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,215,0,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 50px 40px;
    text-align: center;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 36px;
    margin-bottom: 16px;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 20px 0 30px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 3px;
}

/* 排行榜 */
.rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin: 50px 0;
    padding: 0 20px;
}

.rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rank-number {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 2px;
}

.rank-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a4e, #3a3a6e);
    border: 3px solid rgba(255,255,255,0.15);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.rank-circle::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    transition: all 0.5s;
}

.rank-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(233,69,96,0.4);
}

.rank-circle:hover::after {
    transform: rotate(360deg);
}

/* TOP 3 特殊样式 */
.rank-circle.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 30px rgba(255,215,0,0.3);
    color: #1a1a2e;
}

.rank-circle.rank-silver {
    background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
    border-color: rgba(192,192,192,0.5);
    box-shadow: 0 0 20px rgba(192,192,192,0.3);
    color: #1a1a2e;
}

.rank-circle.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #a05a2c);
    border-color: rgba(205,127,50,0.5);
    box-shadow: 0 0 20px rgba(205,127,50,0.3);
    color: #1a1a2e;
}

/* 底部 */
.footer {
    margin-top: 40px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 3px;
    padding-bottom: 10px;
}

/* 更新提示 Toast */
.update-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(26,26,46,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    max-width: 320px;
}

.update-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toast-icon {
    font-size: 28px;
    animation: spin 1s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 30px 20px;
        border-radius: 16px;
    }

    h1 { font-size: 24px; }

    .rankings {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 20px;
    }

    .rank-circle {
        width: 70px;
        height: 70px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header-tags { font-size: 10px; gap: 4px 12px; }

    .rankings {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }

    .rank-circle {
        width: 56px;
        height: 56px;
        font-size: 16px;
    }

    .rank-number { font-size: 11px; }
}
