:root {
    --bg: #0f1115;
    --panel: #151922;
    --text: #f5f7fa;
    --muted: #aab3c2;
    --error: #ff0000;
    --success: #2bff00;
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.18);
    --chip-bg: rgba(255, 255, 255, 0.06);
    --button-bg: rgba(255, 255, 255, 0.04);
    --button-bg-hover: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.shell {
    width: min(1280px, 100%);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0.015) 100%);
    box-shadow: var(--shadow);
    text-align: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.headline {
    margin: 0;
    font-size: clamp(2rem, 7vw, 5.5rem);
    line-height: 0.96;
    font-weight: 400;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.card.copied {
    outline: 2px solid rgba(34,197,94,0.6);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.action-vote{
    display: flex;
    gap: 12px;
}

.btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--button-bg);
    color: var(--text);
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        opacity 0.18s ease;
}

.btn:hover {
    background: var(--button-bg-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-down.is-active {
    color: var(--error)
}

.btn-up.is-active {
    color: var(--success)
}

.btn--icon {
    width: 48px;
    min-width: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
    user-select: none;
}

.modal {
    width: min(900px, calc(100vw - 24px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.modal-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.icon-btn {
    appearance: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--button-bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--button-bg-hover);
    border-color: var(--border-strong);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.field-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    padding: 12px 14px;
    outline: none;
}

.input:focus {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    .card {
        gap: 22px;
        padding: 22px 18px;
    }

    .headline {
        max-width: 16ch;
        font-size: clamp(1.7rem, 9vw, 3rem);
        line-height: 1.02;
    }

    .actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        min-height: 44px;
        padding: 0 15px;
        font-size: 0.92rem;
    }

    .btn--icon {
        width: 44px;
        min-width: 44px;
    }

    .modal-card {
        padding: 18px;
    }

    .modal-actions {
        flex-wrap: wrap;
    }

    .modal-actions .btn {
        flex: 1 1 auto;
    }
}