/* =====================================================
   AI看相 · 斯威戈因 - 高级简约星空主题 v2.0
   优化版本 - 性能优先、动画丰富、细节完美
   ===================================================== */

/* ==================== 变量定义 ==================== */
:root {
    /* 星空背景色 */
    --star-bg-deep: #0a0a1a;
    --star-bg-mid: #0f0f2a;
    --star-bg-light: #14143a;

    /* 表面色 */
    --star-surface: rgba(20, 20, 50, 0.8);
    --star-surface-hover: rgba(30, 30, 70, 0.9);
    --star-surface-light: rgba(255, 255, 255, 0.05);
    --star-surface-glass: rgba(255, 255, 255, 0.03);

    /* 强调色 */
    --star-accent: #A855F7;
    --star-accent2: #7C3AED;
    --star-accent3: #C084FC;
    --star-accent4: #EC4899;
    --star-accent5: #06B6D4;
    --star-accent6: #F472B6;

    /* 发光效果 */
    --star-glow: 0 0 20px rgba(168, 85, 247, 0.5);
    --star-glow2: 0 0 40px rgba(124, 58, 237, 0.3);
    --star-glow3: 0 0 60px rgba(192, 132, 252, 0.2);
    --star-glow-accent: 0 0 30px rgba(168, 85, 247, 0.6);
    --star-glow-pink: 0 0 30px rgba(236, 72, 153, 0.5);

    /* 边框 */
    --star-border: rgba(168, 85, 247, 0.2);
    --star-border-hover: rgba(168, 85, 247, 0.5);
    --star-border-active: rgba(168, 85, 247, 0.8);

    /* 文字 */
    --star-text: #E2E8F0;
    --star-text-dim: #94A3B8;
    --star-text-bright: #FFFFFF;
    --star-text-glow: rgba(168, 85, 247, 0.5);

    /* 渐变 */
    --star-gradient: linear-gradient(135deg, #A855F7, #EC4899);
    --star-gradient-alt: linear-gradient(135deg, #EC4899, #A855F7);
    --star-gradient-vertical: linear-gradient(180deg, #A855F7, #7C3AED);
    --star-gradient-bg: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    --star-gradient-radial: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    --star-gradient-shine: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);

    /* 尺寸 */
    --header-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.4);
}

/* ==================== 重置 & 基础 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--star-gradient-bg);
    color: var(--star-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.starry-theme { background: var(--star-gradient-bg); }

a { color: var(--star-accent); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--star-accent3); text-decoration: none; }

img { max-width: 100%; height: auto; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--star-accent);
    outline-offset: 2px;
}

/* 选择样式 */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: var(--star-text-bright);
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--star-bg-deep); }
::-webkit-scrollbar-thumb { background: var(--star-accent2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--star-accent); }

/* ==================== 粒子背景 ==================== */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#particlesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==================== 顶部导航 ==================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--star-border);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.main-header.scrolled {
    background: rgba(10, 10, 26, 0.98);
    box-shadow: var(--shadow-lg);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.logo-cn {
    font-size: 18px;
    font-weight: 600;
    color: var(--star-text-bright);
    letter-spacing: 2px;
}

.logo-sep {
    color: var(--star-accent);
    font-weight: 300;
}

.logo-en {
    font-size: 11px;
    color: var(--star-text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 导航 */
.main-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--star-text);
    font-size: 15px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--star-gradient);
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    color: var(--star-text-bright);
    background: var(--star-surface-light);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

/* 头部按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: var(--star-text);
    font-size: 14px;
}

.user-credits {
    padding: 4px 10px;
    background: var(--star-gradient);
    border-radius: var(--border-radius-full);
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-login {
    background: transparent;
    border: 1px solid var(--star-border);
    color: var(--star-text);
}

.btn-login:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

.btn-register {
    background: var(--star-gradient);
    border: none;
    color: white;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

.btn-logout {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
}

.btn-admin {
    padding: 8px 16px;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    color: var(--star-text-dim);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    transition: var(--transition-fast);
}

.btn-admin:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--star-text);
    font-size: 24px;
}

/* ==================== 移动端菜单 ==================== */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--star-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu a {
    display: block;
    padding: 14px 20px;
    color: var(--star-text);
    font-size: 16px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.mobile-menu a:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--star-accent);
}

