/* ============================================
   FillMeUp — Light Liquid Glass
   ============================================ */

:root {
    --bg: #edf3ff;
    --bg-secondary: #f8fbff;
    --bg-card: rgba(255, 255, 255, 0.66);
    --bg-card-strong: rgba(255, 255, 255, 0.82);
    --bg-input: rgba(255, 255, 255, 0.72);
    --border: rgba(146, 167, 205, 0.34);
    --border-strong: rgba(126, 150, 194, 0.45);
    --border-focus: #5b8bff;
    --text: #173156;
    --text-muted: #5f7596;
    --accent: #4f7fff;
    --accent-hover: #3f70f5;
    --success: #2f9f6c;
    --error: #dd4d63;
    --warning: #c98a2e;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow: 0 20px 46px rgba(45, 79, 133, 0.16);
    --shadow-soft: 0 10px 30px rgba(66, 102, 161, 0.12);
    --glass-blur: 16px;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --transition: 0.25s ease;
    --container: 1080px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-ui);
    color: var(--text);
    line-height: 1.62;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% -4%, rgba(113, 179, 255, 0.3), transparent 28%),
        radial-gradient(circle at 86% 10%, rgba(198, 140, 255, 0.22), transparent 35%),
        radial-gradient(circle at 74% 82%, rgba(121, 228, 206, 0.24), transparent 33%),
        linear-gradient(160deg, #f7fbff 0%, #eaf1ff 50%, #ecf8ff 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

body::before {
    width: 460px;
    height: 460px;
    top: -170px;
    left: -160px;
    background: radial-gradient(circle, rgba(147, 202, 255, 0.42) 0%, rgba(147, 202, 255, 0) 72%);
}

body::after {
    width: 520px;
    height: 520px;
    right: -210px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(155, 212, 239, 0.35) 0%, rgba(155, 212, 239, 0) 72%);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

.muted {
    color: var(--text-muted);
}

/* =================== HEADER =================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.24rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.015em;
}

.header__logo:hover {
    color: var(--text);
}

.header__logo-img {
    width: auto;
    height: 30px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(76, 119, 194, 0.2);
}

.accent {
    color: var(--accent);
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 1.05rem;
}

.header__link {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    transition: color var(--transition), background-color var(--transition);
}

.header__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.header__user {
    position: relative;
}

.header__username {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(136, 164, 210, 0.27);
}

.header__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card-strong);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(var(--glass-blur));
}

.header__dropdown a:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.header__dropdown a:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.header__user:hover .header__dropdown,
.header__user:focus-within .header__dropdown {
    display: block;
}

.header__dropdown a {
    display: block;
    padding: 0.62rem 0.95rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header__dropdown a:hover {
    color: var(--text);
    background: rgba(83, 125, 211, 0.09);
}

.header__burger {
    display: none;
    padding: 0.45rem;
    border: none;
    background: transparent;
    cursor: pointer;
}

.header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 3px;
    background: var(--text);
}

.header__burger span + span {
    margin-top: 4px;
}

/* =================== MAIN/FOOTER =================== */

.main {
    flex: 1;
    padding: 2.2rem 0 2.7rem;
}

.footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    font-size: 0.86rem;
    color: var(--text-muted);
}

.footer__inner {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* =================== TYPOGRAPHY/SECTIONS =================== */

.paste-title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.38rem, 2.2vw, 1.72rem);
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #163054;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.page-head--wrap {
    flex-wrap: wrap;
    align-items: flex-start;
}

.section-subtitle {
    margin-bottom: 1.3rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.section-title-sm {
    font-size: 1.08rem;
    font-weight: 700;
}

.section-block {
    margin-top: 2.5rem;
}

.section-actions {
    margin-top: 1rem;
}

.stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.actions-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions-inline--end {
    justify-content: flex-end;
}

.inline-form {
    margin: 0;
}

/* =================== BUTTONS =================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    padding: 0.62rem 1.2rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--accent {
    color: #fff;
    background: linear-gradient(135deg, #6a93ff 0%, #4f7fff 55%, #4a72e8 100%);
    box-shadow: 0 10px 22px rgba(79, 127, 255, 0.3);
}

.btn--accent:hover {
    color: #fff;
    box-shadow: 0 14px 28px rgba(79, 127, 255, 0.35);
}

.btn--outline {
    color: var(--text);
    background: rgba(255, 255, 255, 0.56);
    border-color: var(--border-strong);
}

.btn--outline:hover {
    color: var(--accent);
    border-color: rgba(79, 127, 255, 0.42);
}

.btn--danger {
    color: #fff;
    background: linear-gradient(135deg, #e66379 0%, #d74f66 100%);
    box-shadow: 0 10px 22px rgba(215, 79, 102, 0.28);
}

.btn--danger:hover {
    color: #fff;
}

.btn--sm {
    padding: 0.46rem 0.86rem;
    font-size: 0.8rem;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    min-width: 34px;
    padding-inline: 0.7rem;
}

/* =================== FORMS =================== */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.87rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    padding: 0.7rem 0.92rem;
    font-size: 0.95rem;
    font-family: var(--font-ui);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #95a7c0;
}

