/* ===========================
   基础变量（颜色/阴影/尺寸）- 移动优先
   =========================== */
:root {
    --bg: linear-gradient(135deg, #191a2b 0%, #25274d 100%);
    --card-bg: rgba(36,34,67,0.93);
    --card-border: rgba(189,196,255,0.15);
    --text: #f5f6fa;
    --muted: #94a3b8;
    --accent: #8b5cf6;
    --accent2: #00f5ff;
    --radius: 20px;
    --shadow: 0 12px 36px rgba(50,30,130,0.16),0 1.5px 6px #0002;
    /* 手机端专用变量 */
    --mobile-padding: 12px;
    --mobile-gap: 14px;
    --mobile-font-base: 15px;
    --mobile-radius: 16px;
}

/* 禁止横向滚动 */
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: 'Segoe UI', 'Roboto', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===========================
   背景动线
   =========================== */
.bg-lines {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.32;
    pointer-events: none;
}

/* ===========================
   内容整体布局 - 移动优先
   =========================== */
.wrap {
    width: 100%;
    padding: var(--mobile-padding);
    max-width: 1024px;
    margin: 0 auto;
    box-sizing: border-box;
    padding-bottom: 24px;
}

main {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-gap);
}

/* 桌面平铺左右结构 */
@media (min-width: 900px) {
    main {
        flex-direction: row;
        align-items: flex-start;
    }
    main > section {
        flex: 2;
    }
    aside {
        flex: 1;
    }
}

