:root {
    --bg: radial-gradient(circle at 18% 12%, #2a0000 0%, #120000 40%, #030303 100%);
    --panel: rgba(18, 18, 18, 0.92);
    --text: #f8f8f8;
    --muted: #e7a3a3;
    --line: #471010;
    --accent: #d61a1a;
    --accent-dark: #a50f0f;
    --bar: linear-gradient(90deg, #d81e1e, #6f0000);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.app-shell,
.vote-shell {
    width: min(1100px, 94vw);
    margin: 1.6rem auto 2.4rem;
}

.hero {
    color: #fff;
    margin-bottom: 1rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: 0.03em;
}

.brand-banner {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-logo {
    width: clamp(115px, 15vw, 165px);
    height: auto;
    object-fit: contain;
}

.brand-title {
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 43, 43, 0.28);
}

.hero-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.95rem;
    color: #ffd2d2;
}

.hero p {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    opacity: 0.95;
}

.hero-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.share-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.share-btn {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero.compact h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: 0 14px 34px rgba(13, 27, 42, 0.24);
}

.card h2 {
    margin: 0 0 0.8rem;
    color: #ffd0d0;
}

.form-grid,
.vote-form {
    display: grid;
    gap: 0.8rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

input[type="text"],
textarea {
    width: 100%;
    border: 1px solid #7a2323;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    font-size: 0.98rem;
    font-family: inherit;
    background: #140808;
    color: #fff;
}

textarea {
    resize: vertical;
}

button,
.link-btn {
    border: none;
    border-radius: 10px;
    padding: 0.7rem 0.95rem;
    font-size: 0.98rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: transform 0.1s ease, background 0.2s ease;
}

button:hover,
.link-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.poll-list {
    display: grid;
    gap: 0.7rem;
}

.poll-row {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: #170909;
}

.poll-row h3 {
    margin: 0;
    font-size: 1.05rem;
}

.split {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.qr-image {
    width: min(260px, 100%);
    height: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.link-stack {
    margin-top: 0.75rem;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

.bars {
    display: grid;
    gap: 0.8rem;
}

.bar-row {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.65rem;
    background: #140808;
}

.bar-label {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.bar-track {
    height: 20px;
    background: #2b0d0d;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: var(--bar);
    transition: width 0.45s ease;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.text-link {
    color: #ffdede;
}

.muted {
    color: var(--muted);
}

.alert {
    background: rgba(239, 131, 84, 0.22);
    border: 1px solid rgba(239, 131, 84, 0.48);
    color: #fff;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.vote-shell {
    max-width: 640px;
}

.vote-shell h1 {
    color: #fff;
    margin-bottom: 0.8rem;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.vote-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.72rem;
    background: #140808;
}

.vote-hero {
    margin-bottom: 1rem;
}

.vote-footer {
    margin-top: 1.15rem;
    text-align: center;
    color: #ffc4c4;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.85rem;
    border-top: 1px solid #4a1111;
}

.vote-hero .brand-logo {
    width: clamp(72px, 8vw, 96px);
}

.vote-hero .brand-title {
    font-size: clamp(1.2rem, 1.8vw, 1.65rem);
    letter-spacing: 0.05em;
}

.vote-hero p {
    margin-top: 0.55rem;
    font-size: clamp(1.45rem, 2.8vw, 2.05rem);
    font-weight: 700;
    text-align: center;
    color: #ffe0e0;
}

.footer-pill {
    border: 1px solid #6b1b1b;
    border-radius: 999px;
    padding: 0.24rem 0.56rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffe0e0;
    background: rgba(214, 26, 26, 0.18);
}

.footer-sep {
    color: #a95b5b;
}

.footer-text {
    color: #ffd6d6;
}

.success {
    color: #fff;
    background: rgba(5, 130, 202, 0.5);
    border: 1px solid rgba(5, 130, 202, 0.7);
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
}

@media (max-width: 720px) {
    .hero-head {
        align-items: flex-start;
    }

    .share-actions {
        width: 100%;
    }

    .results-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .poll-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
