/* ============================================================
 * 活动页样式 - activity.css
 * 科技风 v2.0 · 对标华为云/阿里云活动页
 * 主品牌蓝 (var(--brand-*)) 承载科技感与全站统一
 * 活动橙 (var(--color-accent)) 仅用于促销点睛 (CTA/价格/角标/倒计时)
 * ============================================================ */

/* ---------- 基础 ---------- */
.activity-page {
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.activity-container,
.section-container,
.activity-tabs-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(0, 82, 255, 0.25) 0%, transparent 60%),
        radial-gradient(900px 500px at 10% 110%, rgba(255, 107, 0, 0.12) 0%, transparent 55%),
        linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 45%, var(--gray-900) 100%);
}

/* 背景媒体 */
.hero-bg-video,
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
}

.hero-bg-image {
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.75) 100%);
}

/* 科技网格 + 光晕层 (替代纯色背景) */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image:
        linear-gradient(rgba(99, 153, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 153, 255, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
    animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 48px 48px, 48px 48px; }
}

/* 粒子 (精致光点) */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(99, 153, 255, 0.8), 0 0 16px rgba(0, 82, 255, 0.4);
    animation: floatUp 22s infinite ease-out;
}

.particle:nth-child(1) { left: 8%;  width: 3px; height: 3px; animation-delay: 0s; }
.particle:nth-child(2) { left: 22%; width: 4px; height: 4px; animation-delay: 3s; }
.particle:nth-child(3) { left: 37%; width: 2px; height: 2px; animation-delay: 6s; }
.particle:nth-child(4) { left: 52%; width: 4px; height: 4px; animation-delay: 9s; }
.particle:nth-child(5) { left: 68%; width: 5px; height: 5px; animation-delay: 12s; }
.particle:nth-child(6) { left: 82%; width: 3px; height: 3px; animation-delay: 15s; }
.particle:nth-child(7) { left: 14%; width: 3px; height: 3px; animation-delay: 18s; }
.particle:nth-child(8) { left: 47%; width: 2px; height: 2px; animation-delay: 21s; }
.particle:nth-child(9) { left: 74%; width: 4px; height: 4px; animation-delay: 24s; }

@keyframes floatUp {
    0%   { transform: translateY(0) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-640px) scale(1); opacity: 0; }
}

/* Hero 内容 */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--spacing-md);
}

.hero-text {
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 0, 0.14);
    border: 1px solid rgba(255, 107, 0, 0.35);
    color: #FFB37A;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(8px);
}

.hero-badge i {
    font-size: 15px;
    color: var(--color-accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--spacing-lg);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

/* 倒计时 (发光描边 + 橙色数字) */
.hero-countdown {
    display: flex;
    gap: 12px;
    margin-bottom: var(--spacing-2xl);
}

.countdown-item {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    text-align: center;
    min-width: 76px;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 12px rgba(99, 153, 255, 0.08);
    overflow: hidden;
}

.countdown-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 153, 255, 0.4), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.countdown-num {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(255, 107, 0, 0.5);
}

.countdown-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* Hero CTA 按钮 (橙色 + 光扫) */
.hero-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 38px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.45);
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.hero-cta:hover::before {
    left: 130%;
}

.hero-cta:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 107, 0, 0.55);
}

/* ---------- 活动标签栏 ---------- */
.activity-tabs {
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: var(--navbar-height);
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.activity-tabs-container {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.activity-tabs-container::-webkit-scrollbar {
    display: none;
}

.activity-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
}

.activity-tab:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(0, 82, 255, 0.1);
}

.activity-tab.active {
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 82, 255, 0.3);
}

.tab-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tab-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.activity-tab.active .tab-info h3 {
    color: #fff;
}

.tab-info p {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 2px 0 0;
}

