:root {
    --bg-dark: #060918;
    --card-bg: rgba(15, 23, 42, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --nav-height: 70px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background animated gradient blobs - much more visible and active movement */
body::before, body::after, .app-wrapper::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    filter: blur(140px);
    opacity: 0.22; /* Slightly higher opacity for visibility */
}

body::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8), transparent 70%);
    top: -10%;
    left: -10%;
    animation: drift-blue 20s infinite alternate ease-in-out;
}

body::after {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8), transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: drift-pink 25s infinite alternate ease-in-out;
}

@keyframes drift-blue {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25vw, 20vh) scale(1.3); }
    100% { transform: translate(-10vw, 40vh) scale(0.9); }
}

@keyframes drift-pink {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30vw, -20vh) scale(0.8); }
    100% { transform: translate(15vw, -35vh) scale(1.2); }
}

@keyframes drift-purple {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20vw, -30vh) scale(1.4); }
    100% { transform: translate(-25vw, 10vh) scale(0.95); }
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px; /* Breathing space at the bottom */
    position: relative;
    overflow: hidden; /* prevents scrollbars on blob drift */
}

.app-wrapper::before {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8), transparent 70%);
    top: 40%;
    left: 40%;
    opacity: 0.18;
    animation: drift-purple 22s infinite alternate ease-in-out;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.hero-header {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: center;
    padding: 20px 0 40px;
}

.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-title {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.1;
}

.main-title .highlight {
    color: var(--secondary);
}

.hero-desc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 36px;
    list-style: none;
    padding: 0;
    margin: 18px 0 0 0;
    line-height: 1.8;
}

.hero-desc-list li {
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.hero-desc-list li .bullet {
    color: var(--primary);
    margin-right: 8px;
    font-weight: bold;
}

.header-image img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr 340px;
    }
}

/* Step Card Styles */
.step-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
}

#step-4 {
    display: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* App Selector */
.app-selector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.current-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.app-details {
    display: flex;
    flex-direction: column;
}

.app-name {
    font-weight: 600;
}

.app-status {
    font-size: 0.75rem;
    color: var(--success);
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    color: white;
    outline: none;
}

.input-icon {
    position: absolute;
    left: 16px;
    opacity: 0.5;
}

/* Package Grid */
.package-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.package-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.package-item.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.package-item.selected::after {
    content: "✓";
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pkg-amount {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.pkg-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pkg-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-bottom-left-radius: 8px;
}

/* Payment Info Structure (Side by side) */
.payment-info-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

.qr-section {
    flex-shrink: 0;
}

.qr-wrapper {
    background: white;
    padding: 12px;
    border-radius: 16px;
    width: fit-content;
}

#qr-image {
    width: 140px;
    height: 140px;
    display: block;
}

.info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.amount-display {
    margin-bottom: 12px;
}

.amount-display .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 8px;
}

.amount-display .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}

.timer-box {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Main Button */
.btn-primary-main {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

/* Security Banner */
.security-banner {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    cursor: pointer;
}

.security-icon {
    font-size: 1.5rem;
}

.security-text {
    flex: 1;
}

.security-text strong {
    display: block;
    font-size: 0.85rem;
    color: var(--primary);
}

.security-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.security-arrow {
    opacity: 0.5;
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
}

.card-header-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.card-header-icon h3 {
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-list li {
    display: flex;
    gap: 15px;
}

.list-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-content strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.list-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.warning-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.simple-list {
    list-style: none;
    margin-bottom: 20px;
}

.simple-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.simple-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.btn-outline {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: white;
    padding: 14px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Trust Footer */
.trust-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 40px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-icon {
    font-size: 1.5rem;
}

.trust-text {
    display: flex;
    flex-direction: column;
}

.trust-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trust-value {
    font-weight: 700;
    font-size: 0.9rem;
}

.stars {
    color: var(--secondary);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.trust-divider {
    width: 1px;
    height: 40px;
    background: var(--card-border);
}

/* App Dropdown */
.app-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    z-index: 100;
    display: none;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.app-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* Bottom Nav */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    height: var(--nav-height);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--card-border);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    gap: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-label {
    font-size: 0.65rem;
}

/* Visibility Helpers */
.desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-only {
        display: block;
    }
    .trust-footer {
        display: flex;
    }
    .bottom-nav {
        display: none;
    }
    .app-wrapper {
        padding-bottom: 0;
    }
}

/* =========================================
   ANIMATIONS & DYNAMIC EFFECTS
   ========================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px) scale(1.02); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Staggered load in */
.hero-header {
    animation: fadeInUp 0.8s ease-out forwards;
}

.step-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

#step-1 {
    position: relative;
    z-index: 10;
    animation-delay: 0.1s;
}

#step-2 {
    position: relative;
    z-index: 5;
    animation-delay: 0.2s;
}

#step-3 {
    position: relative;
    z-index: 4;
    animation-delay: 0.3s;
}