/* ==================== 页面容器 ==================== */
.page {
    display: none;
    padding-top: var(--header-height);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.page.active {
    display: block;
}

/* ==================== 首页 ==================== */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-mandala {
    position: absolute;
    width: 600px;
    height: 600px;
    opacity: 0.1;
    animation: rotateMandala 60s linear infinite;
}

@keyframes rotateMandala {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 曼陀罗动画 ==================== */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.face-mandala {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mandala-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.mandala-ring.ring-1 {
    width: 280px;
    height: 280px;
    border-color: rgba(168, 85, 247, 0.2);
    animation: pulseRing 3s ease-in-out infinite;
}

.mandala-ring.ring-2 {
    width: 200px;
    height: 200px;
    border-color: rgba(124, 58, 237, 0.3);
    animation: pulseRing 3s ease-in-out infinite 0.5s;
}

.mandala-ring.ring-3 {
    width: 130px;
    height: 130px;
    border-color: rgba(192, 132, 252, 0.4);
    animation: pulseRing 3s ease-in-out infinite 1s;
}

@keyframes pulseRing {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.mandala-center {
    position: absolute;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--star-text-bright);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.hero-title span {
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-en {
    display: block;
    font-size: 0.5em;
    font-weight: 500;
    letter-spacing: 6px;
    padding-left: 2px;
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.9), rgba(168, 85, 247, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--star-text-dim);
    margin-bottom: 40px;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.btn-primary-hero {
    padding: 16px 40px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: 18px;
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--star-gradient-shine);
    transition: left 0.5s ease;
}

.btn-primary-hero:hover::before {
    left: 100%;
}

.btn-primary-hero:hover {
    transform: translateY(-3px);
    box-shadow: var(--star-glow);
}

.btn-secondary-hero {
    padding: 16px 40px;
    background: transparent;
    border: 2px solid var(--star-border);
    border-radius: var(--border-radius);
    color: var(--star-text);
    font-size: 18px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-secondary-hero:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

/* ==================== 核心功能（整洁四列网格） ==================== */
.features-section {
    padding: 48px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--star-text-bright);
    margin-bottom: 28px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 28px 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--star-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--star-border-hover);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--star-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 1.05rem;
    color: var(--star-text-bright);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--star-text-dim);
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 14px;
    flex: 1;
}

.feature-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(168, 85, 247, 0.12);
    color: var(--star-accent3);
    border-radius: var(--border-radius-full);
    font-size: 11px;
    margin-top: auto;
    border: 1px solid rgba(168, 85, 247, 0.2);
    align-self: center;
}

/* ==================== 服务套餐（横向一行） ==================== */
.pricing-section {
    padding: 48px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.pricing-card {
    flex: 1;
    max-width: 320px;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pricing-card.popular {
    border-color: var(--star-accent);
    transform: scale(1.05);
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12), var(--shadow-lg), 0 0 40px rgba(168, 85, 247, 0.15);
    z-index: 1;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 20px;
    background: var(--star-gradient);
    border-radius: var(--border-radius-full);
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.pricing-header {
    margin-bottom: 16px;
    width: 100%;
}

.pricing-header h3 {
    font-size: 1.1rem;
    color: var(--star-text-bright);
    margin-bottom: 8px;
}

.pricing-title {
    font-size: 1.5rem;
    color: var(--star-text-bright);
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.pricing-price span {
    font-size: 0.9rem;
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
    width: 100%;
    text-align: left;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--star-text-dim);
    font-size: 13px;
    border-bottom: 1px solid var(--star-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li.disabled {
    color: rgba(148, 163, 184, 0.5);
    text-decoration: line-through;
}

.pricing-features li::before {
    content: attr(data-check);
    font-size: 14px;
}

.pricing-features li[data-check="✓"]::before {
    color: #10B981;
}

.pricing-features li[data-check="✗"]::before {
    color: rgba(148, 163, 184, 0.5);
}

.btn-pricing {
    width: 100%;
    padding: 12px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
    margin-top: auto;
}

.btn-pricing:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

/* 使用流程 */
.process-section {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.process-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--star-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
    position: relative;
    z-index: 2;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--star-accent), transparent);
    transform: translateY(-50%);
}

.process-step:last-child .step-number::before {
    display: none;
}

.step-title {
    font-size: 1.1rem;
    color: var(--star-text-bright);
    margin-bottom: 8px;
}

.step-desc {
    color: var(--star-text-dim);
    font-size: 14px;
}

/* 步骤内容（兼容新旧类名） */
.step-content h3 {
    font-size: 1.1rem;
    color: var(--star-text-bright);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--star-text-dim);
    font-size: 14px;
    line-height: 1.6;
}

.step-arrow {
    color: var(--star-accent);
    font-size: 24px;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

/* 如何使用流程区块 */
.howitworks-section {
    padding: 48px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.howitworks-section .section-title {
    margin-bottom: 28px;
}

/* 首页统计 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--star-text-dim);
    font-size: 14px;
}



/* ==================== AI面诊页 ==================== */
/* 上传区域 - AI面诊页 */
.face-upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.face-header {
    text-align: center;
    margin-bottom: 48px;
}

.face-header h2 {
    font-size: 2.2rem;
    color: var(--star-text-bright);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.face-subtitle {
    color: var(--star-text-dim);
    font-size: 1rem;
    margin-bottom: 20px;
}

.free-usage {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--border-radius-full);
    font-size: 14px;
}

.free-usage .usage-text {
    color: var(--star-text-dim);
}

.free-usage strong {
    color: var(--star-accent);
    font-size: 1.3rem;
    font-weight: 700;
}

/* 上传区域主容器 - 高级设计 */
.upload-area {
    background: linear-gradient(145deg, var(--star-surface), rgba(15, 15, 25, 0.8));
    border: 2px dashed rgba(168, 85, 247, 0.4);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 背景光效 */
.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: var(--star-accent);
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(168, 85, 247, 0.2),
        0 0 60px rgba(168, 85, 247, 0.1);
}

.upload-area.dragover {
    border-color: var(--star-accent);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.05));
    transform: scale(1.02);
}

.upload-area.has-photo {
    padding: 24px;
    border-style: solid;
    border-color: var(--star-accent);
    background: rgba(0, 0, 0, 0.3);
}

/* 上传占位符 */
.upload-placeholder {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease;
}

.upload-icon {
    font-size: 80px;
    margin-bottom: 28px;
    opacity: 0.85;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-title {
    font-size: 1.4rem;
    color: var(--star-text-bright);
    margin-bottom: 12px;
    font-weight: 600;
}

.upload-hint {
    color: var(--star-text-dim);
    font-size: 14px;
    margin-bottom: 24px;
}

.upload-tips {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.upload-tips span {
    color: var(--star-accent3);
    font-size: 13px;
    padding: 8px 16px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.upload-tips span:hover {
    background: rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
}

/* 上传预览 */
.upload-preview {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease;
}

.upload-preview img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(168, 85, 247, 0.3);
}

.btn-change {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--star-accent), var(--star-accent2));
    border: none;
    border-radius: 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
}

.upload-preview:hover .btn-change {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.btn-change:hover {
    background: linear-gradient(135deg, var(--star-accent3), var(--star-accent));
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.5);
}

/* 兼容旧类名 */
.photo-upload-section {
    background: var(--star-surface);
    border: 2px dashed var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.photo-upload-section:hover {
    border-color: var(--star-accent);
    background: rgba(168, 85, 247, 0.05);
}

.photo-upload-section.dragover {
    border-color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

.photo-preview-container {
    display: none;
    position: relative;
}

.photo-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
    object-fit: contain;
}

.change-photo-btn {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.change-photo-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.upload-text {
    color: var(--star-text-dim);
    margin-bottom: 16px;
}

/* 分析按钮区域 */
.analyze-section {
    text-align: center;
    margin-top: 32px;
    animation: fadeIn 0.4s ease;
}

/* 通用按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--star-accent), var(--star-accent2));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    color: var(--star-text);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

/* 分析按钮 */
.btn-analyze {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--star-accent), var(--star-accent2), var(--star-accent4));
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-analyze::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-analyze:hover::before {
    left: 100%;
}

.btn-analyze:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 45px rgba(168, 85, 247, 0.5);
    background-position: 100% 100%;
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Loading状态 */
.analysis-loading {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.4s ease;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--star-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite, glow 2s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
    50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.6); }
}

.loading-text {
    color: var(--star-text);
    font-size: 18px;
    margin-bottom: 28px;
    font-weight: 500;
}

.loading-progress-bar {
    width: 100%;
    max-width: 320px;
    height: 8px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 4px;
    margin: 0 auto 28px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--star-accent), var(--star-accent3), var(--star-accent4));
    background-size: 200% 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 加载步骤指示器 */
