/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 深色主题（默认）===== */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #050810;
    --bg-gradient-start: #050810;
    --bg-gradient-end: #0a0e27;

    --primary-blue: #00d4ff;
    --primary-purple: #a855f7;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-heading: #ffffff;

    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-border: rgba(0, 212, 255, 0.3);

    --border-glow: rgba(0, 212, 255, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.3);

    --modal-bg: #0a0e27;
    --modal-backdrop: rgba(0, 0, 0, 0.8);

    --header-bg: rgba(10, 14, 39, 0.8);
    --header-border: rgba(0, 212, 255, 0.1);

    --grid-color: rgba(0, 212, 255, 0.03);

    --button-gradient-start: var(--primary-blue);
    --button-gradient-end: var(--primary-purple);
}

/* ===== 明亮主题 ===== */
html.theme-light {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e5e9f0;
    --bg-gradient-start: #e0e7ff;
    --bg-gradient-end: #f3e8ff;

    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-heading: #111827;

    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(59, 130, 246, 0.2);
    --card-hover-border: rgba(59, 130, 246, 0.6);

    --border-glow: rgba(59, 130, 246, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.1);

    --modal-bg: #ffffff;
    --modal-backdrop: rgba(0, 0, 0, 0.5);

    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(59, 130, 246, 0.2);

    --grid-color: rgba(59, 130, 246, 0.05);

    --button-gradient-start: var(--primary-blue);
    --button-gradient-end: var(--primary-purple);
}

/* 主题切换过渡动画 */
body,
header,
.product-card,
.feature-card,
.price-card,
.modal-content,
.btn,
.hero-btn,
.buy-btn,
.activation-code,
.mobile-warning {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景网格效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 头部导航 */
header {
    padding: 20px 0;
    backdrop-filter: blur(10px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 30px;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary-blue);
}

/* Hero 区域 */
.hero {
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-heading), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--border-glow);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--border-glow);
}

/* 产品卡片容器 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding: 60px 0;
}

/* 玻璃拟物卡片 */
.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--border-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow:
        0 0 40px var(--border-glow),
        0 20px 40px var(--shadow-color);
}

.product-card.purple {
    border-color: var(--card-hover-border);
}

.product-card.purple::before {
    background: radial-gradient(circle at top right, var(--card-hover-border), transparent 70%);
}

.product-card.purple:hover {
    border-color: var(--primary-purple);
    box-shadow:
        0 0 40px var(--border-glow),
        0 20px 40px var(--shadow-color);
}

.product-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.product-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--border-glow);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 价格卡片 */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 60px 0;
}

.pricing-grid .price-card {
    width: calc(25% - 15px);
    min-width: 250px;
}

.price-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.price-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px var(--border-glow);
}

.price-card h4 {
    font-size: 24px;
    margin-bottom: 10px;
}

.price-card .price {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 20px 0;
}

.price-card .duration {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.price-card .desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 40px;
}

.buy-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--border-glow);
}

.buy-btn:hover {
    box-shadow: 0 0 25px var(--border-glow);
    transform: translateY(-2px);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-backdrop);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--modal-bg);
    margin: 10% auto;
    padding: 40px;
    border: 1px solid var(--primary-blue);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 50px var(--border-glow);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-blue);
}

.modal h3 {
    margin-bottom: 20px;
    text-align: center;
}

.qrcode-container {
    text-align: center;
    margin: 30px 0;
}

.qrcode-container img {
    max-width: 250px;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
}

.payment-tip {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 20px;
}

.activation-code {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--primary-blue);
    margin: 20px 0;
    text-align: center;
}

.activation-code .code {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 15px 0;
    letter-spacing: 2px;
    font-family: monospace;
}

.copy-btn {
    padding: 10px 30px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-purple);
    box-shadow: 0 0 20px var(--border-glow);
}

/* 移动端提示页面 */
.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.mobile-warning-content {
    max-width: 500px;
}

.mobile-warning-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.mobile-warning-content p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--border-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* 视频模态框 */
.video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.video-modal-content {
    position: relative;
    margin: 80px auto 2% auto;
    width: 80%;
    max-width: 1400px;
    max-height: 90vh; /* 限制最大高度为视窗的90% */
    display: flex;
    flex-direction: column;
    text-align: center;
}

.video-close {
    position: absolute;
    top: -50px;
    right: 10px;
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.video-close:hover {
    color: var(--primary-blue);
    transform: scale(1.2);
}

.video-fullscreen {
    position: absolute;
    top: -50px;
    right: 70px;
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.video-fullscreen:hover {
    color: var(--primary-blue);
    transform: scale(1.2);
}

.video-container {
    position: relative;
    width: 100%;
    max-height: calc(90vh - 150px); /* 视窗高度减去按钮和边距的空间 */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid var(--primary-blue); /* 边框移到容器上 */
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    background: #000;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 154px); /* 容器最大高度减去边框 */
    display: block;
    object-fit: cover; /* 改为 cover 确保填满容器 */
}

.video-controls {
    position: relative;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.video-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--border-glow);
}

.video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--border-glow);
}

.video-btn:active {
    transform: translateY(0);
}

/* ===== 主题切换按钮样式 ===== */
/* 隐藏 checkbox */
.theme-toggle-checkbox {
    display: none;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-blue);
    box-shadow: 0 0 20px var(--border-glow);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-blue);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.theme-toggle svg path {
    fill: var(--primary-blue);
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}

/* 主题切换提示 */
.theme-toggle-tooltip {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover .theme-toggle-tooltip {
    opacity: 1;
}

/* 控制图标显示 - 默认显示太阳图标（深色模式） */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

/* 当 checkbox 被选中时，显示月亮图标（浅色模式） */
.theme-toggle-checkbox:checked ~ .theme-toggle .theme-icon-sun {
    display: none;
}

.theme-toggle-checkbox:checked ~ .theme-toggle .theme-icon-moon {
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    /* 主题切换按钮移动端调整 */
    .theme-toggle {
        width: 45px;
        height: 45px;
        top: 15px;
        left: 15px;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    .theme-toggle-tooltip {
        display: none; /* 移动端隐藏提示 */
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid .price-card {
        width: calc(50% - 10px);
        min-width: 200px;
    }

    .hero h1 {
        font-size: 36px;
    }

    /* 视频响应式 */
    .video-modal-content {
        margin: 60px auto 5% auto;
        width: 95%;
        max-width: 100%;
        max-height: 95vh;
    }

    .video-close {
        top: -45px;
        right: 5px;
        font-size: 40px;
    }

    .video-fullscreen {
        top: -45px;
        right: 55px;
        font-size: 40px;
    }

    .video-container {
        max-height: calc(95vh - 120px);
    }

    .video-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .video-controls {
        gap: 10px;
        margin-top: 20px;
    }
}
