@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --background: oklch(0.99 0 0);
    --foreground: oklch(0.21 0 0);
    --muted: oklch(0.94 0 0);
    --muted-foreground: rgb(57 36 63);
    --muted-footer: rgb(240 240 240);

    --card: oklch(1 0 0);
    --card-contrast: oklch(0.985 0 0);
    --border: oklch(0.88 0 0 / 0.9);
    --ring: oklch(0.70 0.05 275);

    --accent: oklch(0.64 0.13 275);
    --accent-strong: oklch(0.58 0.15 275);
    --accent-weak: oklch(0.93 0.05 275);
    --secondary: oklch(0.88 0.05 265);
    --secondary-foreground: oklch(0.22 0.02 265);

    --primary: var(--accent);
    --primary-foreground: oklch(0.985 0 0);
    --ghost: transparent;
    --ghost-border: oklch(0.86 0 0);
    --ghost-foreground: var(--foreground);

    --success: oklch(0.78 0.12 145);
    --warning: oklch(0.88 0.12 85);
    --danger: oklch(0.64 0.16 25);

    --font-sans: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;

    --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06);
    --shadow-2: 0 3px 6px rgba(0,0,0,0.07), 0 14px 32px rgba(0,0,0,0.08);

    --easing: cubic-bezier(.2,.7,.3,1);
    --fast: 160ms;
    --slow: 280ms;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: oklch(0.15 0 0);
        --foreground: oklch(0.98 0 0);
        --muted: oklch(0.22 0 0);
        --muted-foreground: oklch(0.80 0 0);
        --muted-footer: rgb(240 240 240);

        --card: oklch(0.18 0 0);
        --card-contrast: oklch(0.22 0 0);
        --border: oklch(0.30 0 0 / 1);
        --ring: oklch(0.75 0.10 275);

        --ghost-border: oklch(0.32 0 0);
        --shadow-1: 0 1px 2px rgba(0,0,0,0.35), 0 10px 30px rgba(0,0,0,0.45);
        --shadow-2: 0 6px 12px rgba(0,0,0,0.35), 0 18px 40px rgba(0,0,0,0.55);
    }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: radial-gradient(1200px 800px at 5% -10%, var(--accent-weak), transparent 35%) var(--background);
    color: var(--foreground);
    letter-spacing: .01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 1px 1px, oklch(0 0 0 / .05) 1px, transparent 1.5px) 0 0/20px 20px;
    pointer-events: none;
    opacity: .5;
}

.site-body {
    min-height: 150vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    background: #ffffff;
    background: linear-gradient(30deg, rgba(255, 255, 255, 1) 60%, rgba(244, 240, 250, 1) 90%, rgba(222, 220, 224, 1) 100%);
    flex: 1;
    padding: 40px 0 80px;
}

.site-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.page-content {
    width: min(1080px, 92vw);
    margin: 0 auto;
}

.page-content--narrow {
    width: min(560px, 92vw);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--card), var(--card-contrast));
    box-shadow: var(--shadow-1);
    padding: 16px 24px;
    margin-bottom: 24px;
}

.app-header .logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: inset 0 -12px 20px rgba(0,0,0,0.15);
}

.site-title {
    margin: 0;
    font-size: 1.6rem;
}

.tagline {
    margin: 2px 0 0;
    font-size: .9rem;
    color: var(--muted-foreground);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-weak);
    color: var(--accent-strong);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: .78rem;
}

.button,
.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    gap: 8px;
    transition: background var(--fast) var(--easing), color var(--fast) var(--easing), box-shadow var(--fast) var(--easing), transform var(--fast) var(--easing);
    background: var(--primary);
    color: var(--primary-foreground);
}

.button.outline,
.btn-ghost {
    background: var(--ghost);
    border-color: var(--ghost-border);
    color: var(--ghost-foreground);
}

.button.outline:hover,
.btn-ghost:hover {
    background: var(--muted);
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover,
.button:hover,
button:hover {
    background: var(--accent-strong);
}

.btn-primary:active,
.button:active,
button:active {
    transform: translateY(1px);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--card), var(--card-contrast));
    padding: 20px;
    box-shadow: var(--shadow-1);
}