.loading-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.loading-step {
    padding: 10px 20px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    color: var(--star-text-dim);
    font-size: 14px;
    transition: all 0.4s ease;
}

.loading-step.active {
    background: linear-gradient(135deg, var(--star-accent), var(--star-accent2));
    border-color: transparent;
    color: white;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
    animation: stepPulse 1s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 分析结果 */
/* ==================== 分析结果区域 ==================== */
.analysis-result {
    display: none;
    margin-top: 32px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, var(--star-surface) 100%);
    animation: fadeIn 0.5s ease;
}

/* 顶部标题行 */
.result-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    background: rgba(168, 85, 247, 0.06);
}

.result-title-row h3 {
    font-size: 1.3rem;
    color: var(--star-text-bright);
    font-weight: 600;
    margin: 0;
}

.result-date {
    color: var(--star-text-dim);
    font-size: 13px;
}

/* 核心英雄区：照片 + 评分 */
.result-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 40px 32px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    flex-wrap: wrap;
}

.result-photo-wrap {
    flex-shrink: 0;
}

.result-photo-wrap img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: block;
}

.result-score-wrap {
    text-align: center;
}

/* 评分圆环 */
.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring .score-bg {
    fill: none;
    stroke: rgba(168, 85, 247, 0.15);
    stroke-width: 10;
}

