:root {
    color-scheme: dark;
    --skao-midnight: #181c45;
    --skao-plum: #811052;
    --midnight-deep: #050714;
    --background-gradient: linear-gradient(160deg, #050714 0%, #161d4f 52%, #120721 100%);
    --background-nebula-1: radial-gradient(circle at 18% 22%, rgba(129, 16, 82, 0.35) 0%, rgba(129, 16, 82, 0) 55%);
    --background-nebula-2: radial-gradient(circle at 78% 8%, rgba(33, 129, 218, 0.28) 0%, rgba(20, 24, 67, 0) 60%);
    --card-bg: rgba(9, 13, 33, 0.85);
    --card-border: rgba(126, 138, 201, 0.35);
    --card-highlight: rgba(150, 118, 224, 0.08);
    --text-color: #f2f5ff;
    --muted: #b6bee8;
    --muted-strong: #d7dbff;
    --accent: #8d66ff;
    --accent-dark: #6b4adb;
    --accent-soft: rgba(141, 102, 255, 0.32);
    --gradient-accent: linear-gradient(135deg, #811052 15%, #2f4f90 85%);
    --gradient-accent-hover: linear-gradient(135deg, #9f1869 0%, #445fb5 100%);
    --border: rgba(110, 122, 196, 0.4);
    --shadow: 0 30px 80px rgba(4, 6, 18, 0.75);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    background:
        var(--background-nebula-1),
        var(--background-nebula-2),
        var(--background-gradient);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-color);
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20px 40px, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        radial-gradient(1px 1px at 100px 140px, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
        radial-gradient(1px 1px at 180px 80px, rgba(255, 255, 255, 0.26) 0, rgba(255, 255, 255, 0.26) 1px, transparent 1px);
    background-size: 240px 240px, 300px 300px, 360px 360px;
    opacity: 0.4;
    z-index: 0;
    mix-blend-mode: screen;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.container {
    width: min(960px, 92vw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background: linear-gradient(90deg, rgba(24, 28, 69, 0.92) 0%, rgba(129, 16, 82, 0.75) 100%);
    color: #f8f5ff;
    padding: 1.1rem 0;
    box-shadow: 0 10px 30px rgba(4, 6, 18, 0.55);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(114, 127, 204, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #f4f6ff;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: #e5e8ff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(129, 16, 82, 0.15);
    border-color: rgba(229, 232, 255, 0.25);
    box-shadow: 0 12px 24px rgba(4, 6, 18, 0.5);
}

.nav-link.primary {
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 600;
    border-color: rgba(161, 74, 171, 0.5);
    box-shadow: 0 14px 32px rgba(129, 16, 82, 0.55);
}

.nav-link.primary:hover {
    background: var(--gradient-accent-hover);
    border-color: rgba(144, 162, 240, 0.5);
}

.user-chip {
    font-size: 0.95rem;
    color: #d3d9ff;
}

.main {
    flex: 1;
    padding: 4rem 0 3rem;
}

.hero {
    text-align: center;
    margin-bottom: 2.75rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin-bottom: 0.6rem;
    text-shadow: 0 16px 40px rgba(5, 9, 30, 0.65);
}

.hero p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 1.05rem;
    color: var(--muted);
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(129, 16, 82, 0.18), rgba(47, 79, 144, 0.14));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card.focus {
    max-width: 720px;
    margin: 0 auto;
}

.card-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.8rem;
    color: var(--muted-strong);
}

.card-header p {
    margin: 0;
    color: var(--muted);
}

.callout {
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    background: rgba(141, 102, 255, 0.08);
    border: 1px solid rgba(141, 102, 255, 0.3);
    color: #d8d6ff;
}

.callout.warning {
    background: rgba(255, 199, 109, 0.12);
    border: 1px solid rgba(255, 199, 109, 0.35);
    color: #ffe8bd;
}

.callout.error {
    background: rgba(209, 76, 122, 0.16);
    border: 1px solid rgba(209, 76, 122, 0.35);
    color: #ffcadb;
}

.callout a {
    color: #ffdeff;
    font-weight: 600;
}

.secret-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.5rem;
}

.secret-form fieldset:disabled {
    opacity: 0.55;
    filter: saturate(40%);
    cursor: not-allowed;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
}

.form-grid .expires-field {
    width: 100%;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: minmax(0, 11rem) repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .form-grid .expires-field {
        max-width: 9rem;
    }
}

label {
    font-weight: 600;
    color: var(--muted-strong);
}

.hint {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.9rem;
}

.hint.required {
    color: #ff8ca7;
}

input,
textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    background: rgba(9, 14, 38, 0.78);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    color: var(--text-color);
    box-shadow: inset 0 0 0 1px rgba(77, 88, 152, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: rgba(198, 205, 246, 0.5);
}

textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(15, 20, 54, 0.9);
}

.input-with-suffix {
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(9, 14, 38, 0.78);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(77, 88, 152, 0.2);
}

.input-with-suffix input {
    border: none;
    border-radius: 0;
    background: transparent;
    padding-right: 0.5rem;
}

.input-with-suffix .suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    font-weight: 600;
    color: var(--muted);
    border-left: 1px solid var(--border);
    background: rgba(17, 22, 52, 0.9);
}

.help-text {
    font-size: 0.9rem;
    color: var(--muted);
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.78rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.btn.primary {
    background: var(--gradient-accent);
    border-color: rgba(161, 74, 171, 0.6);
    box-shadow: 0 16px 36px rgba(129, 16, 82, 0.6);
    color: #fff;
}

.btn.primary:hover {
    transform: translateY(-2px);
    background: var(--gradient-accent-hover);
    box-shadow: 0 20px 42px rgba(129, 16, 82, 0.65);
}

.btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.secondary {
    background: rgba(129, 16, 82, 0.16);
    color: #f4f6ff;
    border-color: rgba(129, 16, 82, 0.45);
    box-shadow: 0 8px 24px rgba(8, 12, 32, 0.55);
}

.btn.secondary:hover {
    background: rgba(129, 16, 82, 0.26);
    border-color: rgba(166, 97, 196, 0.5);
}

.btn.secondary.copied {
    background: rgba(27, 185, 143, 0.3);
    color: #e4fff6;
    border-color: rgba(27, 185, 143, 0.55);
    box-shadow: 0 14px 32px rgba(27, 185, 143, 0.45);
}

.disclaimer {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.share-panel {
    margin-top: 1.75rem;
}

.share-panel label {
    font-weight: 600;
    margin-bottom: 0.6rem;
    display: block;
    color: var(--muted-strong);
}

.share-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.share-input input {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(9, 14, 38, 0.78);
    font-size: 1rem;
    color: var(--text-color);
    box-shadow: inset 0 0 0 1px rgba(77, 88, 152, 0.2);
}

.share-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    outline: none;
    background: rgba(15, 20, 54, 0.9);
}

.secret-block {
    background: linear-gradient(135deg, rgba(8, 11, 34, 0.92), rgba(9, 12, 40, 0.85));
    color: #e3e8ff;
    padding: 1.5rem;
    border-radius: 18px;
    font-family: "Source Code Pro", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: inset 0 0 0 1px rgba(97, 109, 182, 0.35), 0 20px 40px rgba(4, 6, 18, 0.6);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.meta strong {
    color: var(--muted-strong);
}

.site-footer {
    padding: 3rem 0 3.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
}

a {
    color: #9ec9ff;
    transition: color 0.2s ease;
}

a:hover {
    color: #cbd9ff;
    text-decoration: underline;
}

@media (max-width: 720px) {
    .main {
        padding: 3rem 0 2.5rem;
    }

    .card {
        padding: 1.9rem;
    }

    .share-input {
        flex-direction: column;
        align-items: stretch;
    }

    .share-input .btn {
        width: 100%;
    }

    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
}
