@import url('/static/fonts/google/fonts.css');
@import url('/static/fonts/material-symbols/icons.css');

:root {
    --primary: #00eaff;
    --primary-dark: #00bfff;
    --primary-light: #00ffff;
    --background-light: #f2f5f7;
    --background-dark: #0b1019;
    --card-dark: #161d29;
    --surface-dark: #1a1d21;
    --nav-dark: rgba(11, 16, 25, 0.95);
    --gold-accent: #D4AF37;
    --gold-premium: #FCE48D;
    --silver-accent: #93969B;
    --accent-purple: #a855f7;
    --accent-red: #ef4444;
    --accent-red-light: #f87171;
}

:host,
html {
    text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--background-light);
    color: #1f2937;
    min-height: max(884px, 100dvh);
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: var(--background-dark);
    color: #f9fafb;
}

body::-webkit-scrollbar {
    display: none;
}

body::-webkit-scrollbar-track {
    display: none;
}

body::-webkit-scrollbar-thumb {
    display: none;
}

/* ==================== 霓虹效果 ==================== */
.neon-glow {
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
}

.neon-border {
    border: 1px solid rgba(0, 234, 255, 0.3);
}

/* ==================== 毛玻璃效果 ==================== */
.glass-card {
    background: rgba(22, 29, 41, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.orders-modal-content {
    -webkit-overflow-scrolling: touch !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    background: rgba(18, 24, 35, 0.98) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    contain: layout paint !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
}

.glass-nav {
    background: rgba(11, 16, 25, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.glass-header {
    background: rgba(11, 16, 25, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== 文字渐变 ==================== */
.text-gradient {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-button {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-purple) 100%);
}

/* ==================== 金色效果 ==================== */
.gold-gradient {
    background: linear-gradient(135deg, #8B6D3A 0%, var(--gold-accent) 50%, var(--gold-premium) 100%);
}

.gold-glow {
    box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.4);
}

.gold-premium-card {
    background: linear-gradient(145deg, #0d0f12 0%, #1a1e26 100%);
    border: 1px solid rgba(230, 184, 51, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(230, 184, 51, 0.05);
}

.purple-premium-card {
    background: linear-gradient(145deg, #0d0f12 0%, #1a1e26 100%);
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(168, 85, 247, 0.05);
}

.red-premium-card {
    background: linear-gradient(145deg, #0d0f12 0%, #1a1e26 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.05);
}

/* ==================== 支付栏 ==================== */
.payment-bar {
    background: rgba(10, 12, 16, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.benefit-icon-box {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

/* ==================== 单选按钮 ==================== */
.payment-option-radio {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 0.2s;
}

.payment-option-radio:checked {
    border-color: var(--primary);
    background-color: rgba(0, 234, 255, 0.2);
}

.payment-option-radio:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    background-color: var(--primary);
    border-radius: 50%;
}

/* ==================== 导航栏 ==================== */
.nav-floating-pill {
    background: rgba(13, 18, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-glow-center {
    box-shadow: 0 0 35px rgba(0, 234, 255, 0.7);
}

.status-running {
    background: linear-gradient(90deg, var(--primary) 0%, #0088ff 100%);
}

.start-btn-glow {
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.6);
}

.neon-shadow {
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.5);
}

.neon-border-glow {
    box-shadow: inset 0 0 10px rgba(0, 234, 255, 0.1), 0 0 5px rgba(0, 234, 255, 0.2);
    border-color: rgba(0, 234, 255, 0.5) !important;
}

/* ==================== Material Icons ==================== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ==================== 帮助提示 ==================== */
.help-tip {
    position: relative;
    display: inline-flex;
}

.help-tip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 35, 45, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    text-align: left;
    line-height: 1.6;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: tooltipFadeIn 0.2s ease;
}

.help-tip:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 35, 45, 0.95);
    z-index: 1001;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.fill-1 {
    font-variation-settings: 'FILL' 1;
}

/* ==================== 圆角 ==================== */
.rounded-sm {
    border-radius: 0.5rem;
}

.rounded-lg {
    border-radius: 1rem;
}

.rounded-xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ==================== 会员等级样式 ==================== */
.member-vip {
    background: linear-gradient(135deg, #8B6D3A 0%, var(--gold-accent) 50%, var(--gold-premium) 100%);
    box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.4);
}

.member-trial {
    background: linear-gradient(135deg, #666 0%, var(--silver-accent) 100%);
    box-shadow: 0 10px 30px -10px rgba(147, 150, 155, 0.3);
}

.member-regular {
    background: linear-gradient(135deg, #1a1d21 0%, #2a2d31 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== 页面过渡 ==================== */
.page-container {
    padding-top: 80px;
    padding-bottom: 100px;
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 导航项样式 ==================== */
.nav-item {
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

/* 激活状态 - 最原始最简单的样式 */
.nav-item.active {
    color: #00eaff;
}

.nav-item.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* ==================== 快速启动按钮 ==================== */
.power-btn {
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.5);
    transition: all 0.2s;
}

.power-btn:hover {
    box-shadow: 0 0 40px rgba(0, 234, 255, 0.7);
}

.power-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* ==================== 返回按钮 ==================== */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-btn:active {
    transform: scale(0.9);
}

/* ==================== 卡片样式 ==================== */
.card {
    background: var(--card-dark);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--primary);
    color: var(--background-dark);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== 输入框样式 ==================== */
.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: rgba(11, 16, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* ==================== 安全区域 ==================== */
.safe-area-bottom {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 640px) {
    .nav-item span {
        font-size: 10px;
    }
    
    .nav-item .material-symbols-outlined {
        font-size: 24px;
    }
}

/* ==================== 隐藏元素 ==================== */
.hidden {
    display: none !important;
}

/* ==================== 平滑滚动 ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== 选中状态 ==================== */
::selection {
    background: rgba(0, 234, 255, 0.3);
    color: #fff;
}

/* ==================== 打印颜色调整 ==================== */
select {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* ==================== 骨架屏动画 ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==================== 横向滚动吸附 ==================== */
.snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.snap-mandatory {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* ==================== 选中环效果 ==================== */
.ring-2 {
    outline: 2px solid;
    outline-offset: 2px;
}

.ring-primary {
    outline-color: var(--primary);
}

.ring-gold-accent {
    outline-color: var(--gold-accent);
}

.ring-accent-purple {
    outline-color: var(--accent-purple);
}

.ring-accent-red {
    outline-color: var(--accent-red);
}

.ring-white\/40 {
    outline-color: rgba(255, 255, 255, 0.4);
}

/* ==================== 缩放效果 ==================== */
.scale-\[1\.02\] {
    transform: scale(1.02);
}

/* ==================== VIP 会员卡片动效 ==================== */

/* 卡片入场动画 */
.vip-card-enter {
    animation: vipCardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vipCardEnter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 图标弹跳动画 */
.vip-icon-bounce {
    animation: vipIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes vipIconBounce {
    0% {
        transform: scale(0) rotate(-15deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 权益项入场 */
.vip-perk-item {
    opacity: 0;
    animation: perkFadeIn 0.4s ease-out forwards;
}

@keyframes perkFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 流光效果 */
.vip-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 60%,
        transparent 100%
    );
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    40% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

/* 粒子背景 */
.vip-particles,
.vip-detail-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.vip-particles::before,
.vip-particles::after,
.vip-detail-particles::before,
.vip-detail-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: floatParticle 6s ease-in-out infinite;
}

.vip-particles::before,
.vip-detail-particles::before {
    width: 6px;
    height: 6px;
    top: 20%;
    left: 10%;
    background: rgba(255, 255, 255, 0.6);
    animation-delay: 0s;
}

.vip-particles::after,
.vip-detail-particles::after {
    width: 4px;
    height: 4px;
    top: 60%;
    right: 15%;
    background: rgba(255, 255, 255, 0.4);
    animation-delay: 2s;
    animation-duration: 8s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }
    25% {
        transform: translate(15px, -10px) scale(1.5);
        opacity: 0.3;
    }
    50% {
        transform: translate(-5px, -20px) scale(1);
        opacity: 0.2;
    }
    75% {
        transform: translate(10px, -5px) scale(1.3);
        opacity: 0.25;
    }
}

/* 详情弹窗权益项动画 */
.detail-perk-item {
    opacity: 0;
    animation: detailPerkSlide 0.35s ease-out forwards;
}

@keyframes detailPerkSlide {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 历史记录项动画 */
.history-item {
    opacity: 0;
    animation: historySlide 0.3s ease-out forwards;
}

@keyframes historySlide {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 会员卡片悬停效果 */
#vip-card-container {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#vip-card-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* 进度条呼吸动画（即将到期时） */
.vip-progress-warning {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ==================== 时长统计动态布局 ==================== */

/* 基础布局容器 */
.duration-stats-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 布局级别：根据时长决定展示方式 */

/* Level 0: 无时长 - 简洁提示 */
.duration-level-0 .duration-summary-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.duration-level-0 .duration-value {
    color: #64748b;
}

/* Level 1: 少量时长 (< 1小时) - 紧凑显示 */
.duration-level-1 .duration-summary-card {
    padding: 1rem;
}

.duration-level-1 .duration-value {
    font-size: 1.5rem;
}

.duration-level-1 .duration-unit {
    font-size: 0.875rem;
}

/* Level 2: 中等时长 (1-5小时) - 标准显示 */
.duration-level-2 .duration-summary-card {
    padding: 1.25rem;
    background: rgba(0, 234, 255, 0.03);
    border-color: rgba(0, 234, 255, 0.15);
}

.duration-level-2 .duration-value {
    font-size: 2rem;
    color: #00eaff;
}

/* Level 3: 充足时长 (5-24小时) - 高亮显示 */
.duration-level-3 .duration-summary-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.05), rgba(168, 85, 247, 0.05));
    border-color: rgba(0, 234, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.1);
}

.duration-level-3 .duration-value {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00eaff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.duration-level-3 .duration-glow {
    opacity: 1;
}

/* Level 4: 海量时长 (> 24小时) - 豪华显示 */
.duration-level-4 .duration-summary-card {
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(0, 234, 255, 0.08), rgba(168, 85, 247, 0.05));
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.15), 0 0 60px rgba(168, 85, 247, 0.1);
    animation: durationLuxuryGlow 3s ease-in-out infinite;
}

.duration-level-4 .duration-value {
    font-size: 3rem;
    background: linear-gradient(90deg, #FCE48D, #D4AF37, #00eaff, #a855f7);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

.duration-level-4 .duration-crown {
    display: flex;
}

.duration-level-4 .duration-particles {
    opacity: 1;
}

@keyframes durationLuxuryGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 234, 255, 0.15), 0 0 60px rgba(168, 85, 247, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.2), 0 0 80px rgba(0, 234, 255, 0.15);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* 时长数字跳动动画 */
.duration-number-pop {
    animation: numberPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes numberPop {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 粒子效果容器 */
.duration-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.duration-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #00eaff;
    animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    50% {
        transform: translate(var(--px), var(--py)) scale(1.5);
    }
}

/* 皇冠图标 */
.duration-crown {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #D4AF37;
}

/* 时长分类卡片级别样式 */
.duration-section-level-0 {
    opacity: 0.5;
}

.duration-section-level-1 .dur-section-card {
    border-color: rgba(255, 255, 255, 0.08);
}

.duration-section-level-2 .dur-section-card {
    border-color: rgba(0, 234, 255, 0.2);
    background: rgba(0, 234, 255, 0.02);
}

.duration-section-level-3 .dur-section-card {
    border-color: rgba(0, 234, 255, 0.3);
    background: rgba(0, 234, 255, 0.04);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.08);
}

/* 进度条动态样式 */
.duration-progress-bar {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
}

.duration-progress-low {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.duration-progress-medium {
    background: linear-gradient(90deg, #00eaff, #00bfff);
}

.duration-progress-high {
    background: linear-gradient(90deg, #00eaff, #a855f7);
}

.duration-progress-max {
    background: linear-gradient(90deg, #FCE48D, #D4AF37, #00eaff);
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