.score-ring .score-fill {
    fill: none;
    stroke: url(#scoreGrad);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.1;
}

.score-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #A855F7, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-unit {
    font-size: 14px;
    color: var(--star-text-dim);
}

.score-label {
    color: var(--star-text);
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 6px;
}

.score-desc {
    color: var(--star-accent);
    font-size: 13px;
    margin: 0;
}

/* 内容卡片区域 */
.result-body {
    padding: 8px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-card {
    padding: 20px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(168, 85, 247, 0.1);
    transition: background 0.3s ease;
}

.result-card:hover {
    background: rgba(168, 85, 247, 0.05);
}

.result-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.card-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    border-radius: 10px;
    flex-shrink: 0;
}

.result-card-title span:last-child {
    font-size: 15px;
    font-weight: 600;
    color: var(--star-text-bright);
}

.result-card-text {
    color: var(--star-text);
    line-height: 1.9;
    font-size: 14px;
    margin: 0;
}

/* 五官特征列表 */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: 10px;
}

.feature-name {
    color: var(--star-text-dim);
    font-size: 13px;
}

.feature-value {
    color: var(--star-accent);
    font-size: 13px;
    font-weight: 600;
}

/* 运势网格 */
.luck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.luck-item {
    text-align: center;
    padding: 16px 10px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.luck-item:hover {
    transform: translateY(-2px);
}

.luck-name {
    color: var(--star-text-dim);
    font-size: 12px;
    margin-bottom: 8px;
    display: block;
}

.luck-score {
    font-size: 1.6rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.luck-score.high  { color: #34D399; }
.luck-score.medium { color: #FBBF24; }
.luck-score.low   { color: #F87171; }

/* 操作按钮区 */
.result-actions {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
}

.btn-action-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--star-accent), var(--star-accent2));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3);
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.45);
}

.result-actions-row {
    display: flex;
    gap: 12px;
}

.btn-action-ghost {
    flex: 1;
    padding: 13px;
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: var(--star-text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-action-ghost:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
    background: rgba(168, 85, 247, 0.08);
}

/* 旧类名兼容（btn-action保留给其他地方使用） */
.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

.btn-action.btn-secondary {
    background: transparent;
    border: 1px solid var(--star-border);
    color: var(--star-text);
}

.btn-action.btn-secondary:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
}

.btn-icon {
    font-size: 16px;
}

