:root {
    --bg: #07070a;
    --card: #101016;
    --card-hover: #15151d;

    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.18);

    --text: #f5f5f7;
    --muted: #92929d;

    --accent: #3989ff;
    --accent-light: #8dc9ff;

    --max-width: 1050px;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(130,70,255,0.14),
            transparent 40%
        ),
        var(--bg);

    color: var(--text);

    line-height: 1.6;
}


button,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


/* NAVBAR */

.navbar {
    width: min(var(--max-width), calc(100% - 32px));

    height: 76px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.brand {
    display: flex;

    align-items: center;

    gap: 11px;
}


.brand-symbol {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: rgba(255,255,255,0.03);

    color: var(--accent-light);

    font-size: 23px;
}


.brand-text {
    display: flex;

    flex-direction: column;

    line-height: 1;
}


.brand-main {
    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1.8px;
}


.brand-sub {
    margin-top: 5px;

    color: var(--accent-light);

    font-size: 9px;

    letter-spacing: 3px;
}


.back-link {
    color: var(--muted);

    font-size: 13px;

    transition: 0.2s;
}


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


/* HERO */

.tool-hero {
    width: min(720px, calc(100% - 32px));

    margin: 80px auto 50px;

    text-align: center;
}


.tool-badge {
    display: inline-block;

    padding: 6px 12px;

    border: 1px solid var(--border);

    border-radius: 50px;

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 2px;
}


.tool-hero h1 {
    margin-top: 20px;

    font-size: clamp(42px, 8vw, 68px);

    line-height: 1.02;

    letter-spacing: -3px;
}


.tool-hero h1 span {
    color: var(--accent-light);
}


.tool-hero p {
    max-width: 560px;

    margin: 20px auto 0;

    color: var(--muted);

    font-size: 14px;
}


/* GENERATOR */

.generator {
    width: min(var(--max-width), calc(100% - 32px));

    margin: auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}


.input-panel,
.result-panel {
    padding: 25px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: var(--card);
}


.input-panel {
    position: relative;
}


label,
.section-label {
    display: block;

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.8px;
}


textarea {
    width: 100%;

    min-height: 190px;

    margin-top: 10px;

    padding: 15px;

    resize: vertical;

    outline: none;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: #0a0a0e;

    color: var(--text);

    font-size: 14px;

    line-height: 1.5;

    transition: 0.2s;
}


textarea:focus {
    border-color: rgba(57,137,255,0.55);

    box-shadow:
        0 0 0 4px rgba(57,137,255,0.07);
}


textarea::placeholder {
    color: #666671;
}


.character-count {
    margin-top: 7px;

    text-align: right;

    color: #666671;

    font-size: 10px;
}


/* BUTTONS */

.generate-button,
.download-button {
    width: 100%;

    height: 48px;

    margin-top: 18px;

    border: 0;

    border-radius: 11px;

    background: var(--accent);

    color: white;

    font-weight: 700;

    font-size: 13px;

    transition: 0.2s;
}


.generate-button:hover,
.download-button:not(:disabled):hover {
    background: var(--accent-light);

    transform: translateY(-1px);
}


.generate-button span,
.download-button span {
    margin-left: 7px;
}


.clear-button {
    width: 100%;

    margin-top: 9px;

    padding: 10px;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 12px;
}


.clear-button:hover {
    color: var(--text);
}


/* RESULT */

.result-header {
    margin-bottom: 15px;
}


.result-header h2 {
    margin-top: 2px;

    font-size: 20px;
}


.qr-container {
    min-height: 260px;

    display: grid;

    place-items: center;

    border: 1px dashed rgba(255,255,255,0.09);

    border-radius: 13px;

    background: #0a0a0e;
}


.qrcode {
    display: none;

    padding: 15px;

    background: white;

    border-radius: 5px;
}


.qrcode img,
.qrcode canvas {
    display: block;
}


.qr-placeholder {
    text-align: center;

    color: #5f5f69;
}


.placeholder-icon {
    margin-bottom: 8px;

    color: #77717f;

    font-size: 38px;
}


.qr-placeholder p {
    font-size: 11px;

    line-height: 1.5;
}


.download-button:disabled {
    opacity: 0.35;

    cursor: not-allowed;
}


/* INFO */

.info-section {
    width: min(var(--max-width), calc(100% - 32px));

    margin: 70px auto;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}


.info-card {
    display: flex;

    gap: 13px;

    padding: 18px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background: rgba(255,255,255,0.02);
}


.info-icon {
    flex-shrink: 0;

    color: var(--accent-light);

    font-size: 19px;
}


.info-card h3 {
    font-size: 13px;
}


.info-card p {
    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.5;
}


/* FOOTER */

footer {
    width: min(var(--max-width), calc(100% - 32px));

    margin: auto;

    padding: 25px 0 35px;

    border-top: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    color: var(--muted);

    font-size: 10px;
}


/* MOBILE */

@media (max-width: 750px) {

    .navbar {
        height: 68px;
    }


    .tool-hero {
        margin-top: 65px;

        margin-bottom: 40px;
    }


    .tool-hero h1 {
        letter-spacing: -2px;
    }


    .generator {
        grid-template-columns: 1fr;
    }


    .input-panel,
    .result-panel {
        padding: 20px;
    }


    .info-section {
        grid-template-columns: 1fr;
    }


    footer {
        flex-direction: column;

        gap: 7px;
    }

}