* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00e5ff;
    --primary-dim: #00a4b8;
    --accent: #7c4dff;
    --bg-dark: #0a0e17;
    --bg-card: rgba(14, 20, 33, 0.88);
    --border: rgba(0, 229, 255, 0.15);
    --text: #e0e6ed;
    --text-dim: #7a8ba0;
    --success: #00e676;
    --warning: #ffab00;
    --danger: #ff5252;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.bg-glow {
    position: fixed;
    top: 30%;
    left: 50%;
    width: 700px;
    height: 700px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, rgba(124, 77, 255, 0.03) 40%, transparent 70%);
    pointer-events: none;
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    padding: 24px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
}

.header-badge {
    display: inline-block;
    padding: 6px 18px;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    background: rgba(0, 229, 255, 0.06);
    margin-bottom: 16px;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }
}

.title {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Main Card */
.main-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(16px);
    box-shadow:
        0 0 60px rgba(0, 229, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Promo Section */
.promo-section {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.02);
    border: 1px solid rgba(0, 229, 255, 0.06);
    transition: all 0.3s ease;
}

.promo-item:hover {
    border-color: rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.05);
    transform: translateX(4px);
}

.promo-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 229, 255, 0.08);
    color: var(--primary);
}

.promo-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.promo-text p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Steps Section */
.steps-section {
    margin-bottom: 32px;
    padding: 28px 24px;
    border-radius: 14px;
    background: rgba(124, 77, 255, 0.03);
    border: 1px solid rgba(124, 77, 255, 0.1);
}

.steps-title {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-align: center;
}

.step-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(124, 77, 255, 0.15);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(124, 77, 255, 0.3);
    margin-top: 2px;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 12px;
}

.step-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.step-button:hover {
    background: rgba(124, 77, 255, 0.15);
    border-color: rgba(124, 77, 255, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.2);
}

.step-button:active {
    transform: translateY(0);
}

.step-divider {
    width: 2px;
    height: 20px;
    background: rgba(124, 77, 255, 0.15);
    margin: 8px 0 8px 15px;
    border-radius: 1px;
}

/* QR Modal */
.qr-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.qr-modal-overlay.active {
    display: flex;
}

.qr-modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.08);
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.6rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.qr-modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.qr-modal h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.qr-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    margin-bottom: 16px;
}

.qr-modal p {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Visitor Count Section */
.visitor-section {
    margin-bottom: 32px;
}

.visitor-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 12px;
    background: rgba(0, 230, 118, 0.03);
    border: 1px solid rgba(0, 230, 118, 0.12);
}

.visitor-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 230, 118, 0.08);
    color: var(--success);
}

.visitor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visitor-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.visitor-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--success);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.visitor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 4px rgba(0, 230, 118, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(0, 230, 118, 0.6); }
}

/* Progress Section */
.progress-section {
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.progress-title {
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    font-weight: 500;
}

.progress-stats {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.progress-stats #remainDollars {
    color: var(--success);
}

.progress-track {
    position: relative;
}

.progress-track > .progress-bar {
    height: 24px;
    background: rgba(0, 229, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.1);
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--success), #69f0ae);
    border-radius: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar .progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    border-radius: 12px;
    background: linear-gradient(90deg, transparent 70%, rgba(255, 255, 255, 0.25));
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
}

.progress-hint {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* Status colors */
.loading {
    animation: fadeInOut 1s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 520px) {
    .container {
        padding: 16px;
    }

    .title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .main-card {
        padding: 24px 18px;
    }

    .promo-item {
        padding: 14px 16px;
    }

    .steps-section {
        padding: 20px 16px;
    }

    .step-content h4 {
        font-size: 0.88rem;
    }

    .qr-image {
        width: 180px;
        height: 180px;
    }
}