/* ==================== 姻缘匹配页 ==================== */
.match-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.match-header {
    text-align: center;
    margin-bottom: 40px;
}

.match-header h2 {
    font-size: 2rem;
    color: var(--star-text-bright);
    margin-bottom: 12px;
}

.match-subtitle {
    color: var(--star-text-dim);
}

.match-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.match-person {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.person-title {
    font-size: 1.2rem;
    color: var(--star-text-bright);
    margin-bottom: 20px;
    text-align: center;
}

.photo-upload-box {
    background: var(--star-bg-deep);
    border: 2px dashed var(--star-border);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 20px;
}

.photo-upload-box:hover {
    border-color: var(--star-accent);
}

.photo-placeholder {
    color: var(--star-text-dim);
}

/* 婚缘匹配上传按钮 */
.photo-upload-mini {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    background: var(--star-surface);
    border: 2px dashed var(--star-border);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.photo-upload-mini:hover {
    border-color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-placeholder span {
    font-size: 32px;
    color: var(--star-accent);
    line-height: 1;
}

.photo-placeholder p {
    font-size: 13px;
    color: var(--star-text-dim);
    text-align: center;
    margin-top: 8px;
}

.photo-preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

#photo1Preview, #photo2Preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

#photo1Preview.show, #photo2Preview.show {
    display: block;
}

#photo1Placeholder.hide, #photo2Placeholder.hide {
    display: none;
}

.bazi-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bazi-input label {
    display: block;
    color: var(--star-text-dim);
    font-size: 13px;
    margin-bottom: 6px;
}

.bazi-input input,
.bazi-input select {
    width: 100%;
    padding: 12px;
    background: var(--star-bg-deep);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-text);
    font-size: 14px;
}

.bazi-input input:focus,
.bazi-input select:focus {
    border-color: var(--star-accent);
    outline: none;
}

.btn-match-analyze {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0;
    padding: 16px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition-normal);
}

.btn-match-analyze:hover {
    transform: translateY(-3px);
    box-shadow: var(--star-glow);
}

.match-loading {
    text-align: center;
    padding: 60px 20px;
}

.match-result {
    display: none;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

.match-score-section {
    text-align: center;
    margin-bottom: 40px;
}

.match-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    background: var(--star-bg-deep);
    border: 3px solid transparent;
    border-image: var(--star-gradient) 1;
    border-radius: 50%;
}

.match-percent {
    font-size: 3rem;
    font-weight: 700;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-label {
    color: var(--star-text-dim);
    font-size: 14px;
}

.match-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.match-item {
    background: var(--star-bg-deep);
    border-radius: var(--border-radius);
    padding: 20px;
}

.match-item h4 {
    color: var(--star-accent);
    font-size: 14px;
    margin-bottom: 10px;
}

.match-item p {
    color: var(--star-text);
    font-size: 14px;
    line-height: 1.6;
}

.match-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==================== 登录/注册页 ==================== */
.auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 60px 20px;
}

.auth-card {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

.auth-title {
    font-size: 1.8rem;
    color: var(--star-text-bright);
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--star-text);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--star-bg-deep);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-text);
    font-size: 15px;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--star-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: var(--star-bg-light);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-accent);
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition-fast);
    margin-top: 10px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--star-text-dim);
    font-size: 14px;
}

.auth-switch a {
    color: var(--star-accent);
    font-weight: 500;
}

/* ==================== 充值页 ==================== */
.recharge-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.recharge-header {
    text-align: center;
    margin-bottom: 40px;
}

.recharge-header h2 {
    font-size: 2rem;
    color: var(--star-text-bright);
    margin-bottom: 12px;
}

