:root {
    --bg-color: #0d0f14;
    --bg-surface: #1a1d24;
    --bg-card: #222630;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #2e3440;

    /* Brand Colors */
    --accent-red: #ff2442;
    /* Xiaohongshu */
    --accent-blue: #00f2fe;
    /* Douyin / Tech */
    --accent-green: #00d287;
    /* Success / Profit */
    --accent-purple: #9b51e0;
    /* Trends / Magix */
    --accent-yellow: #f59e0b;
    /* Reports / Data */

    --tab-height: 60px;
    --header-height: 60px;
}

/* ==================== Splash Screen ==================== */
.splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at 30% 20%, #0d1117 0%, #070a0f 50%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.splash-screen.dismissed {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

#particleCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    animation: splashFadeIn 1s ease forwards;
}

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

.splash-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    margin-bottom: 20px;
}

.logo-glow {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(0,242,254,0.3) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 1; }
}

.splash-icon {
    font-size: 2.5rem;
    color: #00f2fe;
    filter: drop-shadow(0 0 15px rgba(0,242,254,0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
}

.splash-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: 6px;
}

.splash-title span {
    background: linear-gradient(135deg, #00f2fe, #00d287);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-subtitle {
    font-size: 0.95rem;
    color: #6b7b8d;
    margin-bottom: 32px;
    letter-spacing: 2px;
}

.splash-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.splash-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    opacity: 0;
    animation: featureSlideIn 0.6s ease forwards;
}

.splash-feature:nth-child(1) { animation-delay: 0.3s; }
.splash-feature:nth-child(2) { animation-delay: 0.5s; }
.splash-feature:nth-child(3) { animation-delay: 0.7s; }

@keyframes featureSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.splash-feature i {
    color: #00f2fe;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.splash-feature span {
    color: #c0cdd8;
    font-size: 0.9rem;
    font-weight: 500;
}

.splash-enter-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #00d287 100%);
    color: #000;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: btnAppear 0.5s ease 1s forwards;
    box-shadow: 0 0 30px rgba(0,242,254,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.splash-enter-btn:active {
    transform: scale(0.96);
}

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

.splash-version {
    font-size: 0.7rem;
    color: #3a4a5a;
    margin-top: 24px;
    letter-spacing: 1px;
    opacity: 0;
    animation: splashFadeIn 0.5s ease 1.2s forwards;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* PC Constraint Container */
.app-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    padding-bottom: calc(var(--tab-height) + 20px);
}

/* Header */
.app-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(13, 15, 20, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--accent-blue);
    font-size: 1.4rem;
}

.header-account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.points-badge {
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

/* Views */
.view-section {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Module Sections */
.module-section {
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 15px;
}

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

.section-title .subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Account Slider */
.account-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    /* Firefox */
}

.account-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.account-card {
    min-width: 140px;
    height: 90px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.add-new-btn {
    border: 1px dashed var(--text-secondary);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.add-new-btn:active {
    background: rgba(255, 255, 255, 0.05);
}

.add-new-btn i {
    font-size: 1.5rem;
}

.add-new-btn span {
    font-size: 0.8rem;
}

.crypto-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Platform Grid (6 platforms, 3 columns) */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.platform-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.platform-item:active {
    transform: scale(0.95);
}

.platform-item.bound {
    border-color: rgba(0, 210, 135, 0.3);
}

.platform-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.platform-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-status {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
}

.platform-status.unbound {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
}

.platform-status.bound-status {
    color: var(--accent-green);
    background: rgba(0, 210, 135, 0.1);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.service-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-block:active {
    transform: scale(0.97);
}

.highlight-block {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.locked {
    opacity: 0.8;
}

.block-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.xhs-red {
    color: var(--accent-red);
    background: rgba(255, 36, 66, 0.1);
}

.douyin-blue {
    color: var(--accent-blue);
    background: rgba(0, 242, 254, 0.1);
}

.neon-green {
    color: var(--accent-green);
    background: rgba(0, 210, 135, 0.1);
}

.neon-purple {
    color: var(--accent-purple);
    background: rgba(155, 81, 224, 0.1);
}

.neon-yellow {
    color: var(--accent-yellow);
    background: rgba(245, 158, 11, 0.1);
}

.neon-blue {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.rag-block {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, #1a1d24 0%, #1e2433 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.rag-block .block-icon {
    margin-bottom: 0;
}

.block-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.block-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.cost-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.free-tag {
    background: rgba(0, 210, 135, 0.15);
    color: var(--accent-green);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    /* Mobile bottom sheet style */
    justify-content: center;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-surface);
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    animation: slideUp 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

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

.form-group input {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-blue);
}

.sm-group {
    display: flex;
    gap: 10px;
}

.get-code-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 500;
}

.primary-btn {
    background: var(--accent-blue);
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
}

/* Tab Bar */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    max-width: 500px;
    width: 100%;
    height: var(--tab-height);
    background: rgba(26, 29, 36, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
}

.tab-item i {
    font-size: 1.2rem;
}

.tab-item.active {
    color: var(--accent-blue);
}

/* Illusion Delivery */
.delivery-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.illusion-container {
    background: var(--bg-color);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
    animation: scan 2s infinite ease-in-out;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.code-stream {
    text-align: left;
    font-family: monospace;
    font-size: 0.75rem;
    color: #00d287;
    height: 60px;
    overflow: hidden;
    margin-bottom: 20px;
    opacity: 0.7;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.spinner-ring {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(0, 242, 254, 0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-msg {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.progress-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    transition: width 0.3s;
}

/* Report */
.report-container {
    margin-top: 20px;
}

.report-card {
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.report-header {
    background: rgba(0, 242, 254, 0.05);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-blue);
}

.report-body {
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Paywall Banner */
.paywall-banner {
    margin-top: 15px;
    background: linear-gradient(135deg, var(--bg-card), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.paywall-icon {
    font-size: 2rem;
    color: var(--accent-yellow);
}

.paywall-text h4 {
    color: var(--accent-yellow);
    margin-bottom: 5px;
}

.paywall-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.paywall-btn {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-weight: 600;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Auth platform buttons */
.auth-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.auth-platform-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    cursor: pointer;
}

.auth-platform-btn.douyin {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-platform-btn.douyin i {
    color: #00f2fe;
}

.auth-platform-btn.xiaohongshu {
    background: #ff2442;
}

/* Invite Banner */
.invite-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0,255,163,0.06) 0%, rgba(0,212,255,0.06) 100%);
    border: 1px solid rgba(0,255,163,0.15);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.invite-banner:active {
    border-color: rgba(0,255,163,0.4);
}

.invite-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-hint {
    font-size: 0.75rem;
    color: #666;
    margin: 8px 0;
}

.test-hint a {
    text-decoration: none;
}

.test-hint label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.test-hint input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ==================== Hero Banner ==================== */
.hero-banner {
    position: relative;
    border-radius: 18px;
    padding: 28px 22px;
    margin-bottom: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f1923 0%, #0d1820 50%, #111827 100%);
    border: 1px solid rgba(0, 242, 254, 0.12);
}

.hero-glow {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 160%;
    height: 180%;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 242, 254, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(0, 210, 135, 0.06) 0%, transparent 50%);
    animation: heroGlowShift 6s ease-in-out infinite;
}

@keyframes heroGlowShift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(5%, -5%) scale(1.05); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        #00f2fe 0%,
        #00d287 30%,
        #a5f3fc 50%,
        #00d287 70%,
        #00f2fe 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerFlow 3s linear infinite;
}

@keyframes shimmerFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.hero-desc {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.9);
    letter-spacing: 1px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-orb-1 {
    width: 80px;
    height: 80px;
    top: -20px;
    right: -10px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 70%);
    animation: orbFloat1 5s ease-in-out infinite;
}

.hero-orb-2 {
    width: 50px;
    height: 50px;
    bottom: -10px;
    right: 40%;
    background: radial-gradient(circle, rgba(0, 210, 135, 0.12) 0%, transparent 70%);
    animation: orbFloat2 7s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-15px, 12px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -8px); }
}

/* ==================== Stagger Entrance Animation ==================== */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.5s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.12s; }
.stagger-item:nth-child(3) { animation-delay: 0.19s; }
.stagger-item:nth-child(4) { animation-delay: 0.26s; }
.stagger-item:nth-child(5) { animation-delay: 0.33s; }
.stagger-item:nth-child(6) { animation-delay: 0.40s; }
.stagger-item:nth-child(7) { animation-delay: 0.47s; }

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover glow for active blocks */
.service-block.highlight-block::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.service-block.highlight-block:hover::after,
.service-block.highlight-block:active::after {
    opacity: 1;
}