/* Premium Interactive Polls and This OR That Styles */

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* General container styling */
.boxes {
    margin-bottom: 40px !important;
}

.interactive-section {
    margin-bottom: 5px;
}

.poll-limit-info {
    font-size: 0.8em;
    opacity: 0.65;
    font-weight: 700;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

/* POLL SYSTEM STYLING */
.poll-question {
    font-size: 1.35em;
    font-weight: 800;
    margin-bottom: 22px;
    line-height: 1.4;
    color: var(--text-accent);
    letter-spacing: -0.02em;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.poll-option-item {
    position: relative;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md, 12px);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode .poll-option-item {
    background: rgba(34, 34, 34, 0.2);
}

.poll-option-item:hover,
.poll-option-item:has(.poll-option-input:checked) {
    border-color: #888;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.35);
}

body.dark-mode .poll-option-item:hover,
body.dark-mode .poll-option-item:has(.poll-option-input:checked) {
    border-color: #777;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(42, 42, 42, 0.4);
}

.poll-option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.poll-option-label {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    user-select: none;
    gap: 12px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.poll-radio-visual {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
    background: rgba(0, 0, 0, 0.02);
}

.poll-option-input:checked+.poll-option-label .poll-radio-visual {
    border-color: var(--text-primary);
    background: var(--bg-boxes);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.poll-radio-visual::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bold-gradient);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.poll-option-input:checked+.poll-option-label .poll-radio-visual::after {
    opacity: 1;
    transform: scale(1);
}


.poll-checkbox-visual {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-input);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
    background: rgba(0, 0, 0, 0.02);
}

.poll-option-input:checked+.poll-option-label .poll-checkbox-visual {
    border-color: var(--text-primary);
    background: var(--bg-boxes);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.poll-checkbox-visual::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--bold-gradient);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.poll-option-input:checked+.poll-option-label .poll-checkbox-visual::after {
    opacity: 1;
    transform: scale(1);
}

.poll-option-input:checked+.poll-option-label {
    color: inherit;
}

.poll-result-item {
    margin-bottom: 8px;
    padding: 2px 0;
}

.poll-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 10.5pt;
    font-weight: 700;
}

.poll-result-text {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.poll-result-stats {
    opacity: 0.9;
    font-variant-numeric: tabular-nums;
}

.poll-progress-bar-bg {
    height: 18px;
    background: var(--bg-boxes-alt-2);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-input);
}

body.dark-mode .poll-progress-bar-bg {
    background: #2b2b2b;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-input);
}

.poll-progress-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 16s linear infinite;
    border-radius: 30px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

body.dark-mode .poll-progress-bar-fill {
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
}

.poll-result-form {
    display: block;
    width: 100%;
}

.poll-result-item-btn {
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 8px;
    padding: 4px 8px;
    margin: 0 -8px;
}

.poll-result-item-btn:hover {
    transform: translateX(4px);
    background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .poll-result-item-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.poll-result-item-btn:hover .poll-result-text {
    color: var(--link-color);
}

.poll-result-item-btn.chosen .poll-result-text {
    font-weight: 800;
}

.poll-result-item-static {
    border-radius: 8px;
    padding: 4px 8px;
    margin: 0 -8px;
}

.poll-result-item-static.chosen .poll-result-text {
    font-weight: 800;
}

.boxes .item {
    position: relative;
}

.total-votes-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.85em;
    font-weight: 700;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    transition: opacity 0.2s ease;
    border: 1px solid var(--border-input);
}

body.dark-mode .total-votes-badge {
    background: rgba(43, 43, 43, 0.3);
    border-color: var(--border-input);
}

.total-votes-badge.past-votes-badge {
    position: static;
    margin-right: 0;
    top: auto;
    right: auto;
    font-size: 0.75em;
    padding: 3px 8px;
    opacity: 0.8;
}

.tot-side-container {
    display: flex;
    gap: 24px;
    align-items: stretch;
    justify-content: center;
    position: relative;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .tot-side-container {
        flex-direction: column;
        gap: 20px;
    }
}

.tot-side-form {
    flex: 1;
    display: flex;
}

.tot-side-card {
    flex: 1;
    min-height: 90px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md, 12px);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 14px 14px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-soft);
    width: 100%;
}

body.dark-mode .tot-side-card {
    background: rgba(42, 42, 42, 0.2);
}

.tot-side-card:hover {
    border-color: #888;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.35);
}

body.dark-mode .tot-side-card:hover {
    border-color: #777;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(42, 42, 42, 0.4);
}

