:root {
    --bg: #0b1020;
    --bg-2: #121a31;
    --card: rgba(18, 26, 49, 0.82);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #eef2ff;
    --muted: #a7b0c8;
    --primary: #6d7cff;
    --primary-2: #8a63ff;
    --success: #5ee7a5;
    --danger: #ff7a91;
    --input: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.09);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(109, 124, 255, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(138, 99, 255, 0.18), transparent 22%),
        linear-gradient(180deg, #0b1020 0%, #0e1427 100%);
}

body {
    min-height: 100vh;
    padding: 32px 18px 0;
    display: flex;
    flex-direction: column;
}

.page-shell {
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 24px 12px 8px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(109, 124, 255, 0.14);
    border: 1px solid rgba(109, 124, 255, 0.28);
    color: #d6dcff;
    font-size: 13px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.subtitle {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-header h2 {
    margin: 2px 0 0;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: #dce3ff;
}

.field-label {
    display: block;
    margin: 12px 0 8px;
    font-size: 13px;
    color: #cfd6ee;
}

textarea,
input {
    width: 100%;
    border: 1px solid var(--input-border);
    background: var(--input);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
    transition: 0.18s ease;
}

textarea::placeholder,
input::placeholder {
    color: #7f89a7;
}

textarea:focus,
input:focus {
    border-color: rgba(109, 124, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.13);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.receive-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.secondary-actions {
    margin-top: 14px;
}

.btn {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.18s ease, box-shadow 0.18s ease;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    padding: 13px 18px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 26px rgba(109, 124, 255, 0.28);
}

.btn-secondary {
    padding: 11px 14px;
    color: #e5eaff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-small {
    font-size: 13px;
}

.hint {
    color: var(--muted);
    font-size: 13px;
}

.code-panel {
    margin-top: 20px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(109, 124, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(109, 124, 255, 0.22);
}

.code-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.code-label {
    color: var(--muted);
    font-size: 13px;
}

.result {
    margin-top: 10px;
    font-size: clamp(42px, 8vw, 72px);
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ffffff;
    line-height: 1;
}

.message,
.error {
    margin-top: 14px;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    display: none;
}

.message:not(:empty) {
    display: block;
    color: #d9ffeb;
    background: rgba(94, 231, 165, 0.12);
    border: 1px solid rgba(94, 231, 165, 0.18);
}

.error:not(:empty) {
    display: block;
    color: #ffe0e7;
    background: rgba(255, 122, 145, 0.12);
    border: 1px solid rgba(255, 122, 145, 0.18);
}

.hidden {
    display: none;
}

#receiveCode {
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 26px;
}

#receivedText {
    min-height: 170px;
}

.site-footer {
    width: 100%;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
}

.site-footer-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-brand {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.01em;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.68);
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 18px 12px 0;
    }

    .card {
        padding: 18px;
        border-radius: 18px;
    }

    .receive-grid {
        grid-template-columns: 1fr;
    }

    .code-panel-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .result {
        letter-spacing: 0.08em;
    }

    .site-footer-inner {
        padding: 0 12px;
        flex-direction: column;
        align-items: flex-start;
    }
}