html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
      'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
      sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: rgba(255, 255, 255, 0.65);
    --accent-gold: #A67C52;
    --accent-gold-hover: #8c6945;
    --positive: #00ff88;
    --negative: #ff4444;
    --border: rgba(255, 255, 255, 0.10);
    --radius: 10px;
    --shadow-gold: 0 0 24px rgba(166, 124, 82, 0.24);
}

/* Light mode overrides */
body.light-mode {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: rgba(0, 0, 0, 0.55);
    --accent-gold: #A67C52;
    --accent-gold-hover: #8c6945;
    --positive: #16a34a;
    --negative: #dc2626;
    --border: rgba(0, 0, 0, 0.10);
    --shadow-gold: 0 0 24px rgba(166, 124, 82, 0.15);
}

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

body.light-mode {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Override MudBlazor theme colors to prevent blue background */
.mud-theme-provider,
.mud-layout,
.mud-main-content {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.mud-appbar {
    background-color: var(--bg-secondary) !important;
}

.mud-drawer {
    background-color: var(--bg-secondary) !important;
}

.cq-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.cq-page {
    min-height: 100vh;
}

.cq-main {
    padding-top: 64px;
}

.cq-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.cq-header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cq-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.cq-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cq-brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: radial-gradient(circle at 30% 30%, rgba(244, 207, 87, 0.95), rgba(166, 124, 82, 0.85));
    box-shadow: var(--shadow-gold);
}

.cq-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: contain;
    box-shadow: var(--shadow-gold);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.cq-nav {
    display: none;
    align-items: center;
    gap: 24px;
}

@media (min-width: 769px) {
    .cq-nav { display: flex; }
}

.cq-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 160ms ease;
}

.cq-link:hover {
    color: var(--text-primary);
}

.cq-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cq-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.cq-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.16);
}

.cq-btn-primary {
    background: var(--accent-gold);
    border-color: transparent;
    color: #050505;
    box-shadow: var(--shadow-gold);
}

.cq-btn-primary:hover {
    background: var(--accent-gold-hover);
}

.cq-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.cq-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.cq-btn-full {
    width: 100%;
}

.cq-arrow {
    font-size: 18px;
}

.cq-hero {
    position: relative;
    padding: 80px 0 48px 0;
    overflow: hidden;
}

.cq-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.30), transparent);
    pointer-events: none;
}

.cq-hero-center {
    text-align: center;
    position: relative;
    z-index: 10;
}

.cq-hero::before {
    content: "";
    position: absolute;
    inset: -200px -200px auto -200px;
    height: 420px;
    background: radial-gradient(circle at 50% 30%, rgba(166, 124, 82, 0.15), rgba(10, 10, 10, 0));
    pointer-events: none;
}

.cq-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.75);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.cq-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent-gold);
    box-shadow: 0 0 18px rgba(166, 124, 82, 0.45);
}

