:root {
    --page-bg: #f5f7fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --soft-muted: #9ca3af;
    --border: #e2e7ef;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-soft: #eff6ff;
    --warning-bg: #fff7ed;
    --warning-text: #9a3412;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
}

.page-shell {
    width: min(100% - 32px, 920px);
    margin: 0 auto;
    padding: 52px 0 30px;
}

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.powered-by {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.powered-by a {
    font-weight: 700;
    text-decoration: none;
}

.powered-by a:hover,
.tool-note a:hover,
.site-footer a:hover {
    text-decoration: underline;
}

.hero h1 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(31px, 5vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| QR Generator Card
|--------------------------------------------------------------------------
*/

.generator-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.field-group {
    width: 100%;
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.field-group label span {
    margin-left: 4px;
    color: var(--soft-muted);
    font-weight: 400;
}

.field-group input {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid #cfd6e2;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.field-group input::placeholder {
    color: #7f8897;
}

.field-group input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

button {
    font: inherit;
}

.primary-button,
.secondary-button {
    border-radius: 11px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        transform 100ms ease;
}

.primary-button {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
    font-size: 16px;
}

.primary-button:hover {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
}

.primary-button:active,
.secondary-button:active {
    transform: scale(0.995);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.form-message {
    display: none;
    width: 100%;
    margin: 16px auto 0;
    padding: 11px 14px;
    border-radius: 9px;
    background: var(--warning-bg);
    color: var(--warning-text);
    font-size: 14px;
    text-align: center;
}

.form-message.is-visible {
    display: block;
}

/*
|--------------------------------------------------------------------------
| QR Result
|--------------------------------------------------------------------------
*/

.result-area {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.result-area[hidden],
.result-title[hidden] {
    display: none;
}

.result-title {
    margin: 0 0 18px;
    color: #111827;
    font-size: 22px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.qr-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 280px;
    padding: 8px 0;
}

.qr-box canvas,
.qr-box img {
    display: block;
    width: min(100%, 512px) !important;
    height: auto !important;
    image-rendering: pixelated;
}

.content-preview {
    width: 100%;
    margin: 18px auto 0;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 24px;
    padding: 0 26px;
    border: 1px solid var(--blue);
    background: #fff;
    color: var(--blue);
    font-size: 15px;
}

.secondary-button:hover {
    background: var(--blue);
    color: #fff;
}

/*
|--------------------------------------------------------------------------
| Tool Note
|--------------------------------------------------------------------------
*/

.tool-note {
    padding: 30px 18px 12px;
    text-align: center;
}

.tool-note h2 {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 16px;
    font-weight: 700;
}

.tool-note p {
    max-width: 680px;
    margin: 0 auto;
    color: #8a94a5;
    font-size: 13px;
    line-height: 1.7;
}

.tool-note a {
    color: #667085;
    font-weight: 600;
    text-decoration: none;
}

/*
|--------------------------------------------------------------------------
| Advertisement
|--------------------------------------------------------------------------
*/

.ad-zone {
    min-height: 122px;
    margin-top: 24px;
    padding: 12px 16px 18px;
    border: 1px dashed #d7dde7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    text-align: center;
    overflow: hidden;
}

.ad-label {
    margin-bottom: 8px;
    color: #a0a8b5;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-content {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: center;
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.site-footer {
    width: min(100% - 32px, 920px);
    margin: 0 auto;
    padding: 0 0 34px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.site-footer a {
    color: #7d8796;
    text-decoration: none;
}

.footer-separator {
    margin: 0 7px;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 640px) {

    .page-shell {
        width: min(100% - 24px, 920px);
        padding-top: 30px;
    }

    .hero {
        margin-bottom: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    .generator-card {
        max-width: 100%;
        padding: 22px 18px;
        border-radius: 16px;
    }

    .field-group input {
        min-height: 46px;
        font-size: 15px;
    }

    .qr-box {
        min-height: 220px;
        padding-inline: 0;
    }

    .result-title {
        font-size: 19px;
    }

    .ad-zone {
        min-height: 108px;
    }
}