@font-face {
    font-family: Estedad;
    src: url("fonts/estedad-light.ttf") format("truetype");
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: Estedad;
    src: url("fonts/estedad-medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Estedad;
    src: url("fonts/estedad-bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #f6f8fc;
    --surface: rgba(255, 255, 255, 0.92);
    --text: #111827;
    --muted: #5f6b7a;
    --primary: #0ea5a4;
    --primary-dark: #0b8382;
    --danger: #d92d20;
    --stroke: #d9e2f0;
    --shadow: 0 15px 45px rgba(8, 31, 60, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Estedad, Tahoma, sans-serif;
    background: linear-gradient(160deg, #eef5ff 0%, #f7fbff 52%, #f5faf8 100%);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    z-index: 0;
    filter: blur(8px);
    pointer-events: none;
}

.bg-shape-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle at 30% 30%, #93c5fd 0%, rgba(147, 197, 253, 0) 70%);
    top: -140px;
    right: -80px;
}

.bg-shape-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 70% 70%, #5eead4 0%, rgba(94, 234, 212, 0) 72%);
    bottom: -180px;
    left: -100px;
}

.container {
    width: min(940px, 92vw);
    margin: 32px auto;
    position: relative;
    z-index: 1;
}

.hero {
    margin-bottom: 20px;
    animation: fadeUp 0.7s ease;
}

.badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 7px 12px;
    border: 1px solid #d8ecff;
    border-radius: 999px;
    background: #ffffffb0;
    color: #2263a7;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    line-height: 1.35;
}

.subtitle {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 700px;
    line-height: 1.9;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(18px, 2.8vw, 28px);
    margin-bottom: 18px;
    animation: fadeUp 0.8s ease;
}

.card h2,
.card h1 {
    margin: 0 0 14px;
    font-size: clamp(1.25rem, 2.8vw, 1.7rem);
}

.form {
    display: grid;
    gap: 12px;
}

.items-container {
    display: grid;
    gap: 14px;
}

.item-block {
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    padding: 14px;
    background: #fdfefe;
    display: grid;
    gap: 10px;
}

.item-head h3 {
    margin: 0;
    color: #1b4f7f;
    font-size: 1rem;
}

label,
legend {
    font-weight: 700;
    color: #223246;
}

input,
textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    padding: 12px 14px;
    background: #fff;
    font-size: 0.97rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #7dd3fc;
    box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.28);
}

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

.privacy-choice {
    border: 1px dashed #bcd1e7;
    border-radius: 14px;
    padding: 10px 12px 12px;
    margin: 2px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.radio-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2e3f56;
}

.radio-wrap input {
    width: auto;
    margin: 0;
}

.password-group {
    display: grid;
    gap: 8px;
}

.hidden {
    display: none;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #fff;
    box-shadow: 0 8px 18px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0891b2);
}

.btn-ghost {
    display: inline-block;
    background: #f0f7ff;
    color: #1a4f84;
    text-decoration: none;
}

.btn-submit {
    margin-top: 8px;
}

.alert {
    border: 1px solid #ffd3cf;
    background: #fff5f4;
    color: var(--danger);
    border-radius: 12px;
    padding: 10px 12px;
}

.alert ul {
    margin: 0;
    padding-right: 18px;
}

.success-card {
    border: 1px solid #c8efe7;
}

.link-box {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    margin: 16px 0 12px;
}

.link-box input {
    background: #f9fbff;
}

.copy-ok {
    background: #16a34a !important;
}

.container-view {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 64px);
}

.view-card {
    width: min(820px, 94vw);
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    text-decoration: none;
    color: #165c95;
    font-weight: 700;
}

.muted {
    color: var(--muted);
    line-height: 1.9;
}

.meta {
    color: #385679;
    margin-top: -4px;
    margin-bottom: 14px;
}

.view-items {
    display: grid;
    gap: 14px;
}

.view-item {
    border: 1px solid #dae8f7;
    border-radius: 16px;
    background: #fcfeff;
    padding: 12px;
}

.view-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.view-item-head h2 {
    margin: 0;
    font-size: 1.02rem;
}

.copy-icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #c9def4;
    background: #f1f8ff;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.2s ease;
}

.copy-icon-btn:hover {
    transform: translateY(-1px);
    background: #e1f2ff;
}

.copy-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: #2263a7;
}

.content-box {
    border-radius: 14px;
    border: 1px solid #d5e5f6;
    background: #ffffff;
    padding: clamp(14px, 2.2vw, 20px);
    line-height: 2.05;
    word-break: break-word;
}

.copyable-text {
    cursor: copy;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.copyable-text:hover {
    border-color: #9ac8ee;
    box-shadow: inset 0 0 0 1px #c8e4fb;
}

.compact-form {
    max-width: 420px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    background: #0f172a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    z-index: 20;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    font-size: 0.92rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .container {
        width: min(96vw, 96vw);
        margin: 16px auto;
    }

    .card {
        border-radius: 18px;
    }

    .link-box {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .privacy-choice {
        gap: 10px;
    }

    .view-item-head h2 {
        font-size: 0.95rem;
    }
}