.panel h3 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.1rem;
}

.form-stack {
    display: grid;
    gap: 14px;
}

.input,
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--card);
    color: var(--foreground);
    font: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.small { font-size: .9rem; }
.muted { color: var(--muted-foreground); }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.qr-app {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.qr-app__controls,
.qr-app__preview {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.qr-form__fields {
    display: grid;
    gap: 18px;
}

.qr-field {
    display: grid;
    gap: 6px;
}

.qr-field--checkbox {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.qr-field__checkbox-label {
    margin: 0;
}

.qr-field--inline {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.qr-options {
    display: grid;
    gap: 12px;
}

.qr-color-pickers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.qr-preview__canvas {
    width: 100%;
    min-height: 320px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    display: grid;
    place-items: center;
    padding: 20px;
}

.qr-preview__canvas canvas,
.qr-preview__canvas img,
.qr-preview__canvas svg {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
}

.qr-preview__footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-feedback {
    border-radius: var(--radius-xs);
    padding: 10px 12px;
    font-size: .95rem;
}

.qr-feedback--success { background: oklch(0.94 0.03 140); color: oklch(0.36 0.05 140); }
.qr-feedback--error { background: oklch(0.97 0.03 25); color: oklch(0.42 0.08 25); }

#qr-download[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.qr-limit {
    font-weight: 600;
    color: var(--muted-foreground);
}

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

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions { width: 100%; }
    .header-actions .button { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
    .page-content,
    .site-container { width: 100%; padding: 0 20px; }
}

/* Header styles inherited from original theme */
.global-header {
    background: #ffffff;
    color: #fcfafc;
    box-shadow: 0 10px 30px rgba(23, 0, 40, 0.25);
}

.global-header__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.global-header__brand img {
    max-height: 48px;
}

.global-header__nav,
.global-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.global-header__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fcfafc;
    text-decoration: none;
    font-weight: 600;
}

.global-header__action--primary {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.45);
}

.global-header__action:hover {
    background: rgba(255, 255, 255, 0.18);
}

.global-header__nav a,
.global-header__actions a {
    color: #201020;
    text-decoration: none;
    font-weight: 600;
}

.global-header__local {
    background: rgba(10, 0, 28, 0.78);
    border-top: 1px solid rgba(229, 235, 255, 0.15);
}

.global-header__local-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.global-header__local-nav a {
    color: #fcfafc;
    text-decoration: none;
    font-weight: 600;
}

.global-header__local-nav a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 900px) {
    .global-header__main { flex-direction: column; align-items: flex-start; }
    .global-header__actions { width: 100%; }
}

.global-footer {
    margin-top: auto;
    background: #1e003e;
    color: #fbe3ff;
}

.global-footer a {
    color: #fbe3ff !important;
    text-decoration: none;
}

.global-footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

.global-footer__top {
    border-bottom: 1px solid rgba(219, 227, 255, 0.24);
}

.global-footer__top-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 0;
}

.global-footer__top-link,
.global-footer__tagline {
    font-weight: 600;
}

.global-footer__top-link {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.global-footer__main {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    padding: 48px 0 32px;
}

.global-footer__brand { flex: 1 1 260px; }
.global-footer__brand-link { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.global-footer__brand-link img { min-height: 72px; width: 100%; height: auto; }
.global-footer__description { max-width: 360px; margin: 0; opacity: 0.85; line-height: 1.6; }

.global-footer__columns { flex: 2 1 380px; display: flex; flex-wrap: wrap; gap: 30px; }
.global-footer__column { min-width: 180px; }
.global-footer__heading { margin: 0 0 12px; font-size: 1.05rem; color: #fff; }
.global-footer__column ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.global-footer__bottom {
    border-top: 1px solid rgba(219, 227, 255, 0.2);
    background: rgba(0, 0, 0, 0.25);
    padding: 18px 0;
}

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

.global-footer__bottom-inner p { margin: 0; }
.global-footer__legal { display: flex; gap: 16px; flex-wrap: wrap; }
.global-footer__legal a { color: #dbe3ff; }
.global-footer__legal a:hover { color: #fff; }

