/* ranking.css - 整合背景色和按钮样式，与brothel.css风格一致，优化悬浮logo样式 */

/* 继承brothel.css的变量定义 */
:root {
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --accent-color: #c084fc;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --text-color: #ffffff;
    --text-secondary: #e2e8f0;
    --background-color: #0f0f23;
    --surface-color: rgba(15, 15, 35, 0.95);
    --card-bg-color: rgba(30, 30, 60, 0.9);
    --glass-bg: rgba(15, 15, 35, 0.7);
    --neon-purple: #8b5cf6;
    --neon-pink: #ec4899;
    --neon-blue: #06b6d4;
    --neon-orange: #f97316;
    --neon-red: #ef4444;
    --gradient-sexy: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-hot: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #8b5cf6 100%);
    --gradient-passion: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.6s;
    --shadow-sm: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(139, 92, 246, 0.3);
    --shadow-neon: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.025em;
}

/* 背景动画 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0f0f23 70%);
}

.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    will-change: transform;
}

.shape1 {
    width: 600px;
    height: 600px;
    background: conic-gradient(from 0deg, #8b5cf6, #ec4899, #06b6d4, #a855f7, #8b5cf6);
    top: -200px;
    left: -200px;
    animation: elegantFloat 25s ease-in-out infinite;
}

.shape2 {
    width: 700px;
    height: 400px;
    background: linear-gradient(45deg, #a855f7, #ec4899, #06b6d4);
    bottom: -150px;
    right: -250px;
    border-radius: 60% 40% 60% 40%;
    animation: elegantFloat 30s ease-in-out infinite reverse;
}

.shape3 {
    width: 500px;
    height: 600px;
    background: radial-gradient(ellipse, #ec4899, #8b5cf6, #6366f1);
    top: 30%;
    left: 70%;
    border-radius: 70% 30% 70% 30%;
    animation: elegantFloat 22s ease-in-out infinite 3s;
}

.shape4 {
    width: 350px;
    height: 350px;
    background: conic-gradient(from 45deg, transparent, #8b5cf6, transparent);
    top: 60%;
    left: 20%;
    animation: elegantRotate 20s linear infinite;
}

.shape5 {
    width: 450px;
    height: 250px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    top: 10%;
    right: 30%;
    border-radius: 50%;
    animation: elegantPulse 18s ease-in-out infinite;
}

.background-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.06) 2px, transparent 2px),
            radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: 0 0, 40px 40px;
    animation: gridElegantMove 35s linear infinite;
}

/* 动画定义 */
@keyframes elegantFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    25% {
        transform: translate(60px, -40px) scale(1.1) rotate(90deg);
        border-radius: 60% 40% 70% 30%;
    }
    50% {
        transform: translate(-30px, 60px) scale(0.9) rotate(180deg);
        border-radius: 30% 70% 40% 60%;
    }
    75% {
        transform: translate(40px, 30px) scale(1.05) rotate(270deg);
        border-radius: 70% 30% 60% 40%;
    }
}

@keyframes elegantRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes elegantPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

@keyframes gridElegantMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

header {
    padding: 20px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 悬浮Logo样式 */
#floating-logo {
    display: flex;
    align-items: center;
}

#floating-logo a {
    display: flex;
    align-items: center;
    padding: 6px;
    transition: all var(--transition-normal);
    text-decoration: none; /* 去掉下划线 */
}

#floating-logo a:hover {
    transform: translateX(-4px);
}

#floating-logo img {
    width: 160px; /* 比return-home大 */
    height: auto;
}

.return-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    text-decoration: none; /* 去掉下划线 */
    transition: all var(--transition-normal);
}

.return-home:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--neon-purple);
    transform: translateX(-4px);
}

.return-home i {
    font-size: 16px;
    transition: transform var(--transition-normal);
}

.return-home:hover i {
    transform: scale(1.2);
}

.ranking-page {
    margin-top: 20px;
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(24px);
}

.ranking-page h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 32px;
    background: var(--gradient-sexy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
}

.ranking-page h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-sexy);
    border-radius: 2px;
}

.ranking-list {
    list-style: none;
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
}

.ranking-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-sexy);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: all var(--transition-normal);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    position: relative;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(139, 92, 246, 0.1);
    transition: width var(--transition-normal);
    border-radius: var(--border-radius);
}

.ranking-item:hover::before {
    width: 100%;
}

.ranking-item:hover {
    transform: translateX(8px);
}

.ranking-number {
    width: 36px;
    height: 36px;
    background: var(--gradient-sexy);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-right: 16px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.ranking-text {
    font-size: 16px;
    color: var(--text-color);
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 100%; /* 防止溢出 */
    white-space: nowrap; /* 单行显示 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 截断加... */
}

.ranking-text strong {
    color: var(--neon-purple);
}

.ranking-link {
    text-decoration: none; /* 去掉下划线 */
    color: inherit; /* 继承父元素颜色 */
    display: inline-block; /* 支持截断 */
    max-width: 100%; /* 防止溢出 */
    white-space: nowrap; /* 单行显示 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 截断加... */
}

.ranking-link:hover {
    color: var(--neon-purple); /* 悬停效果 */
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    gap: 12px;
}

.pagination button {
    padding: 10px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    color: var(--neon-purple);
    transform: translateY(-2px);
    border-color: var(--neon-purple);
}

.pagination button:disabled {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination #page-info {
    padding: 10px 16px;
    border-radius: var(--border-radius);
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 8px 0;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    #floating-logo img {
        width: 160px; /* 移动端略小但仍比return-home大 */
    }

    .return-home {
        font-size: 14px;
        padding: 6px 12px;
    }

    .return-home i {
        font-size: 14px;
    }

    .ranking-page {
        padding: 15px;
    }

    .ranking-page h1 {
        font-size: 28px;
    }

    .ranking-list {
        padding: 16px;
    }

    .ranking-item {
        padding: 12px 0;
    }

    .ranking-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-right: 12px;
    }

    .ranking-text {
        font-size: 14px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination button,
    .pagination #page-info {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
}