.cq-title {
    margin: 32px 0 0 0;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

@media (min-width: 769px) {
    .cq-title { font-size: 72px; }
}

.cq-title-gradient {
    background: linear-gradient(90deg, #A67C52, #F4CF57);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cq-subtitle {
    margin: 16px auto 0 auto;
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.7;
}

.cq-hero-actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.cq-trust-badges {
    margin-top: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0.5;
    filter: grayscale(1);
}

.cq-trust-dot {
    color: var(--text-muted);
}

.cq-section {
    padding: 80px 0;
}

.cq-section-alt {
    background: rgba(20, 20, 20, 0.20);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cq-section-header-center {
    text-align: center;
    margin-bottom: 48px;
}

.cq-section-header-center .cq-section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.cq-section-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cq-section-title-lg {
    font-size: 36px;
}

@media (min-width: 769px) {
    .cq-section-title { font-size: 36px; }
    .cq-section-title-lg { font-size: 40px; }
}

.cq-section-subtitle {
    margin: 16px 0 0 0;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.6;
}

.cq-grid-3 {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cq-card {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.50);
    padding: 32px;
    transition: border-color 200ms ease, transform 200ms ease;
}

.cq-card:hover {
    transform: translateY(-2px);
    border-color: rgba(166, 124, 82, 0.50);
}

.cq-card-feature .cq-icon {
    transition: transform 200ms ease;
}

.cq-card-feature:hover .cq-icon {
    transform: scale(1.10);
}

.cq-card-title {
    margin: 12px 0 0 0;
    font-size: 18px;
    font-weight: 700;
}

.cq-card-text {
    margin: 10px 0 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.cq-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--accent-gold);
    background: rgba(166, 124, 82, 0.10);
    border: 1px solid rgba(166, 124, 82, 0.22);
    margin-bottom: 16px;
}

.cq-preview {
    margin-top: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.55);
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

.cq-preview-inner {
    height: 320px;
    border-radius: 16px;
    margin: 10px;
    background: linear-gradient(140deg, rgba(166, 124, 82, 0.20), rgba(10, 10, 10, 0.10));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cq-preview-img {
    display: block;
    width: 100%;
    height: auto;
}

.cq-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 24px 0;
    font-size: 14px;
}

.cq-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cq-footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.cq-footer-name {
    font-weight: 600;
    color: var(--text-primary);
}

.cq-footer-credit {
    color: var(--text-muted);
}

.cq-footer-author {
    color: var(--text-primary);
    font-weight: 500;
}

.cq-footer-links {
    display: flex;
    gap: 24px;
}

/* ── Billing Toggle ── */
.cq-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.cq-billing-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 160ms;
}

.cq-billing-active {
    color: var(--text-primary);
    font-weight: 700;
}

.cq-billing-save {
    color: var(--accent-gold);
    font-size: 12px;
    margin-left: 4px;
}

.cq-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 200ms;
}

.cq-toggle-on {
    background: var(--accent-gold);
}

.cq-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 200ms;
}

.cq-toggle-on .cq-toggle-knob {
    transform: translateX(20px);
}

/* ── Plan Cards ── */
.cq-plans-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.cq-plan-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: rgba(15, 23, 42, 0.80);
    transition: all 300ms ease;
    position: relative;
}

.cq-plan-card:hover {
    border-color: rgba(100, 116, 139, 0.5);
    background: rgba(30, 41, 59, 0.50);
}

.cq-plan-featured {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 1px var(--accent-gold);
    transform: scale(1.05);
    z-index: 1;
}

.cq-plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gold);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.cq-plan-header {
    margin-bottom: 24px;
}

.cq-plan-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.cq-plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.cq-plan-amount {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
}

.cq-plan-period {
    font-size: 14px;
    color: rgba(100, 116, 139, 0.8);
}

.cq-plan-billed {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.8);
    margin: 4px 0 0 0;
}

.cq-plan-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.cq-plan-feat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(203, 213, 225, 0.9);
}

.cq-plan-feat-no {
    color: rgba(100, 116, 139, 0.5);
}

.cq-plan-feat-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-weight: 700;
}

.cq-plan-feat .cq-plan-feat-icon {
    color: #10b981;
}

.cq-plan-feat-no .cq-plan-feat-icon {
    color: rgba(100, 116, 139, 0.4);
}

.cq-form {
    max-width: 440px;
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.55);
    border-radius: 18px;
    padding: 22px;
}

.cq-form label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
    margin: 14px 0 6px 0;
}

.cq-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 10, 0.55);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 12px 12px;
    outline: none;
}

.cq-input:focus {
    border-color: rgba(166, 124, 82, 0.55);
    box-shadow: 0 0 0 4px rgba(166, 124, 82, 0.18);
}

.cq-form-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 960px) {
    .cq-grid-3 {
        grid-template-columns: 1fr;
    }

    .cq-title {
        font-size: 42px;
    }

    .cq-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cq-trust-badges {
        flex-direction: column;
        gap: 8px;
    }

    .cq-trust-dot { display: none; }

    .cq-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .cq-plan-featured {
        transform: none;
    }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--accent-gold);
}

.btn-primary {
    color: #0a0a0a;
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--accent-gold);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpb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I2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.mud-dialog {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto !important;
    max-width: 1100px !important;
    width: 95% !important;
}

.mud-dialog .mud-dialog-content {
    padding: 0 !important;
    overflow: visible !important;
}

.mud-dialog-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1300 !important;
}

.mud-dialog .mud-dialog-title {
    display: none !important;
}

.mud-dialog .mud-dialog-actions {
    display: none !important;
}

.mud-overlay-dark {
    background-color: rgba(0, 0, 0, 0.72) !important;
}
