:root {
    --bg-color: #0b0e11;
    --card-bg: rgba(30, 35, 41, 0.7);
    --primary-yellow: #FCD535;
    --primary-yellow-glow: rgba(252, 213, 53, 0.4);
    --text-primary: #EAECEF;
    --text-secondary: #848E9C;
    --hover-bg: rgba(43, 49, 57, 0.9);
    --border-color: rgba(252, 213, 53, 0.15);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    /* 新增变量 */
    --glow-color: rgba(252, 213, 53, 0.06);
    --glow-color-light: rgba(252, 213, 53, 0.04);
    --card-gradient-border: linear-gradient(135deg, rgba(252, 213, 53, 0.3), transparent 50%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(165deg, #12151a 0%, #0b0e11 50%, #0d1015 100%);
    color: var(--text-primary);
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 简洁的顶部光晕 */
body::before {
    content: "";
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(252, 213, 53, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    padding: 2vh 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 4vh;
    text-align: center;
    animation: fadeInDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.8vh;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFFFFF 30%, #FCD535 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.highlight {
    color: var(--primary-yellow);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(252, 213, 53, 0.3);
}

/* Promo Banner */
.promo-banner {
    background: rgba(252, 213, 53, 0.08);
    border: 1px solid rgba(252, 213, 53, 0.25);
    border-radius: 50px;
    padding: 10px 24px;
    margin-bottom: 4vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.promo-banner:hover {
    background: rgba(252, 213, 53, 0.15);
    border-color: rgba(252, 213, 53, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 213, 53, 0.15);
}

.promo-text {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* 倒计时样式 */
.countdown {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 10px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-yellow);
}

.countdown-sep {
    opacity: 0.6;
    margin: 0 1px;
}

.countdown-ms {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Cards Container */
.cards-wrapper {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards;
}

/* Individual Card */
.card {
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                linear-gradient(135deg, rgba(252, 213, 53, 0.2), transparent 50%) border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 32px 24px;
    flex: 1 1 300px;
    max-width: 340px;

    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    /* 性能优化 */
    will-change: transform;
    contain: layout style;
}

/* 卡片光束扫描效果 */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(252, 213, 53, 0.08), transparent);
    transform: skewX(-25deg);
    transition: left 0.8s ease;
    pointer-events: none;
}

.card:hover::before {
    left: 150%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(43, 49, 57, 0.9);
    border-color: rgba(252, 213, 53, 0.3);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.6), 0 0 20px rgba(252, 213, 53, 0.1);
    z-index: 10;
}

.card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    background: rgba(252, 213, 53, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-yellow);
    transition: all 0.4s ease;
    border: 1px solid rgba(252, 213, 53, 0.1);
    position: relative;
}

.card-icon img {
    filter: invert(83%) sepia(45%) saturate(1000%) hue-rotate(358deg) brightness(103%) contrast(97%);
    transition: filter 0.4s ease;
}

.card:hover .card-icon img {
    filter: invert(10%) sepia(10%) saturate(100%) hue-rotate(180deg) brightness(20%) contrast(100%);
}

/* 图标脉冲光环效果 */
.card-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: transparent;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    transition: all 0.4s ease;
}

.card:hover .card-icon::before {
    animation: iconPulse 1.5s ease-out infinite;
}

@keyframes iconPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
        box-shadow: 0 0 0 0 var(--primary-yellow-glow);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        box-shadow: 0 0 0 15px transparent;
    }
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    background: var(--primary-yellow);
    color: #1e2329;
    box-shadow: 0 0 25px var(--primary-yellow-glow);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
    font-size: 0.9rem;
    flex-grow: 1;
}

.tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tag.green {
    background: rgba(14, 203, 129, 0.15);
    color: #0ECB81;
    border: 1px solid rgba(14, 203, 129, 0.2);
}

.tag.red {
    background: rgba(246, 70, 93, 0.15);
    color: #F6465D;
    border: 1px solid rgba(246, 70, 93, 0.2);
}

.tag.yellow {
    background: rgba(252, 213, 53, 0.15);
    color: #FCD535;
    border: 1px solid rgba(252, 213, 53, 0.2);
}