.tot-side-content {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tot-side-option-text {
    font-size: 1.35em;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.tot-side-hover-label {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 4;
}

.tot-side-card:not(.voted):hover .tot-side-hover-label {
    opacity: 1;
    transform: translateY(0);
}

.tot-side-card.voted .tot-side-hover-label {
    display: none;
}

.tot-side-fill-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 16s linear infinite;
    opacity: 0.15;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

body.dark-mode .tot-side-fill-bar {
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    opacity: 0.18;
}

.tot-side-card.chosen {
    border-color: var(--text-primary);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

.tot-side-card.voted {
    padding: 14px !important;
    position: relative;
}

.tot-side-checkmark {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    font-size: 13px !important;
    margin: 0 !important;
}

body.dark-mode .tot-side-card.chosen {
    border-color: var(--text-primary);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.tot-side-card.chosen .tot-side-option-text {
    font-weight: 800;
}

.tot-side-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}

.tot-side-percent {
    font-size: 1.3em;
    font-weight: 800;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 16s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.95)) drop-shadow(0px 0px 1.5px rgba(0, 0, 0, 0.65));
}

body.dark-mode .tot-side-percent {
    filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.6)) drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.4));
}

.tot-side-votes {
    font-size: 0.8em;
    opacity: 0.6;
    font-weight: 600;
}

.tot-vs-divider-side {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-boxes);
    border: 2px solid var(--border-input);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-handwritten-header);
    font-size: 0.95em;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    user-select: none;
    pointer-events: none;
    transition: all 0.3s ease;
    align-self: center;
    margin: 0 -19px;
    flex-shrink: 0;
}

body.dark-mode .tot-vs-divider-side {
    background: var(--bg-boxes-alt);
    border-color: var(--border-input);
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tot-side-form:hover+.tot-vs-divider-side,
.tot-side-container:has(.tot-side-form:hover) .tot-vs-divider-side {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    border-color: #888;
}

body.dark-mode .tot-side-container:has(.tot-side-form:hover) .tot-vs-divider-side {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
    border-color: #777;
}

@media (max-width: 768px) {
    .tot-vs-divider-side {
        margin: -19px 0;
        align-self: center;
    }
}

.past-results-scrollbox,
.manage-interactive-scrollbox {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
    margin-top: 15px;
}

.past-results-scrollbox::-webkit-scrollbar,
.manage-interactive-scrollbox::-webkit-scrollbar {
    width: 6px;
}

.past-results-scrollbox::-webkit-scrollbar-thumb,
.manage-interactive-scrollbox::-webkit-scrollbar-thumb {
    background: var(--border-input);
    border-radius: 10px;
}

.past-results-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 1024px) {
    .past-results-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .past-results-list {
        grid-template-columns: 1fr;
    }
}

.past-result-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transition: border-color 0.3s ease;
    container-type: inline-size;
}

body.dark-mode .past-result-card {
    background: rgba(42, 42, 42, 0.15);
}

.past-result-header-bar {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    gap: 15px;
}

.past-result-header-left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.past-result-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 3px;
}



.past-result-header-bar:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .past-result-header-bar:hover {
    background: rgba(255, 255, 255, 0.02);
}

.past-result-type-badge {
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-boxes-alt-2);
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--text-primary);
    border: 1px solid var(--border-input);
}

.past-result-card .past-result-type-badge {
    font-size: 7pt;
    padding: 2px 6px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 3.5px;
}

.category-badge,
.category-miscellaneous,
.past-result-type-badge.category-miscellaneous {
    background: rgba(140, 96, 169, 0.1);
    color: #8c60a9;
    border-color: rgba(140, 96, 169, 0.3);
}

.category-gaming,
.past-result-type-badge.category-gaming {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border-color: rgba(52, 152, 219, 0.3);
}

.category-daily,
.past-result-type-badge.category-daily {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: rgba(46, 204, 113, 0.3);
}

.category-personal,
.past-result-type-badge.category-personal {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border-color: rgba(231, 76, 60, 0.3);
}

.category-webdesign,
.past-result-type-badge.category-webdesign {
    background: rgba(230, 126, 34, 0.1);
    color: #d35400;
    border-color: rgba(230, 126, 34, 0.3);
}

body.dark-mode .past-result-type-badge {
    background: #333;
}

.past-result-type-badge.choice-type-badge {
    background: rgba(120, 120, 120, 0.12) !important;
    color: #888888 !important;
    border-color: rgba(120, 120, 120, 0.3) !important;
}