/* ===========================
   卡片组件（统一风格）- 移动优化
   =========================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--mobile-radius);
    padding: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    margin-bottom: 12px;
    transition: box-shadow .28s, transform .18s, background .38s;
}

body {
    background: var(--bg) !important;
}

.card, header.card {
    background: var(--card-bg) !important;
    box-shadow: var(--shadow);
    border-radius: var(--mobile-radius);
    border: 1.5px solid var(--card-border);
}

/* 桌面端hover效果 */
@media (min-width: 768px) {
    .card:hover, header.card:hover {
        transform: translateY(-2px) scale(1.012);
        box-shadow: 0 20px 52px #7c3aed55;
    }
}
/* 标题渐变效果（在标题排版部分已定义，这里仅保留渐变样式） */
h1, .h2 {
  background: linear-gradient(90deg,var(--accent),var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-decoration-break: clone;
}
.badge {
  background: linear-gradient(90deg,var(--accent),var(--accent2),var(--accent));
  box-shadow: 0 2px 8px #7c3aed33;
}
.btn {
  box-shadow: 0 2px 14px #00f5ff22;
  transition: box-shadow .18s, transform .18s, background .22s;
}
.btn:hover {
  opacity: 0.88;
  box-shadow: 0 6px 24px #00f5ff44;
}
.btn:active {
  transform: scale(.98) translateY(1px);
  box-shadow: 0 2px 12px #8b5cf633;
}
input,textarea,select {
  border: 1.5px solid var(--card-border);
  transition: border-color .2s, box-shadow .24s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #00f5ff33;
}
/* grid 卡片块增强（更丰满） */
@media (min-width: 600px) {
  .grid {gap: 24px;}
  .feature {background:rgba(139,92,246,0.04);padding:12px 10px;border-radius:13px;}
}
/* ===========================
   标题排版 - 移动优化
   =========================== */
h1, h2, h3, h4 {
    margin: 8px 0;
    font-weight: 600;
    line-height: 1.4;
}

h1 {
    font-size: clamp(20px, 5vw, 28px);
    margin-bottom: 10px;
    /* 渐变文字效果 */
    background: linear-gradient(90deg,var(--accent),var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-decoration-break: clone;
    /* 标题动画 */
    animation: fadeScaleIn .88s cubic-bezier(.23,1.09,.46,1.03) forwards;
}

.h2 {
    font-size: clamp(16px, 4vw, 20px);
    margin-bottom: 8px;
    /* 渐变文字效果 */
    background: linear-gradient(90deg,var(--accent),var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-decoration-break: clone;
    /* 标题动画 */
    animation: fadeScaleIn .88s cubic-bezier(.23,1.09,.46,1.03) forwards;
}

@keyframes fadeScaleIn {
  0% {opacity:0;transform:scale(.93) translateY(28px);}
  88% {opacity:1;}
  100% {opacity:1;transform:scale(1) translateY(0);}
}

/* 安全底距/兼容性调整 */
body { 
    padding-bottom: env(safe-area-inset-bottom, 22px) !important;
}

h3 {
    font-size: clamp(15px, 3.5vw, 18px);
}

/* ===========================
   头部区块 - 移动优化
   =========================== */
header.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
}

.logo {
    font-size: clamp(28px, 6vw, 36px);
    margin-bottom: 4px;
}

/* 桌面端header布局 */
@media (min-width: 768px) {
    header.card {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
}

/* pill 标签 - 移动优化 */
.pill {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
}

/* badge 徽章（紫蓝渐变）- 移动优化 */
.badge {
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    display: inline-block;
    font-weight: 600;
    white-space: nowrap;
}

/* ===========================
   section 内排版 - 移动优化
   =========================== */
.panel-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* 桌面端panel-title布局 */
@media (min-width: 600px) {
    .panel-title {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
}

/* ===========================
   feature 点状图标 + 文本 - 移动优化
   =========================== */
.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

.feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: rgba(139,92,246,0.04);
    border-radius: 12px;
    transition: background .2s;
}

.feature:hover {
    background: rgba(139,92,246,0.08);
}

.dot {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.feature strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--text);
}

.feature .meta {
    font-size: 13px;
    margin-top: 4px;
}

/* ===========================
   CTA 按钮组 - 移动优化（大触摸区域）
   =========================== */
.btn {
    padding: 14px 20px;
    border-radius: var(--mobile-radius);
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    min-height: 48px;
    min-width: 120px;
    transition: all 0.2s;
    box-shadow: 0 2px 14px #00f5ff22;
    border: none;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    opacity: 0.88;
    box-shadow: 0 6px 24px #00f5ff44;
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(.97) translateY(0);
    box-shadow: 0 2px 12px #8b5cf633;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 手机端按钮全宽 */
@media (max-width: 600px) {
    .btn {
        width: 100%;
        min-width: auto;
    }
}

/* ===========================
   倒计时组件 - 移动优化
   =========================== */
.countdown {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.time {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    min-width: 44px;
    flex: 1;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    .time {
        font-size: 16px;
        padding: 8px 10px;
        min-width: 38px;
    }
    .countdown {
        gap: 4px;
    }
}

/* ===========================
   表格（活动时间表）- 移动优化
   =========================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 12px 8px;
    font-size: 14px;
    line-height: 1.5;
}

th {
    color: var(--accent2);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}

td {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* 手机端表格优化 */
@media (max-width: 480px) {
    th, td {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* ===========================
   排行预览表格
   =========================== */
.rank td {
    padding: 6px 4px;
}

.rank .gold {
    color: #ffe75d;
}

/* ===========================
   footer
   =========================== */
footer {
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

/* ===========================
   超链接统一风格
   =========================== */
a {
    color: var(--accent2);
    text-decoration: none;
}
a:hover {
    opacity: 0.85;
}

/* ========== 全局移动端兼容增强 ========== */
html, body {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input, textarea, select {
  font-size: 1rem;
  border-radius: 0.5rem;
  touch-action: manipulation;
  outline: none;
}
button, .btn, a.btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 1rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  user-select: none;
}
button:active, .btn:active, a.btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}
img, video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 10px;
}
/* ========== 手机端全面优化 ========== */
@media (max-width: 480px) {
    body, html {
        font-size: 15px;
    }
    
    .wrap {
        padding: 10px;
        padding-bottom: 32px;
    }
    
    .card {
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 12px;
    }
    
    header.card {
        padding: 14px;
    }
    
    h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .h2 {
        font-size: 17px;
    }
    
    .meta {
        font-size: 12px;
    }
    
    .btn {
        font-size: 15px;
        padding: 13px 18px;
        min-height: 46px;
    }
    
    .feature {
        padding: 10px;
        gap: 10px;
    }
    
    .dot {
        font-size: 22px;
    }
    
    .panel-title {
        gap: 6px;
    }
    
    .badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .pill {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    footer {
        font-size: 11px;
    }
}

/* 超小屏优化（iPhone SE等） */
@media (max-width: 375px) {
    .wrap {
        padding: 8px;
    }
    
    .card {
        padding: 12px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    .btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* 安全区域适配（iPhone X等刘海屏） */
@supports (padding: max(0px)) {
    .wrap {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}


.page-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
    color: var(--muted);
}

.page-footer p,a {
    margin: 6px 0;
    font-size: 14px;
}

.footer-meta {
    font-size: 12px;
    opacity: 0.8;
}