.activity-tab.active .tab-info p {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- 产品套餐区 ---------- */
.products-section {
    padding: var(--spacing-3xl) 0;
    background:
        radial-gradient(800px 400px at 50% 0%, rgba(0, 82, 255, 0.04) 0%, transparent 70%),
        var(--color-bg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    background: var(--color-bg-accent);
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 16px;
    color: var(--color-text-secondary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    position: relative;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease-out both;
    isolation: isolate;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.16s; }
.product-card:nth-child(4) { animation-delay: 0.24s; }
.product-card:nth-child(5) { animation-delay: 0.32s; }
.product-card:nth-child(6) { animation-delay: 0.40s; }

/* hover 顶部光扫线 */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-400), var(--color-accent), var(--brand-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 3;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-200);
}

.product-card:hover::before {
    transform: scaleX(1);
}

/* 推荐标签 (橙色缎带) */
.product-featured {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
    letter-spacing: 0.02em;
}

/* 卡片头部 (蓝色渐变, 与全站产品详情统一) */
.product-header {
    position: relative;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
    background: linear-gradient(135deg, var(--brand-50) 0%, var(--color-bg-white) 100%);
    border-bottom: 1px solid var(--color-border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle, rgba(0, 82, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.product-icon {
    position: relative;
    font-size: 32px;
    flex-shrink: 0;
}

.product-name {
    position: relative;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* 卡片内容 */
.product-body {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-config {
    margin-bottom: var(--spacing-md);
}

.config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border-light);
}

.config-item:last-child {
    border-bottom: none;
}

.config-item i {
    color: var(--color-primary);
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* 价格区 */
.product-price {
    margin-top: auto;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.price-original {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.price-sale {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* 购买按钮 (橙色 + 光扫) */
.product-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    overflow: hidden;
    transition: all var(--transition-base);
    font-family: inherit;
    background: var(--color-accent);
    color: #fff;
}

.product-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.product-btn:hover::before {
    left: 130%;
}

.product-btn:hover {
    background: var(--color-accent-dark);
    box-shadow: 0 6px 18px rgba(255, 107, 0, 0.35);
}

.product-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--gray-400);
}

.product-btn:disabled::before {
    display: none;
}

/* ---------- 空状态 ---------- */
.activity-empty-state {
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-md);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(600px 300px at 50% 30%, rgba(0, 82, 255, 0.05) 0%, transparent 70%),
        var(--color-bg);
}

.activity-empty-state i {
    font-size: 64px;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    opacity: 0.7;
}

.activity-empty-state h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.activity-empty-state p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

.activity-empty-state .hero-cta {
    background: var(--color-accent);
    color: #fff;
}

/* ---------- 活动介绍区 ---------- */
.activity-intro-section {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-white);
}

.activity-intro-card {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl) calc(var(--spacing-2xl) + 16px);
    background: linear-gradient(135deg, var(--brand-50) 0%, var(--color-bg-white) 60%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.activity-intro-card::before {
    content: '';
    position: absolute;
    top: var(--spacing-2xl);
    left: 0;
    width: 4px;
    height: 48px;
    background: linear-gradient(180deg, var(--brand-500), var(--color-accent));
    border-radius: 0 4px 4px 0;
}

.activity-intro__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.activity-intro__text {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    text-align: left;
}

/* ---------- 活动规则区 ---------- */
.activity-rules-section {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-muted);
}

.activity-rules-card {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl) calc(var(--spacing-2xl) + 16px);
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.activity-rules-card::before {
    content: '';
    position: absolute;
    top: var(--spacing-2xl);
    left: 0;
    width: 4px;
    height: 48px;
    background: linear-gradient(180deg, var(--color-accent), var(--brand-500));
    border-radius: 0 4px 4px 0;
}

.activity-rules__title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.activity-rules__text {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ---------- 联系我们区 ---------- */
.activity-contact-section {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-white);
}

.activity-contact-card {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--brand-50) 0%, var(--color-bg-accent) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.activity-contact__title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.activity-contact__text {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.activity-contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
}

.activity-contact__btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 107, 0, 0.4);
}

/* ---------- Toast 通知 ---------- */
.activity-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease-out;
    max-width: 360px;
}

.activity-toast-success {
    background: var(--color-success);
}

.activity-toast-error {
    background: var(--color-danger);
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .hero-content {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .hero-text {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 420px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    /* 倒计时 2x2 网格, 避免挤一行 */
    .hero-countdown {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 320px;
    }

    .countdown-item {
        min-width: 0;
        padding: 12px;
    }

    .countdown-num {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .activity-tab {
        padding: 8px 16px;
    }

    .tab-info h3 {
        font-size: 13px;
    }

    .tab-info p {
        font-size: 11px;
    }

    .activity-intro-card,
    .activity-rules-card {
        padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) calc(var(--spacing-lg) + 12px);
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 360px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 4px 12px;
    }

    .hero-cta {
        padding: 12px 28px;
        font-size: 15px;
    }

    .countdown-num {
        font-size: 20px;
    }

    .activity-empty-state h2 {
        font-size: 24px;
    }

    .activity-empty-state p {
        font-size: 16px;
    }

    .activity-contact-card {
        padding: var(--spacing-lg);
    }
}

/* ---------- 可访问性 ---------- */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .product-card,
    .hero-bg {
        animation: none !important;
    }

    .product-card:hover,
    .hero-cta:hover {
        transform: none;
    }

    .hero-cta::before,
    .product-btn::before {
        display: none;
    }
}
