/* ===== JKFW 2026 深海主题 - 完整样式（移动端 sticky 修复版） ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html {
    /* 防止 overflow 干扰 sticky */
    overflow-x: hidden;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0A1A2F;
    color: #F0F8FF;
    min-height: 100vh;
    background-image: radial-gradient(ellipse at 10% 20%, rgba(0,212,200,0.08) 0%, transparent 50%),
                      radial-gradient(ellipse at 90% 80%, rgba(230,200,124,0.06) 0%, transparent 50%);
    padding: 12px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* ===== 品牌变量 ===== */
:root {
    --abyss: #0A1A2F;
    --deep-blue: #0C2738;
    --biolight: #00D4C8;
    --metamorph-gold: #E6C87C;
    --data-white: #F0F8FF;
    --glass-bg: rgba(10, 26, 47, 0.6);
    --glass-border: rgba(0, 212, 200, 0.25);
}

/* ===== 视频背景 ===== */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}
.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10,26,47,0.6);
    z-index: 1;
}
@media (max-width: 768px) {
    /* 手机端保留视频，降低叠加层不透明度 */
    .video-overlay {
        background: rgba(10,26,47,0.3);
    }
    body {
        background: #0A1A2F;
        background-image: radial-gradient(ellipse at 10% 20%, rgba(0,212,200,0.08) 0%, transparent 50%),
                          radial-gradient(ellipse at 90% 80%, rgba(230,200,124,0.06) 0%, transparent 50%);
    }
}

/* ===== 气泡画布 ===== */
#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    touch-action: none;
}

/* ===== 固定顶部区域（移动端 sticky 兼容） ===== */
.sticky-top {
    position: -webkit-sticky;   /* iOS Safari 兼容 */
    position: sticky;
    top: 0;
    z-index: 999;
    padding-bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    /* 确保 sticky 在移动端正常工作 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 导航栏：半透明磨砂玻璃 */
.sticky-top .navbar {
    background: rgba(10, 26, 47, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 0 12px;
}

/* 头部（标题+统计数据）：完全透明 */
.sticky-top .header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    padding: 14px 0 6px !important;
    margin-bottom: 0 !important;
}

/* 消息提示：完全透明 */
.sticky-top .msg {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin: 4px 0 2px !important;
}

/* 搜索框区域：完全透明 */
.sticky-top .search-box {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin: 4px 0 8px !important;
}

/* 搜索框输入框：轻微半透明以保证可读性 */
.sticky-top .search-box input {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* ===== 导航样式（非固定区域也保持一致） ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-wrap: wrap;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    flex: 1;
}
.nav-logo-main {
    height: 52px;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0 0 6px rgba(0,212,200,0.3));
    transition: filter 0.3s ease;
}
.nav-logo-main:hover {
    filter: brightness(1.2) saturate(1.3) drop-shadow(0 0 12px var(--biolight));
}
.nav-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-left: 30px;
    align-items: center;
}
.nav-links a {
    color: var(--data-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 40px;
    transition: 0.3s;
}
.nav-links a:hover {
    background: rgba(0,212,200,0.12);
    color: var(--data-white);
}
.nav-links a.special-lp {
    background: rgba(0,212,200,0.12);
    border: 1px solid rgba(0,212,200,0.3);
    box-shadow: 0 0 8px rgba(0,212,200,0.15);
}
.nav-links a.special-lp:hover {
    background: rgba(0,212,200,0.25);
    box-shadow: 0 0 15px rgba(0,212,200,0.3);
}
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 6px 0 4px;
        gap: 4px;
        border-bottom-width: 0;
    }
    .logo {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
    .nav-logo-main {
        height: 36px;
    }
    .nav-links {
        margin-left: 0;
        gap: 4px;
        flex: 1 1 auto;
        justify-content: flex-end;
    }
    .nav-links a {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 30px;
    }
    .nav-links a.special-lp {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* ===== 头部（非固定区域样式，与固定区透明区分） ===== */
.header {
    text-align: center;
    padding: 14px 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 2px;
}
.header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--biolight), var(--metamorph-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-shadow: 0 0 40px rgba(0,212,200,0.2);
}
.header .sub {
    color: rgba(240,248,255,0.75);
    font-size: 1.0rem;
    margin-top: 4px;
}
.header .stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.header .stats span {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    padding: 5px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
    color: rgba(240,248,255,0.8);
}
.header .stats strong {
    color: var(--biolight);
    font-size: 1.15rem;
}
@media (max-width: 768px) {
    .header {
        padding: 6px 0 4px;
        border-bottom: none;
        margin-bottom: 0;
    }
    .header h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    .header .sub {
        font-size: 0.75rem;
        margin-top: 2px;
    }
    .header .stats {
        gap: 4px;
        margin-top: 4px;
        justify-content: center;
    }
    .header .stats span {
        padding: 2px 10px;
        font-size: 0.7rem;
        border-radius: 30px;
        border: 1px solid rgba(255,255,255,0.05);
        background: rgba(255,255,255,0.03);
    }
    .header .stats strong {
        font-size: 0.85rem;
    }
}

/* ===== 消息提示（非固定区） ===== */
.msg {
    text-align: center;
    padding: 8px 12px;
    border-radius: 12px;
    margin: 4px 0 2px;
    font-weight: 500;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(4px);
}
.msg.success {
    border: 1px solid #51cf66;
    color: #51cf66;
}
.msg.error {
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}
.msg.info {
    border: 1px solid var(--biolight);
    color: var(--biolight);
}

/* ===== 搜索框（非固定区） ===== */
.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 2px;
    flex-wrap: wrap;
}
.search-box input {
    padding: 9px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(4px);
    color: var(--data-white);
    width: 270px;
    font-size: 0.9rem;
    transition: border 0.3s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--biolight);
}
.search-box input::placeholder {
    color: rgba(240,248,255,0.35);
}
.search-box button {
    padding: 9px 28px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--biolight), var(--metamorph-gold));
    color: var(--abyss);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}