.recharge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.package-card {
    background: var(--star-surface);
    border: 2px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.package-card:hover {
    border-color: var(--star-border-hover);
    transform: translateY(-3px);
}

.package-card.selected {
    border-color: var(--star-accent);
    background: rgba(168, 85, 247, 0.1);
}

.package-points {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.package-points span {
    font-size: 1rem;
}

.package-price {
    color: var(--star-text-dim);
    font-size: 14px;
    margin-top: 8px;
}

.package-unit {
    color: var(--star-accent);
    font-size: 13px;
    margin-top: 4px;
}

.btn-recharge {
    width: 100%;
    padding: 14px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-top: 30px;
    transition: var(--transition-fast);
}

.btn-recharge:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

/* VIP专享 */
.vip-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    margin-top: 40px;
}

.vip-badge {
    font-size: 3rem;
    margin-bottom: 16px;
}

.vip-section h3 {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.vip-section p {
    color: var(--star-text-dim);
    margin-bottom: 24px;
}

.btn-vip {
    padding: 14px 40px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: var(--border-radius-sm);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* ==================== 历史记录 ==================== */
.history-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.history-header h2 {
    font-size: 1.8rem;
    color: var(--star-text-bright);
}

.history-tabs {
    display: flex;
    gap: 8px;
}

.history-tab {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-text-dim);
    font-size: 14px;
    transition: var(--transition-fast);
}

.history-tab.active {
    background: var(--star-gradient);
    border-color: transparent;
    color: white;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-fast);
}

.history-card:hover {
    border-color: var(--star-accent);
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

.history-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--star-border);
}

.history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-type {
    font-size: 12px;
    color: var(--star-accent);
    font-weight: 500;
}

.history-score {
    font-size: 20px;
    font-weight: 700;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-location {
    font-size: 12px;
    color: var(--star-text);
}

.history-time {
    font-size: 11px;
    color: var(--star-text-dim);
}

.history-date {
    font-size: 12px;
    color: var(--star-text-dim);
}

/* 结果页时间信息 */
.result-meta {
    text-align: right;
}

.result-info {
    font-size: 12px;
    color: var(--star-text-dim);
    margin-top: 4px;
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--star-text-dim);
}

/* ==================== 管理后台 ==================== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h2 {
    font-size: 1.8rem;
    color: var(--star-text-bright);
}

.admin-tabs {
    display: flex;
    gap: 4px;
    background: var(--star-bg-deep);
    padding: 4px;
    border-radius: var(--border-radius-sm);
}

.tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--star-text-dim);
    font-size: 14px;
    transition: var(--transition-fast);
}

.tab-btn.active {
    background: var(--star-gradient);
    color: white;
}

.tab-btn:hover:not(.active) {
    color: var(--star-text);
    background: var(--star-surface-light);
}

.admin-panel {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--star-border);
}

.admin-table th {
    color: var(--star-text-dim);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table td {
    color: var(--star-text);
    font-size: 14px;
}

.admin-table tr:hover td {
    background: var(--star-surface-light);
}

/* 设置面板 */
.settings-group {
    margin-bottom: 30px;
}

.settings-group h4 {
    color: var(--star-text-bright);
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--star-border);
}

.settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.settings-row label {
    width: 120px;
    color: var(--star-text-dim);
    font-size: 14px;
}

.settings-row input,
.settings-row select {
    flex: 1;
    max-width: 300px;
    padding: 10px 14px;
    background: var(--star-bg-deep);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-text);
    font-size: 14px;
}

.btn-save {
    padding: 12px 30px;
    background: var(--star-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

/* ==================== 游客限制弹窗 ==================== */
.guest-limit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.guest-limit-modal .modal-content {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.guest-limit-modal .modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.guest-limit-modal h3 {
    font-size: 1.5rem;
    color: var(--star-text-bright);
    margin-bottom: 12px;
}

.guest-limit-modal p {
    color: var(--star-text-dim);
    margin-bottom: 24px;
}

.guest-limit-modal .modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.guest-limit-modal .modal-alt {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    color: var(--star-text-dim);
    font-size: 14px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--star-accent);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: var(--transition-fast);
}

.btn-link:hover {
    color: var(--star-accent3);
    text-decoration: underline;
}

.btn-share {
    padding: 8px 16px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-accent);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-fast);
}

.btn-share:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: var(--star-accent);
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--star-border);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--star-text-bright);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--star-text-dim);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--star-surface-light);
    color: var(--star-text);
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-body > p {
    color: var(--star-text-dim);
    margin-bottom: 20px;
}

/* ==================== 分享海报 ==================== */
.share-modal-box {
    max-width: 380px;
}