body.dark-mode .past-result-type-badge.choice-type-badge {
    background: rgba(160, 160, 160, 0.15) !important;
    color: #aaaaaa !important;
    border-color: rgba(160, 160, 160, 0.3) !important;
}

.poll-cooldown-badge {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #d97706 !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

body.dark-mode .poll-cooldown-badge {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
}

@keyframes cdPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

.poll-cooldown-badge .fa-stopwatch {
    animation: cdPulse 1.5s ease-in-out infinite;
}

.poll-cooldown-badge .cooldown-label {
    font-weight: 800;
    letter-spacing: 0.08em;
}

body.dark-mode .category-badge,
body.dark-mode .category-miscellaneous,
body.dark-mode .past-result-type-badge.category-miscellaneous {
    background: rgba(217, 194, 237, 0.15);
    color: #d9c2ed;
    border-color: rgba(217, 194, 237, 0.3);
}

body.dark-mode .category-gaming,
body.dark-mode .past-result-type-badge.category-gaming {
    background: rgba(142, 204, 240, 0.15);
    color: #9cd4f8;
    border-color: rgba(142, 204, 240, 0.3);
}

body.dark-mode .category-daily,
body.dark-mode .past-result-type-badge.category-daily {
    background: rgba(162, 235, 192, 0.15);
    color: #b3f0cc;
    border-color: rgba(162, 235, 192, 0.3);
}

body.dark-mode .category-personal,
body.dark-mode .past-result-type-badge.category-personal {
    background: rgba(245, 159, 149, 0.15);
    color: #ffb5ad;
    border-color: rgba(245, 159, 149, 0.3);
}

body.dark-mode .category-webdesign,
body.dark-mode .past-result-type-badge.category-webdesign {
    background: rgba(243, 182, 128, 0.15);
    color: #ffd2a8;
    border-color: rgba(243, 182, 128, 0.3);
}

.past-result-details {
    border-top: 1px solid var(--border-input);
    background: rgba(0, 0, 0, 0.01);
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

body.dark-mode .past-result-details {
    background: rgba(255, 255, 255, 0.01);
}

.past-result-details-inner {
    padding: 20px;
}

.past-result-card.active .past-result-details {
    display: block;
}

.past-result-chevron {
    transition: transform 0.3s ease;
}

.past-result-card.active .past-result-chevron {
    transform: rotate(180deg);
}

.past-poll-results-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 4px;
    align-items: center;
}

.past-result-option-pill {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid var(--border-input);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.68em;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
}

body.dark-mode .past-result-option-pill {
    background: rgba(43, 43, 43, 0.25);
    border-color: var(--border-input);
}

.past-result-option-pill strong {
    color: var(--text-primary);
}

.past-result-option-pill.lost {
    opacity: 0.45;
    position: relative;
    overflow: hidden;
}

.past-result-option-pill.lost::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1.5px;
    background: currentColor;
    transform: translateY(-50%);
    pointer-events: none;
}

