/* CSS Variables exactly matching V1 "Royal Indus" Palette */
:root {
    --bg-color: #05070A; 
    --bg-secondary: #0F1626; /* Deep navy from V1 */
    --accent-gold: #D4AF37;
    --accent-gold-dark: #B38E22;
    
    --card-bg: #121A2A; /* Solid dark card from V1 */
    --card-border: rgba(255, 255, 255, 0.05); 
    --text-primary: #FFFFFF;
    --text-muted: #808B9F; /* Grey subtext from V1 */
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    /* Richer background: Multiple gradients and subtle glows */
    background-image: 
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(15, 22, 38, 1) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100dvh; /* Graceful fallback: take full screen but allow scrolling if needed */
    overflow-x: hidden;
    overflow-y: auto; /* Re-enable vertical scrolling for short screens */
    -webkit-overflow-scrolling: touch; /* Native momentum scrolling on iOS Safari */
    display: flex;
    justify-content: center;
    position: relative;
}

/* Add a subtle dotted matrix overlay for a rich vault aesthetic */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
    pointer-events: none;
}

/* Base mobile container */
.app-container {
    width: 100%;
    max-width: 480px; 
    min-height: 100dvh; /* Expand if needed, fill otherwise */
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 4vh, 40px) 20px 10px 20px; 
    position: relative;
    z-index: 2;
}

/* Slogan Area */
.hero-section {
    position: relative; 
    text-align: center;
    margin-top: auto; /* Push down from the absolute top */
    margin-bottom: clamp(10px, 2.5vh, 20px); /* Reduce distance to the product list for tighter cohesion */
    opacity: 0;
    animation: fadeDown 0.6s ease forwards;
    flex-shrink: 0;
}

/* Aviator Plane Decoration */
.aviator-decal {
    position: absolute;
    top: -25px;
    right: -25px;
    width: clamp(100px, 28vw, 150px);
    z-index: 10;
    pointer-events: none;
    transform: rotate(-15deg);
    animation: floatPlane 4s infinite ease-in-out alternate;
}

.aviator-decal img {
    width: 100%;
    height: auto;
    /* 已按要求移除所有发光和投影效果，只保留基础的浮空动画 */
}

.slogan {
    font-family: var(--font-heading);
    font-size: clamp(26px, 7vw, 34px); /* 大幅调大主标题字号 */
    font-weight: 900;
    font-style: italic;
    line-height: 1.1;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.sub-slogan {
    font-size: clamp(12px, 3.2vw, 15px); /* 同步调大副标题字号 */
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    padding: 0 10px;
}

/* Product List - Single Screen fit */
.product-list {
    counter-reset: rank_counter; /* Initialize ranking counter */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Gather elements towards the middle */
    gap: clamp(6px, 1.3vh, 12px); /* Tight gaps */
    width: 100%;
    margin-bottom: auto; /* Push up from the absolute bottom, centering the whole cluster with the header */
}

/* Card Wrapper */
.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
}

/* Solid Flat Panels */
.card-glass-panel {
    position: relative; /* Anchor for gift badge and rank number */
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: clamp(12px, 2.5vh, 18px) 16px; 
    display: flex;
    align-items: center;
    justify-content: space-between; /* Horizontal spacing for horizontal layout */
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

/* Rank Number Badge attached to top-left of panel */
.card-glass-panel::before {
    counter-increment: rank_counter;
    content: "0" counter(rank_counter); /* renders 01, 02, etc. */
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(212, 175, 55, 0.12); /* Subtle luxurious gold tint */
    color: var(--accent-gold);
    font-size: 10px;
    font-weight: 900;
    font-family: var(--font-heading);
    padding: 3px 6px;
    border-bottom-right-radius: 8px; /* Tucks smoothly into the corner design */
    border-top-left-radius: 11px; /* Matches outer border-radius minus 1px for flush fit */
    z-index: 5;
    letter-spacing: 0.5px;
}

.card-glass-panel:active {
    transform: scale(0.98);
    background: #172135;
}

/* Horizontal Logo Design */
.horizontal-logo {
    height: clamp(35px, 6vh, 45px); /* Responsive height */
    width: auto;
    max-width: 55%; /* Keep bounded within the left side */
    object-fit: contain;
    background-color: transparent;
}

/* Download Button & CTA matches V1 */
.download-action {
    position: relative; /* For absolutely positioned gift badge */
    display: flex;
    align-items: center;
}

.dl-btn {
    background: linear-gradient(180deg, #E6C875 0%, var(--accent-gold) 100%);
    border: none;
    color: #000000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11px;
    padding: 10px 18px; /* Slightly thicker */
    border-radius: 6px; 
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.dl-btn:active {
    background: var(--accent-gold-dark);
}

/* Gift Badge & Breath Animation */
.gift-badge {
    position: absolute;
    top: -14px;
    right: -10px;
    font-size: 20px;
    z-index: 10;
    animation: gentleGlow 2.5s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.4));
    pointer-events: none; /* Let clicks pass through to the button */
}

/* Trust footer */
.footer-trust {
    text-align: center;
    font-family: var(--font-body);
    font-size: 9px;
    color: rgba(255,255,255,0.2);
    margin-top: clamp(10px, 2vh, 20px);
    letter-spacing: 1px;
}
.trust-shield {
    color: var(--accent-gold);
    opacity: 0.5;
}

/* Animations */
@keyframes fadeDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes listPop {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes gentleGlow {
    0% { transform: scale(0.95) rotate(-3deg); filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2)); }
    100% { transform: scale(1.1) rotate(5deg); filter: drop-shadow(0 0 12px rgba(255, 230, 80, 0.8)); }
}

@keyframes floatPlane {
    0% { transform: translateY(0px) rotate(-15deg); }
    100% { transform: translateY(-15px) rotate(-8deg); }
}
