:root {
    --primary: #5b5ce6;
    --primary-hover: #4a47d1;
    --accent: #5ed3b1;
    --bg-gradient:
        radial-gradient(circle at top left, rgba(94, 211, 177, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(91, 92, 230, 0.22), transparent 26%),
        linear-gradient(180deg, #eef2f8 0%, #e4ebf4 100%);
    --card-bg: rgba(255, 255, 255, 0.82);
    --text-main: #1b2540;
    --text-muted: #60708f;
    --border: #d7dfeb;
    --shadow: 0 28px 50px rgba(46, 63, 96, 0.12);
    --shadow-soft: 0 16px 30px rgba(91, 92, 230, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.global-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.global-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
    border-radius: 0;
    background: rgba(255, 255, 255, 0.88);
    border-top: 1px solid rgba(133, 150, 182, 0.22);
    box-shadow: 0 -10px 30px rgba(46, 63, 96, 0.08);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.language-switcher {
    display: flex;
    align-items: center;
    width: min(100%, 280px);
}

.language-switcher select {
    width: 100%;
    min-width: 0;
    padding: 8px 34px 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    border-color: rgba(133, 150, 182, 0.16);
    box-shadow: none;
    background: rgba(255, 255, 255, 0.9);
}

header {
    position: relative;
    text-align: center;
    margin-bottom: 42px;
    padding-top: 10px;
}

header h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(3rem, 7vw, 4.4rem);
    line-height: 0.95;
    font-weight: 700;
    background: linear-gradient(135deg, #4b5dff 0%, #7655ee 45%, #4cc9a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
    letter-spacing: -0.05em;
}

header p {
    max-width: 420px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.55;
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.7;
    pointer-events: none;
}

.hero-orb-left {
    top: 46px;
    left: 48px;
    width: 88px;
    height: 88px;
    background: radial-gradient(circle, rgba(94, 211, 177, 0.7), rgba(94, 211, 177, 0));
}

.hero-orb-right {
    top: 20px;
    right: 56px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(91, 92, 230, 0.6), rgba(91, 92, 230, 0));
}

.card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.privacy-note {
    position: relative;
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(84, 101, 240, 0.1), rgba(94, 211, 177, 0.12));
    border: 1px solid rgba(91, 92, 230, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.privacy-note strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.privacy-note p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.form-notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 0.92rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-error {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12) !important;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-btn {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(91, 92, 230, 0.08);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 1;
}

.icon-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.field-error {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.field-error {
    color: #be123c;
    font-weight: 600;
}

.is-disabled {
    opacity: 0.55;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin-bottom: 0;
}

.primary-btn {
    width: 100%;
    padding: 17px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #6d63f2);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 18px 28px rgba(91, 92, 230, 0.28);
}

.primary-btn:hover {
    filter: brightness(1.02);
    box-shadow: 0 22px 34px rgba(91, 92, 230, 0.32);
}

.primary-btn:active {
    transform: translateY(1px) scale(0.995);
}

.secondary-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
}

.result-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#qrcode {
    background: rgba(255, 255, 255, 0.96);
    padding: 18px;
    border-radius: 22px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.result-actions {
    display: flex;
    gap: 12px;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    padding-bottom: 98px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .global-toolbar {
        bottom: 0;
        width: 100%;
    }

    .global-toolbar-inner {
        width: 100%;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .card {
        padding: 24px;
    }

    .language-switcher {
        width: 100%;
    }

    .language-switcher select {
        font-size: 0.88rem;
    }

    header h1 {
        font-size: 2.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .hero-orb-left {
        left: 12px;
        top: 72px;
    }

    .hero-orb-right {
        right: 10px;
        top: 18px;
    }

    .result-actions {
        width: 100%;
        flex-direction: column;
    }

    .secondary-btn {
        width: 100%;
    }
}

/* Print Styles */
.print-only {
    display: none;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        padding: 0;
        margin: 0;
        display: block;
    }

    .print-only {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        width: 100vw;
        padding: 0.4in;
    }

    .print-card {
        border: 1.5pt solid #1b2540;
        border-radius: 24px;
        padding: 0.48in 0.42in 0.42in;
        width: 100%;
        max-width: 5.3in;
        text-align: center;
        background: white;
        box-shadow: none;
    }

    .print-kicker {
        margin-bottom: 10pt;
        font-size: 9pt;
        font-weight: 700;
        letter-spacing: 2.8pt;
        color: #60708f;
        text-transform: uppercase;
    }

    .print-header h2 {
        font-size: 28pt;
        line-height: 1;
        margin-bottom: 0;
        color: #1b2540;
        text-transform: uppercase;
        letter-spacing: 1.2pt;
    }

    .print-qr-container {
        margin: 24pt 0 26pt;
        display: flex;
        justify-content: center;
    }

    #printQrcode img {
        width: 2.55in !important;
        height: 2.55in !important;
        display: block;
    }

    #printQrcode canvas {
        width: 2.55in !important;
        height: 2.55in !important;
        display: block;
    }

    .print-info {
        display: grid;
        gap: 10pt;
        margin: 0 0 18pt;
        text-align: left;
    }

    .info-item {
        display: grid;
        gap: 6pt;
        padding: 14pt 16pt;
        border: 1pt solid #d7dfeb;
        border-radius: 16px;
        background: #f7f9fc;
    }

    .label {
        width: auto;
        display: block;
        font-size: 9.5pt;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #60708f;
    }

    .value {
        font-family: monospace;
        font-size: 18pt;
        line-height: 1.2;
        color: #1b2540;
        word-break: break-word;
    }

    .print-footer {
        padding-top: 14pt;
        border-top: 1pt solid #d7dfeb;
        color: #60708f;
        font-size: 10.5pt;
        line-height: 1.4;
    }

    .print-site-url {
        margin-top: 10pt;
        font-size: 10pt;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: #1b2540;
    }
}