.past-result-option-pill.winner {
    border-color: #999;
    background: var(--bg-boxes-alt-2);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .past-result-option-pill.winner {
    border-color: #555;
    background: #2b2b2b;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}

.past-result-option-pill.winner strong {
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 16s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(1px 1px 0.5px rgba(0, 0, 0, 0.4));
}


.total-votes-label {
    text-align: center;
    font-size: 10pt;
    opacity: 0.75;
    margin-top: 16px;
    font-weight: 600;
}

.styled-btn-wrap {
    margin-top: 15px;
}

.section-subheader {
    font-size: 1.05em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    margin: 32px 0 12px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subheader i {
    font-size: 0.95em;
}

.info-highlight {
    font-weight: 800;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--gradient-text-shadow) !important;
}

.poll-toast {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background: var(--bg-boxes, #fff);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-input, #ccc);
    padding: 10px 20px 10px 14px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    font-size: 0.9em;
    font-weight: 700;
    display: flex;
    align-items: center;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}

body.dark-mode .poll-toast {
    background: var(--bg-boxes-alt, #222);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.poll-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.poll-toast.success {
    color: var(--notif-success-color, #4CAF50) !important;
    background: rgba(76, 175, 80, 0.08) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

body.dark-mode .poll-toast.success {
    background: rgba(76, 175, 80, 0.16) !important;
    border-color: rgba(76, 175, 80, 0.45) !important;
}

.poll-toast.error {
    color: var(--notif-error-color, #f44336) !important;
    background: rgba(244, 67, 54, 0.08) !important;
    border-color: rgba(244, 67, 54, 0.35) !important;
}

body.dark-mode .poll-toast.error {
    background: rgba(244, 67, 54, 0.16) !important;
    border-color: rgba(244, 67, 54, 0.45) !important;
}

.poll-toast i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 11px;
    flex-shrink: 0;
}

.poll-toast.error i {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: var(--notif-error-color, #f44336) !important;
    -webkit-text-fill-color: var(--notif-error-color, #f44336) !important;
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.95), 0px 1px 1.5px rgba(0, 0, 0, 0.45) !important;
}

body.dark-mode .poll-toast.error i {
    text-shadow: none !important;
}

.polls-masonry-container {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.polls-masonry-col {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}




@media (max-width: 768px) {
    .polls-masonry-container {
        flex-direction: column;
        gap: 20px;
    }
}

.interactive-tab-panel {
    background-color: var(--bg-boxes);
    background-image: var(--box-bg);
    background-repeat: repeat;
    background-position: top left;
    background-size: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm, 12px);
    padding: 0 var(--padding-boxes, 25px) var(--padding-boxes, 25px);
    margin-top: 30px;
    margin-bottom: 30px;
    overflow: hidden;
}

.interactive-tabs-container {
    display: flex;
    gap: 0;
    margin: 0 calc(-1 * var(--padding-boxes, 25px));
    border-bottom: 2px solid var(--border-input);
    padding-bottom: 0;
    padding-top: 0;
    align-items: flex-end;
    width: calc(100% + 2 * var(--padding-boxes, 25px));
    border-top-left-radius: var(--radius-sm, 12px);
    border-top-right-radius: var(--radius-sm, 12px);
    overflow: hidden;
}

.interactive-tab {
    background: transparent;
    border: none;
    border-bottom: none;
    border-right: 1px solid var(--border-input);
    color: var(--text-secondary, #888);
    padding: 10px 22px 11px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    user-select: none;
    position: relative;
    margin-right: 0;
    margin-bottom: -2px;
    z-index: 1;
    letter-spacing: 0.01em;
}

body.dark-mode .interactive-tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    border-right-color: rgba(255, 255, 255, 0.1);
}

.interactive-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    animation: none !important;
    text-shadow: none !important;
}

.interactive-tab:hover::before,
.interactive-tab::before {
    opacity: 0 !important;
    animation: none !important;
}

body.dark-mode .interactive-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
}

.interactive-tab.active {
    background: transparent;
    color: var(--text-primary);
    border-color: transparent;
    border-right-color: var(--border-input);
    border-bottom: 2px solid var(--bg-boxes);
    z-index: 3;
    font-weight: 800;
}

body.dark-mode .interactive-tab.active {
    background: transparent;
    border-color: transparent;
    border-right-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--bg-boxes);
}


.interactive-tab .tab-badge {
    background: var(--bg-boxes-alt-2);
    color: var(--text-secondary);
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 800;
    border: 1px solid var(--border-input);
    transition: background 0.2s ease, color 0.2s ease;
}

.interactive-tab.active .tab-badge {
    background: var(--bg-boxes-alt-2);
    color: var(--text-primary);
    border-color: var(--border-input);
}

body.dark-mode .interactive-tab.active .tab-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.tab-section-content {
    padding: 24px 20px 20px;
}

.voted-indicator {
    color: var(--notif-success-color, #4CAF50);
    background: rgba(76, 175, 80, 0.06);
    border: 1px solid rgba(76, 175, 80, 0.24);
    font-weight: 700;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 5px 12px 5px 8px;
    border-radius: 20px;
    margin-bottom: 5px;
}

body.dark-mode .voted-indicator {
    color: var(--notif-success-color, #4CAF50);
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
}

.voted-indicator i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Reset browser button defaults so button.tab-item looks identical to a.tab-item */
button.tab-item {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: var(--font-size-body);
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Count badge inside tab-item tabs */
.tab-item .pill-badge {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 0.78em;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 800;
    line-height: 1.6;
    display: inline-block;
}

.tab-item.active .pill-badge {
    background: rgba(255, 255, 255, 0.25);
}

.tie-badge,
.past-result-type-badge.tie-badge {
    background: rgba(241, 196, 15, 0.08) !important;
    color: #e67e22 !important;
    border-color: rgba(241, 196, 15, 0.35) !important;
}

body.dark-mode .tie-badge,
body.dark-mode .past-result-type-badge.tie-badge {
    background: rgba(254, 211, 48, 0.12) !important;
    color: #fed330 !important;
    border-color: rgba(254, 211, 48, 0.3) !important;
}


.poll-option-label i,
.poll-result-text i,
.tot-side-option-text i,
.poll-opt-row i,
.poll-icon-preview i,
.poll-opt-icon,
.interactive-preview-box i {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: currentcolor !important;
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.95), 0px 1px 1.5px rgba(0, 0, 0, 0.45) !important;
    font-size: 1.25em !important;
    vertical-align: middle !important;
}

body.dark-mode .poll-option-label i,
body.dark-mode .poll-result-text i,
body.dark-mode .tot-side-option-text i,
body.dark-mode .poll-opt-row i,
body.dark-mode .poll-icon-preview i,
body.dark-mode .poll-opt-icon,
body.dark-mode .interactive-preview-box i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), var(--gradient-text-shadow) !important;
}


.poll-result-text i.fa-check,
.tot-side-checkmark,
.tot-side-card.voted .tot-side-checkmark,
.voted-indicator i,
.poll-toast.success i {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: var(--color-success, #4CAF50) !important;
    -webkit-text-fill-color: var(--color-success, #4CAF50) !important;
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.95), 0px 1px 1.5px rgba(0, 0, 0, 0.45) !important;
}

body.dark-mode .poll-result-text i.fa-check,
body.dark-mode .tot-side-checkmark,
body.dark-mode .tot-side-card.voted .tot-side-checkmark,
body.dark-mode .voted-indicator i,
body.dark-mode .poll-toast.success i {
    text-shadow: none !important;
}


.poll-icon-preview i {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}


.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.category-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md, 12px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-soft);
    user-select: none;
}

body.dark-mode .category-card {
    background: rgba(42, 42, 42, 0.2);
}

.category-card:hover {
    border-color: #888;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

body.dark-mode .category-card:hover {
    border-color: #777;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(42, 42, 42, 0.35);
}

.category-card.active {
    background: var(--bg-button, #ffc1cb) !important;
    color: var(--text-button, #fff) !important;
    border-color: var(--border-input) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

.category-card.active .category-card-name {
    color: var(--text-button, #fff) !important;
}

.category-card.active .category-card-count {
    color: var(--text-button, #fff) !important;
    opacity: 0.85;
}

.category-card.active .category-card-icon i {
    color: var(--text-button, #fff) !important;
}

.category-card-icon {
    font-size: 1.4em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-input);
    transition: all 0.3s ease;
}

body.dark-mode .category-card-icon {
    background: rgba(0, 0, 0, 0.25);
}

.category-card-icon i {
    color: var(--text-primary);
}

.category-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.category-card-name {
    font-weight: 700;
    font-size: 0.95em;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-card-count {
    font-size: 0.78em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 1px;
}

/* Additional Category Badge Colors */
.category-web-design,
.past-result-type-badge.category-web-design {
    background: rgba(230, 126, 34, 0.1);
    color: #d35400;
    border-color: rgba(230, 126, 34, 0.3);
}

body.dark-mode .category-web-design,
body.dark-mode .past-result-type-badge.category-web-design {
    background: rgba(243, 182, 128, 0.15);
    color: #ffd2a8;
    border-color: rgba(243, 182, 128, 0.3);
}

.category-internet-tech,
.category-internet-\&-tech,
.past-result-type-badge.category-internet-tech,
.past-result-type-badge.category-internet-\&-tech {
    background: rgba(22, 160, 133, 0.1);
    color: #16a085;
    border-color: rgba(22, 160, 133, 0.3);
}

body.dark-mode .category-internet-tech,
body.dark-mode .category-internet-\&-tech,
body.dark-mode .past-result-type-badge.category-internet-tech,
body.dark-mode .past-result-type-badge.category-internet-\&-tech {
    background: rgba(163, 228, 215, 0.15);
    color: #a3e4d7;
    border-color: rgba(163, 228, 215, 0.3);
}

.category-creativity,
.past-result-type-badge.category-creativity {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.3);
}

body.dark-mode .category-creativity,
body.dark-mode .past-result-type-badge.category-creativity {
    background: rgba(210, 180, 222, 0.15);
    color: #d2b4de;
    border-color: rgba(210, 180, 222, 0.3);
}

.category-daily-life,
.past-result-type-badge.category-daily-life {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: rgba(46, 204, 113, 0.3);
}

body.dark-mode .category-daily-life,
body.dark-mode .past-result-type-badge.category-daily-life {
    background: rgba(162, 235, 192, 0.15);
    color: #b3f0cc;
    border-color: rgba(162, 235, 192, 0.3);
}

.category-entertainment,
.past-result-type-badge.category-entertainment {
    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;
    border-color: rgba(233, 30, 99, 0.3);
}

body.dark-mode .category-entertainment,
body.dark-mode .past-result-type-badge.category-entertainment {
    background: rgba(244, 141, 161, 0.15);
    color: #ff8da1;
    border-color: rgba(244, 141, 161, 0.3);
}

.category-fantasy,
.past-result-type-badge.category-fantasy {
    background: rgba(63, 81, 181, 0.1);
    color: #3f51b5;
    border-color: rgba(63, 81, 181, 0.3);
}

body.dark-mode .category-fantasy,
body.dark-mode .past-result-type-badge.category-fantasy {
    background: rgba(165, 180, 252, 0.15);
    color: #a5b4fc;
    border-color: rgba(165, 180, 252, 0.3);
}

.category-random,
.past-result-type-badge.category-random {
    background: rgba(127, 140, 141, 0.1);
    color: #7f8c8d;
    border-color: rgba(127, 140, 141, 0.3);
}

body.dark-mode .category-random,
body.dark-mode .past-result-type-badge.category-random {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.3);
}

/* QUIZ SYSTEM STYLING */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.quiz-progress-text {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.quiz-progress-container {
    height: 8px;
    background: var(--bg-boxes-alt-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--border-input);
}

body.dark-mode .quiz-progress-container {
    background: #2b2b2b;
}

.quiz-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 16s linear infinite;
    transition: width 0.4s ease;
}

.quiz-question-container {
    display: none;
}

.quiz-question-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.quiz-submit-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

/* Quiz Score Screen */
.quiz-score-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.quiz-score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--border-input);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    margin-bottom: 15px;
    box-shadow: var(--shadow-soft);
}

body.dark-mode .quiz-score-circle {
    background: rgba(43, 43, 43, 0.3);
    border-color: var(--border-input);
}

.quiz-score-num {
    font-size: 2.8em;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(90deg, #ffc1cb, #ffd6a0, #bde6f3, #d9c2ed, #baf2c9, #ffc1cb);
    background-size: 200% 100%;
    animation: rainbowFlow 8s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-score-total {
    font-size: 1.1em;
    font-weight: 700;
    opacity: 0.7;
    margin-top: 4px;
}

.quiz-result-heading {
    font-size: 1.8em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
}

.quiz-result-message {
    text-align: center;
    opacity: 0.8;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-breakdown-title {
    font-size: 1.25em;
    font-weight: 800;
    margin: 30px 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.quiz-breakdown-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md, 12px);
    padding: 16px 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-soft);
}

body.dark-mode .quiz-breakdown-card {
    background: rgba(42, 42, 42, 0.15);
}

.quiz-breakdown-card.correct {
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.04);
}

body.dark-mode .quiz-breakdown-card.correct {
    background: rgba(76, 175, 80, 0.08);
}

.quiz-breakdown-card.incorrect {
    border-color: rgba(244, 67, 54, 0.4);
    background: rgba(244, 67, 54, 0.04);
}

body.dark-mode .quiz-breakdown-card.incorrect {
    background: rgba(244, 67, 54, 0.08);
}

.quiz-breakdown-question {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.quiz-breakdown-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quiz-breakdown-option {
    font-size: 0.92em;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-breakdown-option.selected-correct {
    background: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.25);
}

body.dark-mode .quiz-breakdown-option.selected-correct {
    color: #81c784;
}

.quiz-breakdown-option.selected-incorrect {
    background: rgba(244, 67, 54, 0.12);
    color: #c62828;
    border-color: rgba(244, 67, 54, 0.25);
}

body.dark-mode .quiz-breakdown-option.selected-incorrect {
    color: #e57373;
}

.quiz-breakdown-option.correct-answer {
    background: rgba(76, 175, 80, 0.08);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.15);
    font-style: italic;
}

body.dark-mode .quiz-breakdown-option.correct-answer {
    color: #81c784;
}

.quiz-breakdown-option.normal {
    opacity: 0.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tighter layout spacing for interactive sections under the 'All' tab */
#tab-content-polls .section-subheader {
    margin-top: 12px !important;
}
#tab-content-polls .polls-masonry-container {
    margin-bottom: 20px !important;
}
#tab-content-tots .section-subheader {
    margin-top: 10px !important;
}