
/* 1. Reset and global settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #070b18;
    --bg-card: rgba(18, 27, 52, 0.82);
    --bg-input: #0b1226;
    --blue: #4388ff;
    --purple: #9b5cff;
    --text-main: #f1f5ff;
    --text-muted: #a3aecb;
    --border: rgba(130, 160, 255, 0.18);
    --success: #35d99a;
    --danger: #ff6482;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    padding: 35px 18px;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.7;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(67, 136, 255, 0.19),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 25%,
            rgba(155, 92, 255, 0.19),
            transparent 35%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(33, 74, 170, 0.16),
            transparent 40%
        ),
        var(--bg-dark);

    background-size: 160% 160%;
    animation: backgroundGlow 16s ease-in-out infinite alternate;
}

/* 2. Animated background */
@keyframes backgroundGlow {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 30% 100%;
    }
}

/* 3. Main page container */
.container {
    width: 100%;
    max-width: 900px;
    margin: 35px auto;
    padding: 32px;

    background: rgba(12, 19, 39, 0.78);
    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.35),
        0 0 35px rgba(67, 136, 255, 0.07);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    animation: fadeIn 0.6s ease both;
}

/* 4. Page entrance animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Page heading */
.header {
    margin-bottom: 25px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.header h1 {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: clamp(25px, 4vw, 34px);
    font-weight: 750;
    letter-spacing: -0.8px;
}

.header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* 6. General headings and paragraphs */
h1,
h2,
h3 {
    line-height: 1.3;
}

h2 {
    margin: 12px 0;
    color: var(--text-main);
    font-size: 22px;
}

h3 {
    color: var(--text-main);
}

p {
    margin: 10px 0;
    color: var(--text-muted);
}

/* 7. Poll cards */
.poll {
    margin: 18px 0;
    padding: 24px;

    background: linear-gradient(
        135deg,
        rgba(24, 36, 68, 0.92),
        rgba(14, 22, 45, 0.92)
    );

    border: 1px solid var(--border);
    border-radius: 17px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.poll:hover {
    transform: translateY(-3px);
    border-color: rgba(67, 136, 255, 0.55);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        0 0 22px rgba(67, 136, 255, 0.08);
}

.poll h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

/* 8. Form labels */
label {
    display: block;
    margin: 13px 0 6px;
    color: #dce5ff;
    font-weight: 600;
}

/* 9. Text fields and dropdowns */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    margin: 6px 0 16px;
    padding: 13px 15px;

    color: var(--text-main);
    background: var(--bg-input);

    border: 1px solid var(--border);
    border-radius: 10px;

    font: inherit;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #7482a5;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--blue);
    background: #0d1731;

    box-shadow: 0 0 0 3px rgba(67, 136, 255, 0.15);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* 10. Radio buttons and checkboxes */
input[type="radio"],
input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-right: 9px;
    accent-color: var(--blue);
    cursor: pointer;
    vertical-align: middle;
}

/* Keep poll options neatly aligned */
.poll label:has(input[type="radio"]),
.poll label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 12px 0;
    padding: 10px 12px;

    background: rgba(255, 255, 255, 0.025);
    border: 1px solid transparent;
    border-radius: 9px;

    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.poll label:has(input[type="radio"]):hover,
.poll label:has(input[type="checkbox"]):hover {
    background: rgba(67, 136, 255, 0.08);
    border-color: var(--border);
}

/* 11. Buttons */
button,
input[type="submit"] {
    display: inline-block;
    padding: 12px 22px;

    color: #ffffff;
    background: linear-gradient(110deg, var(--blue), var(--purple));

    border: none;
    border-radius: 10px;

    font: inherit;
    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 5px 18px rgba(91, 105, 255, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);

    box-shadow: 0 8px 25px rgba(91, 105, 255, 0.35);
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* 12. Links */
a {
    color: #83aaff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #c3a4ff;
    text-decoration: underline;
}

/* 13. Links inside poll cards */
.poll a {
    display: inline-block;
    margin: 5px 10px 5px 0;
}

/* 14. Vote results and status messages */
.success {
    padding: 13px 16px;
    color: var(--success);
    background: rgba(53, 217, 154, 0.09);
    border: 1px solid rgba(53, 217, 154, 0.25);
    border-radius: 10px;
}

.error {
    padding: 13px 16px;
    color: var(--danger);
    background: rgba(255, 100, 130, 0.09);
    border: 1px solid rgba(255, 100, 130, 0.25);
    border-radius: 10px;
}

/* 15. Tables, if used on admin pages */
table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
}

th,
td {
    padding: 13px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: #dce5ff;
    background: rgba(67, 136, 255, 0.12);
}

td {
    color: var(--text-muted);
}

tr:hover td {
    background: rgba(67, 136, 255, 0.04);
}

/* 16. Horizontal lines */
hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

/* 17. Mobile and tablet layout */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .container {
        margin: 12px auto;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .poll {
        padding: 17px;
    }

    .header h1 {
        font-size: 27px;
    }

    button,
    input[type="submit"] {
        max-width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* 18. Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}


/* =====================================
   PREMIUM AVAILABLE POLLS PAGE
   ===================================== */

.brand-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #8daeff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
}

.poll-section-heading {
    margin: 30px 0 16px;
}

.poll-section-heading h2 {
    margin-bottom: 4px;
    font-size: 21px;
}

.poll-section-heading p {
    margin-top: 0;
    font-size: 14px;
}

.poll-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.poll-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.poll-badge {
    padding: 5px 10px;
    color: #8df6d1;
    background: rgba(53, 217, 154, 0.09);
    border: 1px solid rgba(53, 217, 154, 0.22);
    border-radius: 30px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.poll-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #c6b2ff;
    background: rgba(155, 92, 255, 0.14);
    border: 1px solid rgba(155, 92, 255, 0.25);
    border-radius: 12px;
    font-size: 23px;
}

.poll .poll-description {
    margin: 10px 0 22px;
    font-size: 14px;
}

.poll-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 16px;
    color: #ffffff;
    background: linear-gradient(110deg, #4388ff, #8957f5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-link:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 105, 255, 0.3);
}

.secondary-link {
    font-size: 14px;
    font-weight: 600;
}

.empty-polls {
    text-align: center;
    padding: 35px 20px;
}

.empty-icon {
    margin-bottom: 12px;
    color: #a78bfa;
    font-size: 42px;
}

.dashboard-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(130, 160, 255, 0.18);
}