.search-box button:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(0,212,200,0.3);
}
@media (max-width: 768px) {
    .search-box {
        margin: 4px 0 2px;
        gap: 6px;
    }
    .search-box input {
        padding: 6px 14px;
        font-size: 0.8rem;
        width: 100%;
        max-width: 200px;
    }
    .search-box button {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* ===== 卡片网格 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 0 30px rgba(0,212,200,0.03);
}
.card:hover {
    transform: translateY(-8px);
    border-color: var(--biolight);
    box-shadow: 0 12px 48px rgba(0,212,200,0.2), inset 0 0 40px rgba(0,212,200,0.05);
}
.card .photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--biolight);
    margin: 0 auto 12px;
    background: var(--deep-blue);
    box-shadow: 0 0 20px rgba(0,212,200,0.3);
}
.card .number {
    font-size: 0.9rem;
    color: var(--biolight);
    font-weight: 600;
    letter-spacing: 1px;
}
.card .name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 6px 0;
    color: var(--data-white);
}
.card .votes {
    color: rgba(240,248,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
@media (max-width: 768px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .card { padding: 18px 12px; }
    .card .photo { width: 90px; height: 90px; }
}
@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .card { padding: 14px 10px; }
    .card .photo { width: 70px; height: 70px; }
    .card .name { font-size: 1.0rem; }
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-primary {
    background: linear-gradient(135deg, var(--biolight), var(--metamorph-gold));
    color: var(--abyss);
    box-shadow: 0 0 20px rgba(0,212,200,0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,212,200,0.5);
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--data-white);
}
.btn-outline:hover {
    border-color: var(--biolight);
    color: var(--biolight);
    background: rgba(0,212,200,0.05);
}
.btn-sm {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--glass-bg);
    color: rgba(240,248,255,0.7);
    text-decoration: none;
    border: 1px solid transparent;
    transition: 0.3s;
}
.pagination a:hover {
    border-color: var(--biolight);
    color: var(--biolight);
}
.pagination .active {
    background: rgba(0,212,200,0.2);
    border-color: var(--biolight);
    color: var(--biolight);
}

/* ===== 表单卡片（登录/注册） ===== */
.form-card {
    max-width: 420px;
    margin: 60px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 32px;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 64px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,212,200,0.03);
}
.form-card h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--biolight), var(--metamorph-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.form-card label {
    display: block;
    margin: 24px 0 10px;
    font-weight: 600;
    color: rgba(240,248,255,0.8);
    line-height: 1.6;
}
.form-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--data-white);
    font-size: 1rem;
    transition: border 0.3s;
    margin-bottom: 4px;
}
.form-card input:focus {
    outline: none;
    border-color: var(--biolight);
}
.form-card .btn {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    font-size: 1.1rem;
}
.form-card .link {
    text-align: center;
    margin-top: 18px;
    color: rgba(240,248,255,0.6);
}
.form-card .link a {
    color: var(--biolight);
    text-decoration: none;
    font-weight: 600;
}
.form-card .link a:hover {
    text-decoration: underline;
}

/* ===== 排行榜表格 ===== */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.rank-table th {
    background: rgba(0,212,200,0.12);
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--biolight);
    border-bottom: 1px solid var(--glass-border);
}
.rank-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rank-table tr:last-child td {
    border-bottom: none;
}
.rank-table .rank-num {
    font-weight: 700;
    color: var(--metamorph-gold);
    font-size: 1.2rem;
}

/* ===== 选手详情页 ===== */
.player-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}
.player-detail .photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--biolight);
    box-shadow: 0 0 60px rgba(0,212,200,0.2);
}
.player-detail .info {
    flex: 1;
    min-width: 250px;
}
.player-detail .info .name {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--biolight), var(--metamorph-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.player-detail .info .number {
    color: rgba(240,248,255,0.6);
    font-size: 1.2rem;
}
.player-detail .info .votes {
    font-size: 2rem;
    margin: 20px 0;
}
.player-detail .info .votes strong {
    color: var(--biolight);
}
@media (max-width: 768px) {
    .player-detail .photo { width: 150px; height: 150px; }
    .player-detail .info .name { font-size: 2rem; }
}

/* ===== 页脚 ===== */
footer {
    margin-top: 60px;
    padding: 30px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.8rem;
    color: rgba(240,248,255,0.4);
}
footer a {
    color: var(--biolight);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* ===== 右下角固定按钮（官网同款水母风格） ===== */
.jellyfish-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(10, 26, 47, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--biolight);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--biolight);
    box-shadow: 0 0 30px rgba(0, 212, 200, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: float 3s infinite ease-in-out;
    text-decoration: none;
    font-size: 24px;
}
.jellyfish-top svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    fill: currentColor;
}
.top-text {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--biolight);
}
.jellyfish-top:hover {
    transform: scale(1.1);
    background: var(--biolight);
    color: var(--abyss);
}
.jellyfish-top:hover .top-text {
    color: var(--abyss);
}
.jellyfish-top:hover svg {
    fill: var(--abyss);
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
@media (max-width: 768px) {
    .jellyfish-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .jellyfish-top svg {
        width: 20px;
        height: 20px;
    }
    .top-text {
        font-size: 8px;
    }
}