/* Featured Card Style (for Android APK) */
.featured-card {
    border: 1px solid var(--primary-yellow);
    box-shadow: 0 0 30px rgba(252, 213, 53, 0.15);
    overflow: visible;
}

.featured-card::after {
    content: '📱 推荐下载';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-yellow);
    color: #1e2329;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.btn-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

/* 箭头按钮旋转光环 */
.btn-arrow::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--primary-yellow), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-arrow::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.btn-arrow svg {
    position: relative;
    z-index: 1;
}

.card:hover .btn-arrow::before {
    opacity: 1;
    animation: spinGlow 2s linear infinite;
}

@keyframes spinGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.card:hover .btn-arrow {
    background: var(--primary-yellow);
    color: #1e2329;
    transform: translateX(6px);
}

.card:hover .btn-arrow::after {
    background: var(--primary-yellow);
}

footer {
    margin-top: 5vh;
    color: rgba(132, 142, 156, 0.6);
    font-size: 0.8rem;
    animation: fadeIn 1.2s ease-out 0.5s backwards;
    flex-shrink: 0;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 卡片交错入场动画 */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card {
    opacity: 0;
    animation: cardEnter 0.6s ease forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

/* 触摸反馈 */
.card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(252, 213, 53, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-bar {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-yellow), #F0B90B);
    border-radius: 3px;
    animation: loadProgress 0.8s ease-out forwards;
}

@keyframes loadProgress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Mobile Responsive - Strictly Single Screen Optimized */
@media (max-width: 768px) {
    body {
        height: 100vh;
        overflow: hidden;
        /* Force no scroll by default */
    }

    .container {
        padding: 10px 12px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-bottom: 12px;
    }

    header {
        margin-top: 1vh;
        margin-bottom: 1vh;
        flex-shrink: 0;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .promo-banner {
        width: 100%;
        padding: 8px 12px;
        margin-bottom: 1.5vh;
        min-height: auto;
        flex-shrink: 0;
        border-radius: 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .promo-text {
        font-size: 0.8rem;
        white-space: normal;
        text-align: center;
    }

    .promo-icon {
        font-size: 0.9rem;
    }

    /* 移动端倒计时样式 */
    .countdown {
        padding: 3px 8px;
        margin-left: 0;
        font-size: 0.85rem;
    }

    .countdown-ms {
        font-size: 0.75rem;
    }

    .cards-wrapper {
        display: flex;
        flex-direction: column;
        gap: 8px;
        /* Tight gap */
        width: 100%;
        flex: 1;
        /* Take remaining height */
        min-height: 0;
        /* Allow flex shrinking */
        justify-content: space-evenly;
        /* Distribute cards ensuring all are visible */
        margin-bottom: 1vh;
    }

    .card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 16px;
        flex: 1;
        /* Equal height contribution */
        max-height: 18vh;
        /* Cap height to ensure no single card dominates */
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        border-radius: 14px;
        min-height: 0;
        overflow: hidden;
    }

    .card:hover {
        transform: none;
    }

    .card:active {
        transform: scale(0.98);
    }

    /* 移动端禁用光束扫描 */
    .card::before {
        display: none;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 0;
        margin-right: 14px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .card-icon svg {
        width: 22px;
        height: 22px;
    }

    .card-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }

    .featured-card {
        position: relative;
        border-width: 1px;
        overflow: visible;
        margin-top: 14px;
    }

    .featured-card::after {
        top: -12px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        font-size: 0.7rem;
        padding: 3px 10px;
        border-radius: 10px;
        position: absolute;
        white-space: nowrap;
    }

    .card h2 {
        font-size: 1.1rem;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .card p {
        font-size: 0.85rem;
        margin-bottom: 0;
        line-height: 1.3;
        color: rgba(132, 142, 156, 0.8);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tag {
        display: none;
    }

    .btn-arrow {
        width: 28px;
        height: 28px;
        margin-top: 0;
        margin-left: 10px;
        background: rgba(255, 255, 255, 0.03);
        flex-shrink: 0;
    }

    .btn-arrow svg {
        width: 14px;
        height: 14px;
    }

    footer {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 0.65rem;
        flex-shrink: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
}