#step-4 {
    position: relative;
    z-index: 3;
    /* When display changes to block via JS, animation runs */
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Floating Wallet Image */
.header-image img {
    animation: float 4s ease-in-out infinite;
}

/* Interactive Hover Effects */
.package-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.package-item:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(59, 130, 246, 0.1);
    z-index: 10;
}

.package-item.selected {
    animation: pulse-glow 2s infinite;
}

.app-selector {
    transition: all 0.3s ease;
}

.app-selector:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.input-wrapper input {
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Main Button Dynamic Effect */
.btn-primary-main {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: buttonShine 3s infinite;
}

@keyframes buttonShine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.btn-primary-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

.btn-primary-main:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Dropdown Animation */
.app-dropdown.show {
    animation: dropdownFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}



/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .app-container {
        padding: 12px;
    }
    .hero-header {
        display: flex; /* Explicitly switch from desktop grid to flex */
        padding: 20px 0;
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    .header-image {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .main-title {
        font-size: 2.1rem;
        letter-spacing: -0.5px;
    }
    .header-image img {
        width: 115px; /* Larger logo on mobile */
        margin-bottom: 0;
    }
    .hero-desc-list {
        display: inline-grid !important;
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        text-align: left !important;
        margin: 16px auto 0 !important;
    }
    .hero-desc-list li {
        justify-content: flex-start;
    }
    .step-card {
        padding: 16px;
        border-radius: 16px;
    }
    .payment-info-container {
        gap: 16px;
    }
    #qr-image {
        width: 120px;
        height: 120px;
    }
    .amount-display .value {
        font-size: 1.5rem;
    }
}

/* TikTok Info Panel Styles */
.tiktok-info-panel {
    background: rgba(251, 191, 36, 0.08); /* slight golden translucent background */
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(8px);
    margin-top: 16px;
    animation: fadeInUp 0.4s ease-out forwards;
}

.tiktok-info-panel .info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.tiktok-info-panel .info-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.tiktok-info-panel .info-details-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.tiktok-info-panel .info-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-main);
}

.tiktok-info-panel .info-bullet {
    color: var(--secondary);
    font-weight: bold;
}

.tiktok-info-panel .zalo-link {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px dashed #3b82f6;
    transition: all 0.2s ease;
}

.tiktok-info-panel .zalo-link:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Mobile Only Visibility helper */
.mobile-only {
    display: block;
    margin-bottom: 24px;
}
@media (min-width: 1024px) {
    .mobile-only {
        display: none !important;
    }
}

/* Support Notice Card (Lưu ý) */
.support-notice-card {
    background: rgba(239, 68, 68, 0.04); /* premium light translucent red warning bg */
    border: 1px dashed rgba(239, 68, 68, 0.3);
    border-radius: 24px;
    padding: 24px !important;
}

.support-notice-card .notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.support-notice-card .notice-icon {
    font-size: 1.3rem;
}

.support-notice-card .notice-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ef4444; /* vivid premium red */
    letter-spacing: 0.03em;
    margin: 0;
}

.support-notice-card .notice-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-notice-card .notice-list li {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #ffffff;
    font-weight: 500;
    position: relative;
    padding-left: 18px;
}

.support-notice-card .notice-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

/* Zalo Support Box (To & Đậm) - Perfect Vertical Stacking Layout */
.zalo-support-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.25) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15), inset 0 0 12px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.zalo-support-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 80%);
    pointer-events: none;
}

.zalo-logo-container {
    background: #0068ff; /* Zalo Official Blue */
    color: white;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 104, 255, 0.3);
    display: inline-block;
}

.zalo-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.zalo-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
}

.zalo-phone {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.1;
    transition: all 0.2s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.zalo-phone:hover {
    color: var(--secondary);
    transform: scale(1.03);
}

.btn-zalo-connect {
    background: #ffffff;
    color: #0068ff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    width: 100%;
    text-align: center;
    display: block;
}

.btn-zalo-connect:hover {
    background: var(--secondary);
    color: #060918;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
}

.btn-zalo-connect:active {
    transform: translateY(0);
}