.dashboard-footer span {
    color: #8492b5;
    font-size: 13px;
}

.dashboard-footer a {
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .poll-list {
        grid-template-columns: 1fr;
    }

    .poll-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .button-link {
        width: 100%;
    }
}


/* =========================================
   PREMIUM POLL RESULTS
========================================= */

.eyebrow {
    color: #8bbcff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.result-card {
    margin-top: 25px;
}

.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 20px 0 25px;
    padding: 18px 20px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 14px;
}

.results-summary span {
    color: #cbd5e1;
}

.results-summary strong {
    color: #ffffff;
    font-size: 28px;
}

.result-option {
    margin: 22px 0;
}

.result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #f1f5f9;
    font-weight: 600;
}

.result-label strong {
    color: #a5b4fc;
    white-space: nowrap;
}

.result-bar {
    width: 100%;
    height: 11px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.17);
    border-radius: 50px;
}

.result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);
    border-radius: 50px;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.6);
    animation: resultFill 1.1s ease-out;
}

.result-votes {
    margin-top: 7px;
    color: #94a3b8;
    font-size: 13px;
}

.vote-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 25px;
}

.page-footer {
    margin-top: 30px;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}

@keyframes resultFill {
    from {
        width: 0;
    }

    to {
        width: var(--result-width, 100%);
    }
}

@media (max-width: 600px) {
    .result-label {
        font-size: 14px;
    }

    .results-summary strong {
        font-size: 24px;
    }
}


/* Admin dashboard statistics */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.stat-card {
    padding: 22px;
    border: 1px solid rgba(110, 150, 255, 0.3);
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(37, 75, 150, 0.4),
        rgba(100, 45, 155, 0.25)
    );
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 22px rgba(80, 120, 255, 0.2);
}
.stat-card p {
    color: #c5d4f7;
    margin: 0 0 10px;
}
.stat-card h2 {
    font-size: 32px;
    margin: 0;
    color: #ffffff;
}
@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