.share-poster {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.poster-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.poster-logo {
    width: 28px;
    height: 28px;
}

.poster-title {
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #A855F7, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poster-content {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.poster-photo {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(168, 85, 247, 0.5);
}

.poster-info {
    flex: 1;
    text-align: left;
}

.poster-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.poster-score-num {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #A855F7, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.poster-score-label {
    font-size: 14px;
    color: var(--star-text-dim);
}

.poster-desc {
    font-size: 12px;
    color: var(--star-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poster-footer {
    text-align: center;
    font-size: 11px;
    color: var(--star-text-dim);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-share-action {
    flex: 1;
    padding: 12px 16px;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: 10px;
    color: var(--star-text);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-share-action:hover {
    background: var(--star-surface-hover);
    border-color: var(--star-accent);
    transform: translateY(-2px);
}

.share-link {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.share-link input {
    flex: 1;
    padding: 12px;
    background: var(--star-bg-deep);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius-sm);
    color: var(--star-text);
    font-size: 13px;
}

.share-link button {
    padding: 12px 20px;
    background: var(--star-gradient);
    border: none;
    color: white;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.share-link button:hover {
    transform: translateY(-2px);
}

.share-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.btn-modal {
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-modal-primary {
    background: var(--star-gradient);
    border: none;
    color: white;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--star-glow);
}

.btn-modal-secondary {
    background: transparent;
    border: 1px solid var(--star-border);
    color: var(--star-text);
}

.btn-modal-secondary:hover {
    border-color: var(--star-accent);
    color: var(--star-accent);
}

/* ==================== Toast ==================== */
.toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 28px;
    background: var(--star-surface);
    border: 1px solid var(--star-border);
    border-radius: var(--border-radius);
    color: var(--star-text);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    pointer-events: auto;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.toast.success { border-color: #10B981; }
.toast.error { border-color: #EF4444; }
.toast.info { border-color: #3B82F6; }
.toast.warning { border-color: #F59E0B; }


/* ==================== 底部 Footer ==================== */
.main-footer {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    padding: 40px 20px 24px;
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid var(--star-border);
    backdrop-filter: blur(20px);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.6;
    background: var(--star-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-align: center;
}

.footer-logo-en {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 4px;
    opacity: 0.75;
}

.footer-slogan {
    color: var(--star-text-dim);
    font-size: 13px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

.footer-links a {
    color: var(--star-text-dim);
    font-size: 13px;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.footer-links a:hover {
    color: var(--star-accent);
}

.footer-copyright {
    color: rgba(148, 163, 184, 0.5);
    font-size: 12px;
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .header-inner {
        padding: 0 16px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .user-info {
        display: none;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        max-width: 280px;
    }
    
    /* 核心功能移动端单列 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 24px 20px;
        align-items: center;
        text-align: center;
    }

    /* 服务套餐移动端横向一行 */
    .pricing-section {
        padding: 32px 16px;
    }

    .pricing-grid {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 8px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .pricing-card {
        flex: 0 0 110px;
        width: 110px;
        padding: 10px 6px;
        scroll-snap-align: center;
        position: relative;
    }

    .pricing-card.popular {
        flex: 0 0 115px;
        width: 115px;
        transform: none;
        box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12), 0 0 20px rgba(168, 85, 247, 0.15);
    }

    .pricing-header {
        margin-bottom: 4px;
    }

    .pricing-header h3 {
        font-size: 0.75rem;
        margin-bottom: 0;
    }

    .pricing-price {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .pricing-price span {
        font-size: 0.6rem;
    }

    .pricing-features {
        display: block !important;
    }

    .pricing-features li {
        font-size: 9px;
        padding: 2px 0;
    }

    .pricing-badge {
        padding: 2px 6px;
        font-size: 8px;
        top: 4px;
        left: 4px;
        transform: none;
        border-radius: 4px;
        white-space: nowrap;
    }

    .btn-pricing {
        padding: 5px 4px;
        font-size: 9px;
    }

    /* 各区域移动端紧凑间距 */
    .features-section,
    .pricing-section,
    .howitworks-section {
        padding: 32px 20px;
    }

    .features-section .section-title,
    .pricing-section .section-title,
    .howitworks-section .section-title {
        margin-bottom: 20px;
    }

    .hero-section {
        padding: 24px 16px;
    }

    .hero-stats {
        margin-top: 24px;
        gap: 24px;
    }

    .process-steps {
        flex-direction: column;
    }

    .process-step .step-number::before {
        display: none;
    }

    /* 如何使用区域折叠 */
    .howitworks-section .section-title.collapsible {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .collapse-arrow {
        font-size: 14px;
        transition: transform 0.3s;
    }

    .howitworks-section.collapsed .collapse-arrow {
        transform: rotate(-90deg);
    }

    .howitworks-section.collapsed #howItWorksContent {
        display: none;
    }

    /* 移动端默认折叠 */
    .howitworks-section {
        overflow: hidden;
    }

    .howitworks-section.collapsed .section-title::after {
        content: '点击展开';
        font-size: 12px;
        color: var(--star-accent);
        margin-left: 8px;
    }

    .howitworks-section:not(.collapsed) .section-title::after {
        content: '点击收起';
        font-size: 12px;
        color: var(--star-accent);
        margin-left: 8px;
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
    }
    
    .result-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .score-section {
        flex-direction: column;
    }
    
    .match-form {
        grid-template-columns: 1fr;
    }
    
    .bazi-inputs {
        grid-template-columns: 1fr;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .admin-toolbar {
        flex-direction: column;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-row input,
    .settings-row select {
        max-width: 100%;
        width: 100%;
    }

    /* Footer 移动端 */
    .main-footer {
        margin-top: 40px;
        padding: 32px 16px 20px;
    }

    .footer-inner {
        gap: 16px;
    }

    .footer-logo {
        font-size: 1.05rem;
    }

    .footer-links {
        gap: 6px 14px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 11px;
        padding: 0 8px;
    }

    /* 姻缘匹配移动端 */
    .match-container {
        padding: 24px 16px;
    }

    .match-header h2 {
        font-size: 1.5rem;
    }

    .match-inputs {
        flex-direction: column;
        gap: 20px;
    }

    .match-heart {
        font-size: 1.5rem;
    }

    .match-person {
        padding: 24px 16px;
    }

    .match-person h3 {
        text-align: center;
    }

    /* AI面诊移动端 */
    .face-upload-container {
        padding: 24px 16px;
    }

    .face-header h2 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 40px 20px;
    }

    /* 表单移动端 */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group input,
    .form-group select {
        width: 100%;
    }

    /* 登录注册移动端 */
    .auth-form {
        padding: 32px 20px;
        margin: 16px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    /* 充值页移动端 */
    .recharge-container {
        padding: 24px 16px;
    }

    .recharge-header h2 {
        font-size: 1.5rem;
    }

    .recharge-packages {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .recharge-card {
        padding: 20px 12px;
    }

    .recharge-amount {
        font-size: 1.8rem;
    }

    /* VIP页移动端 */
    .vip-upsell {
        padding: 24px 16px;
    }

    .vip-upsell h3 {
        font-size: 1.3rem;
    }

    /* 历史记录移动端 */
    .history-list {
        padding: 16px;
    }

    .history-item {
        padding: 16px;
        margin-bottom: 12px;
    }

    /* 管理后台移动端 */
    .page-admin {
        padding: 16px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-table-wrapper {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    /* 移动端弹窗优化 */
    .guest-limit-modal {
        padding: 16px;
        overflow-y: auto;
    }
    
    .guest-limit-modal .modal-content {
        padding: 24px 20px;
        max-width: 100%;
        margin: auto;
    }
    
    .guest-limit-modal .modal-icon {
        font-size: 48px;
    }
    
    .guest-limit-modal h3 {
        font-size: 1.2rem;
    }
    
    .modal-overlay {
        padding: 16px;
        overflow-y: auto;
    }
    
    .modal-box {
        max-width: 100%;
        margin: auto;
    }
}

/* ==================== 动画 ==================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.8); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 使用动画的类 */
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--star-border);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    background: var(--star-gradient);
    animation: loadingProgress 1.5s ease-in-out;
}

@keyframes loadingProgress {
    0% { width: 0; }
    100% { width: 100%; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-text {
    color: var(--star-text-dim);
    font-size: 16px;
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, var(--star-bg-deep) 25%, var(--star-surface-light) 50%, var(--star-bg-deep) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
