:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --text: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #dc2626;
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light) {
        --primary: #818cf8;
        --primary-hover: #6366f1;
        --bg: #0f172a;
        --bg-secondary: #1e293b;
        --text: #f1f5f9;
        --text-secondary: #94a3b8;
        --border: #334155;
    }
}

html.dark {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Nav */
nav {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 50;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
nav .logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; }
nav .nav-links { display: flex; gap: 1.5rem; align-items: center; }
nav .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
nav .nav-links a:hover { color: var(--primary); }
nav .nav-icon { display: inline-flex; align-items: center; padding: 0.35rem; border-radius: 6px; transition: background 0.2s, color 0.2s; }
nav .nav-icon:hover { background: var(--bg-secondary); color: var(--primary); }

.btn-icon { background: none; border: none; cursor: pointer; padding: 0.3rem; border-radius: 6px; display: inline-flex; align-items: center; transition: background 0.2s; }
.btn-icon:hover { background: var(--bg-secondary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
input[type="color"] { height: 40px; padding: 2px; cursor: pointer; }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Generator */
.generator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}
.generator-form { display: flex; flex-direction: column; gap: 0.5rem; }
.generator-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.generator-preview img {
    max-width: 320px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.color-row { display: flex; gap: 1rem; }
.color-row .form-group { flex: 1; }
.shape-options { display: flex; gap: 0.5rem; }
.shape-options button {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.shape-options button.active { border-color: var(--primary); background: var(--primary); color: white; }

/* QR Grid */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.qr-card { text-align: center; }
.qr-card img { width: 180px; height: 180px; margin-bottom: 0.75rem; border-radius: 8px; }
.qr-card .meta { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.qr-card .actions { display: flex; gap: 0.5rem; justify-content: center; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 700px; margin: 0 auto; }
.pricing-grid-3 { grid-template-columns: 1fr 1.1fr 1fr; max-width: 1100px; gap: 1.5rem; }
.pricing-card { text-align: center; padding: 2rem; position: relative; }
.pricing-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.pricing-card ul { list-style: none; margin-bottom: 1.5rem; }
.pricing-card li { padding: 0.4rem 0; color: var(--text-secondary); }
.pricing-card li::before { content: "\2713 "; color: var(--success); font-weight: bold; }
.pricing-card.featured { border-color: var(--primary); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; font-size: 0.75rem; font-weight: 700; padding: 0.3rem 1rem; border-radius: 20px; letter-spacing: 0.05em; }
.pricing-card-unlimited { border: 2px solid #d4a017; }
.pricing-card-unlimited .price { color: #d4a017; }
.pricing-feature-group { text-align: left; margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: rgba(99,102,241,0.05); }
.pricing-feature-group strong { font-size: 0.85rem; color: var(--primary); }
.pricing-feature-group p { font-size: 0.8rem; color: var(--text-secondary); margin: 0.2rem 0 0; }
.upgrade-banner { background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08)); border: 1px solid var(--primary); border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.upgrade-banner h4 { color: var(--primary); font-size: 1rem; margin-bottom: 0.5rem; }
.upgrade-banner p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.limit-counter { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.limit-counter.at-limit { color: #dc2626; }

/* Auth */
.auth-container { max-width: 400px; margin: 3rem auto; }
.auth-container h2 { text-align: center; margin-bottom: 1.5rem; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Analytics */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { text-align: center; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 0.85rem; color: var(--text-secondary); }
.chart-container { margin-bottom: 2rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    z-index: 100;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast-success { background: #059669; color: white; }
.toast-error { background: #dc2626; color: white; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin-top: 4rem; }

/* Hamburger */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--text);
}
.hamburger-btn svg { display: block; }

/* Dark mode toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover { background: var(--bg-secondary); color: var(--primary); }

/* Confirm modal */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
    animation: fadeIn 0.15s ease;
}
.confirm-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.confirm-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.confirm-box p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.25rem; line-height: 1.5; }
.confirm-box .confirm-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Type badge */
.type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.type-badge-url { background: #ede9fe; color: #6d28d9; }
.type-badge-text { background: #fef3c7; color: #92400e; }
.type-badge-wifi { background: #d1fae5; color: #065f46; }
.type-badge-vcard { background: #dbeafe; color: #1e40af; }
.type-badge-email { background: #fce7f3; color: #9d174d; }
html.dark .type-badge-url { background: #4c1d95; color: #c4b5fd; }
html.dark .type-badge-text { background: #78350f; color: #fde68a; }
html.dark .type-badge-wifi { background: #064e3b; color: #6ee7b7; }
html.dark .type-badge-vcard { background: #1e3a5f; color: #93c5fd; }
html.dark .type-badge-email { background: #831843; color: #f9a8d4; }
@media (prefers-color-scheme: dark) {
    :root:not(.light) .type-badge-url { background: #4c1d95; color: #c4b5fd; }
    :root:not(.light) .type-badge-text { background: #78350f; color: #fde68a; }
    :root:not(.light) .type-badge-wifi { background: #064e3b; color: #6ee7b7; }
    :root:not(.light) .type-badge-vcard { background: #1e3a5f; color: #93c5fd; }
    :root:not(.light) .type-badge-email { background: #831843; color: #f9a8d4; }
}

/* Progress bar for analytics */
.progress-bar-sm {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
}
.progress-bar-sm .bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Focus visible */
.btn:focus-visible,
.nav-icon:focus-visible,
.theme-toggle:focus-visible,
.hamburger-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 2rem 0 1rem; }
    .generator { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-grid-3 { grid-template-columns: 1fr; }
    .hamburger-btn { display: block; }
    nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 51;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    nav .nav-links.open { display: flex; }
    nav .nav-links a { font-size: 0.9rem; }
    .container { padding: 0 1rem; }
    .qr-grid { grid-template-columns: 1fr; }
    .download-row { flex-wrap: wrap; }
    .short-url-box { font-size: 0.75rem; }
    .auth-container { margin: 1.5rem auto; padding: 0 0.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .color-row { flex-direction: column; gap: 0; }
    .qr-type-tabs { gap: 0.3rem; }
    .qr-type-tab { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
    .analytics-charts-grid { grid-template-columns: 1fr !important; }
}

/* Short URL box */
.short-url-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Presets */
.preset-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.preset-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.preset-btn:hover, .preset-btn.active { border-color: var(--primary); transform: scale(1.15); }

/* QR type tabs */
.qr-type-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.qr-type-tab {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}
.qr-type-tab.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}
.qr-type-tab:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Download buttons */
.download-row { display: flex; gap: 0.5rem; justify-content: center; }

/* Section titles */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

/* Loading */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== LANDING PAGE ===== */

.btn-lg { padding: 0.9rem 2rem; font-size: 1.1rem; }

/* Social Proof */
.landing-social-proof {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
}
.landing-proof-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
}
.landing-proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.landing-proof-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.landing-proof-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Steps */
.landing-steps { padding: 4rem 0; }
.landing-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.landing-section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}
.landing-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
.landing-step { text-align: center; padding: 2rem 1.5rem; }
.landing-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.landing-step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.landing-step p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* Pricing Table */
.landing-pricing { padding: 4rem 0; }
.landing-pricing-table {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.landing-pricing-header,
.landing-pricing-row,
.landing-pricing-footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
}
.landing-pricing-header {
    background: var(--bg-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--border);
}
.landing-pricing-header > div,
.landing-pricing-row > div,
.landing-pricing-footer > div {
    padding: 0.85rem 1.2rem;
}
.landing-pricing-row { border-bottom: 1px solid var(--border); }
.landing-pricing-row:last-child { border-bottom: none; }
.landing-pricing-feature-col { font-weight: 600; font-size: 0.9rem; }
.landing-pricing-plan-col { text-align: center; font-size: 0.9rem; }
.landing-pricing-free-val { color: var(--text-secondary); font-size: 0.9rem; }
.landing-pricing-pro-val { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.landing-pricing-pro { background: rgba(99, 102, 241, 0.05); }
.landing-pricing-footer {
    border-top: 2px solid var(--border);
    padding: 1rem 0;
}
.landing-pricing-footer > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.landing-pricing-save { font-size: 0.75rem; color: var(--success); font-weight: 600; }

/* Use Cases */
.landing-usecases { padding: 4rem 0; }
.landing-usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.landing-usecase-card { text-align: center; padding: 2rem 1.5rem; }
.landing-usecase-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.landing-usecase-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.landing-usecase-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }

/* Newsletter */
.landing-newsletter { padding: 3rem 0; }

/* Final CTA */
.landing-final-cta {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 4rem 0;
}
.landing-final-cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.landing-final-cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }
.landing-final-btn {
    background: white !important;
    color: var(--primary) !important;
    font-weight: 700;
}
.landing-final-btn:hover { opacity: 0.9; transform: translateY(-2px); }

/* Landing Responsive */
@media (max-width: 768px) {
    .landing-steps-grid { grid-template-columns: 1fr; }
    .landing-usecases-grid { grid-template-columns: 1fr; }
    .landing-proof-grid { gap: 2rem; flex-wrap: wrap; }
    .landing-section-title { font-size: 1.6rem; }
    .landing-pricing-header > div,
    .landing-pricing-row > div,
    .landing-pricing-footer > div { padding: 0.6rem 0.7rem; font-size: 0.8rem; }
    .account-grid { grid-template-columns: 1fr; }
}

/* ===== ACCOUNT PAGE ===== */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
}
.account-info { display: flex; flex-direction: column; gap: 0; }
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.account-row:last-child { border-bottom: none; }
.account-label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.account-value { font-size: 0.9rem; font-weight: 600; }
.account-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.account-badge-free { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }
.account-badge-pro { background: var(--primary); color: white; }
.account-badge-unlimited { background: #d4a017; color: white; }

/* Dark mode adjustments for new components */
html.dark .pricing-card-unlimited { border-color: #e6b422; }
html.dark .pricing-card-unlimited .price { color: #e6b422; }
html.dark .pricing-feature-group { background: rgba(99,102,241,0.12); }
html.dark .upgrade-banner { background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15)); }
html.dark .account-badge-unlimited { background: #e6b422; }
.account-plan-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.account-perks { list-style: none; margin: 0.75rem 0; }
.account-perks li { padding: 0.3rem 0; font-size: 0.85rem; color: var(--text-secondary); }
.account-perks li::before { content: "\2713 "; color: var(--success); font-weight: bold; }

/* ===== LEGAL PAGES ===== */
.legal-page {
    max-width: 750px;
    padding: 3rem 1.5rem 4rem;
    line-height: 1.7;
}
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.25rem; }
.legal-updated { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.15rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; }
.legal-page p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; }
.legal-page ul { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.legal-page li { margin-bottom: 0.4rem; }
.footer-link { color: var(--text-secondary); text-decoration: none; font-size: 0.8rem; }
.footer-link:hover { color: var(--primary); }

/* ===== PAYMENT RESULT ===== */
.payment-result {
    text-align: center;
    padding: 5rem 1.5rem;
    max-width: 500px;
}
.payment-result h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.75rem; }
.payment-result p { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; }
.payment-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.payment-result-success { background: #ecfdf5; color: var(--success); }
.payment-result-fail { background: #fef2f2; color: var(--danger); }
@media (prefers-color-scheme: dark) {
    :root:not(.light) .payment-result-success { background: #052e16; }
    :root:not(.light) .payment-result-fail { background: #2d0a0a; }
}
html.dark .payment-result-success { background: #052e16; }
html.dark .payment-result-fail { background: #2d0a0a; }

/* Upgrade modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.modal-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h2 { margin-bottom: 0.75rem; font-size: 1.4rem; }
.modal-box p { color: var(--text-secondary); margin-bottom: 1.25rem; }
.upgrade-modal-perks {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}
.upgrade-modal-perks li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
}
.upgrade-modal-perks li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}
.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ===== INLINE FORM ===== */
.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.inline-form .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }
.inline-form .btn { align-self: flex-end; white-space: nowrap; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ===== COLOR PICKER INLINE ===== */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.color-picker-group input[type="color"] {
    width: 40px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: var(--bg);
}
.color-picker-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ===== USAGE BANNER ===== */
.usage-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.usage-banner-urgent {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}
.usage-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}
.usage-banner-label {
    font-size: 0.9rem;
    font-weight: 600;
}
.usage-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.usage-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.usage-banner-urgent .usage-bar-fill {
    background: #f59e0b;
}

/* ===== COUPON BANNER ===== */
.coupon-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius);
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
}

/* ===== WATERMARK HINT ===== */
.watermark-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.watermark-hint a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.watermark-hint a:hover { text-decoration: underline; }

/* ===== LOCKED BUTTONS ===== */
.btn-locked {
    opacity: 0.6;
    cursor: pointer;
}
.btn-locked:hover {
    opacity: 0.85;
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== UPGRADE HINT TEXT ===== */
.upgrade-hint-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .usage-banner-top { flex-direction: column; align-items: flex-start; }
    .coupon-banner { flex-direction: column; text-align: center; }
}

/* ===== LANDING V2 — HERO ===== */

.landing-hero-v2 {
    padding: 5rem 0 3rem;
}
.landing-hero-v2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.landing-hero-v2-text {
    display: flex;
    flex-direction: column;
}
.landing-hero-v2-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.landing-hero-v2-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 520px;
}
.landing-hero-v2-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.landing-hero-v2-trust {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Hero mockup */
.landing-hero-mockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.mockup-qr {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(0,0,0,0.05);
    animation: landing-float 4s ease-in-out infinite;
}
.mockup-analytics {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    animation: landing-float 4s ease-in-out infinite 0.5s;
}
.mockup-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}
.mockup-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
}
.mockup-bar {
    flex: 1;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    opacity: 0.7;
    transition: height 0.3s ease;
}
.mockup-bar:nth-child(odd) { opacity: 0.5; }
.mockup-bar:nth-child(5) { opacity: 1; }

@keyframes landing-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== LANDING V2 — SHOWCASE ===== */

.landing-showcase {
    padding: 5rem 0;
    background: var(--bg-secondary);
}
.landing-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.landing-showcase-card {
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.landing-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.landing-showcase-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
}
.landing-showcase-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.landing-showcase-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.scroll-reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.scroll-reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
    z-index: 90;
    pointer-events: none;
}
.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ===== IMPROVED FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: 0;
    background: var(--bg-secondary);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-brand .logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 280px;
}
.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 0.75rem;
}
.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.footer-bottom a { color: var(--text-secondary); text-decoration: none; }
.footer-bottom a:hover { color: var(--primary); }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ===== LANDING V2 — RESPONSIVE ===== */

@media (max-width: 768px) {
    .landing-hero-v2 { padding: 3rem 0 2rem; }
    .landing-hero-v2-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .landing-hero-v2-title { font-size: 2rem; }
    .landing-hero-v2-subtitle { margin-left: auto; margin-right: auto; }
    .landing-hero-v2-ctas { justify-content: center; flex-wrap: wrap; }
    .landing-hero-v2-visual { order: -1; }
    .mockup-qr svg { width: 140px; height: 140px; }
    .mockup-analytics { width: 170px; }
    .landing-showcase-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr !important; }
}

/* Services hub */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}
.services-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.services-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.services-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.services-icon svg { stroke: #fff; }
.services-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}
.services-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    flex: 1;
}
.services-stat {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

/* Free plan locked features */
.locked-feature-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.locked-feature-hint svg { flex-shrink: 0; }
.pro-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pro-upgrade-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}
.pro-upgrade-link:hover { text-decoration: underline; }
.tab-locked {
    position: relative;
    opacity: 0.55;
    cursor: not-allowed !important;
}
.tab-locked .pro-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.55rem;
    padding: 0.05rem 0.3rem;
}