.form-textarea {
    min-height: 300px;
    resize: vertical;
    tab-size: 4;
    line-height: 1.55;
    font-size: 0.88rem;
    font-family: var(--font-mono);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--border-focus);
    box-shadow:
        0 0 0 4px rgba(79, 127, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.88);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235f7596' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.84rem center;
    padding-right: 2.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.95rem;
}

.form-hint {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.81rem;
}

/* =================== CARDS =================== */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.card--hover {
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card--hover:hover {
    transform: translateY(-2px);
    border-color: rgba(90, 130, 205, 0.45);
    box-shadow: 0 24px 44px rgba(46, 83, 146, 0.2);
}

.card--spaced {
    margin-bottom: 1.5rem;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1a355f;
}

.auth-title {
    margin-bottom: 1.4rem;
    text-align: center;
    font-size: 1.28rem;
}

.auth-note {
    margin-bottom: 1.3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* =================== ALERTS/BADGES =================== */

.alert {
    margin: 1rem 0;
    padding: 0.82rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
}

.alert--error {
    color: #9f2239;
    background: rgba(255, 233, 237, 0.82);
    border-color: rgba(221, 77, 99, 0.3);
}

.alert--success {
    color: #1e7a52;
    background: rgba(227, 250, 240, 0.84);
    border-color: rgba(47, 159, 108, 0.32);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.56rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge--public {
    color: var(--success);
    background: rgba(47, 159, 108, 0.16);
}

.badge--unlisted {
    color: var(--warning);
    background: rgba(201, 138, 46, 0.18);
}

.badge--private {
    color: var(--error);
    background: rgba(221, 77, 99, 0.16);
}

.badge--syntax,
.badge--password {
    color: var(--accent);
    background: rgba(79, 127, 255, 0.17);
}

/* =================== TABLE/PAGINATION =================== */

.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(9px);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: rgba(92, 137, 219, 0.07);
}

th,
td {
    padding: 0.72rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(151, 175, 214, 0.29);
}

th {
    color: #54719a;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: rgba(129, 163, 228, 0.07);
}

.link-strong {
    font-weight: 600;
}

.link-strong + .badge {
    margin-left: 0.35rem;
}

.pagination {
    margin-top: 1.7rem;
    display: flex;
    justify-content: center;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.83rem;
    background: rgba(255, 255, 255, 0.6);
}

.pagination a:hover {
    border-color: rgba(79, 127, 255, 0.4);
    color: var(--accent);
}

.pagination .active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #7098ff 0%, #4f7fff 100%);
}

/* =================== CODE VIEW =================== */

.code-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.66);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0.72rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.62);
    color: var(--text-muted);
    font-size: 0.84rem;
}

.code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem;
}

.code-actions .btn {
    padding: 0.36rem 0.72rem;
    font-size: 0.78rem;
}

.code-body {
    display: flex;
    overflow-x: auto;
}

.code-lines {
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: rgba(100, 137, 204, 0.08);
    color: #6c81a0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.62;
    user-select: none;
    padding: 0.96rem 0;
}

.code-lines span {
    display: block;
    padding: 0 0.75rem;
}

.code-content {
    flex: 1;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    padding: 0.96rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.62;
    background: transparent !important;
}

.code-content code {
    font-family: var(--font-mono);
    background: transparent !important;
}

/* =================== META/EMPTY/TABS =================== */

.paste-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem 1rem;
    margin-bottom: 0.95rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.paste-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
}

.empty-state--wide {
    padding: 5rem 1rem;
}

.empty-state__icon {
    margin-bottom: 1rem;
    font-size: 3rem;
    opacity: 0.6;
}

.empty-state__title {
    margin-bottom: 0.52rem;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

.tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tabs a {
    margin-bottom: -1px;
    padding: 0.66rem 1rem;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.tabs a:hover {
    color: var(--text);
}

.tabs a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* =================== AUTH/PASSWORD =================== */

.auth-wrap,
.password-wrap {
    max-width: 430px;
    margin: 2.1rem auto;
}

.password-wrap {
    text-align: center;
}

.password-wrap .form-group {
    text-align: left;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer--stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* =================== RESPONSIVE =================== */

@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        background: #edf3ff;
    }

    .header__nav.open {
        display: flex;
    }

    .header__nav a,
    .header__nav .btn,
    .header__user {
        width: 100%;
        text-align: center;
    }

    .header__username {
        width: 100%;
        justify-content: center;
    }

    .header__dropdown {
        position: static;
        display: block;
        margin-top: 0.35rem;
    }

    .header__burger {
        display: block;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .code-header {
        align-items: flex-start;
    }

    .footer__inner {
        min-height: 70px;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .main {
        padding: 1.2rem 0 1.8rem;
    }

    .card {
        padding: 1rem;
    }

    .paste-title {
        font-size: 1.22rem;
    }
}
