* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --metalbear-purple: #756DF3;
    --metalbear-yellow: #FFCB7D;
    --metalbear-black: #000000;
    --metalbear-light-grey: #FAFAFD;
    --metalbear-medium-purple: #E4E3FD;
    --metalbear-dark-purple: #232141;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Space Mono', monospace;
    background: linear-gradient(180deg, var(--metalbear-light-grey) 0%, #ffffff 50%, var(--metalbear-light-grey) 100%);
    min-height: 100vh;
    color: var(--metalbear-black);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
}

.brick-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 58px,
            rgba(117, 109, 243, 0.05) 58px,
            rgba(117, 109, 243, 0.05) 60px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 118px,
            rgba(117, 109, 243, 0.03) 118px,
            rgba(117, 109, 243, 0.03) 120px
        );
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.conference-logo-bottom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.3);
    transform: rotate(3deg);
    border: 2px solid var(--metalbear-purple);
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.conference-logo-bottom .logo-img {
    display: block;
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.header {
    margin-bottom: 15px;
}

.taxi-stripe-top {
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--metalbear-purple),
        var(--metalbear-purple) 40px,
        var(--metalbear-yellow) 40px,
        var(--metalbear-yellow) 80px
    );
    margin-bottom: 12px;
    border-radius: 4px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.subway-lines {
    display: flex;
    gap: 10px;
}

.line {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.line-a { background: var(--metalbear-purple); }
.line-1 { background: var(--metalbear-yellow); color: var(--metalbear-black); }
.line-7 { background: var(--metalbear-medium-purple); color: var(--metalbear-black); }

.title {
    font-family: 'Permanent Marker', cursive;
    font-size: 3rem;
    color: var(--metalbear-purple);
    text-shadow:
        2px 2px 0 var(--metalbear-yellow),
        -1px -1px 0 var(--metalbear-medium-purple),
        0 0 15px rgba(117, 109, 243, 0.3);
    letter-spacing: 3px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 0 var(--metalbear-yellow), -1px -1px 0 var(--metalbear-medium-purple), 0 0 15px rgba(117, 109, 243, 0.3); }
    to { text-shadow: 2px 2px 0 var(--metalbear-yellow), -1px -1px 0 var(--metalbear-medium-purple), 0 0 25px rgba(117, 109, 243, 0.5); }
}

.badge {
    background: var(--metalbear-purple);
    color: white;
    padding: 10px 15px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
}

.badge .heart {
    color: var(--metalbear-yellow);
    animation: pulse 1s infinite;
}

.vote-btn {
    background: var(--metalbear-purple);
    color: white;
    border: 2px solid var(--metalbear-yellow);
    border-radius: 8px;
    padding: 10px 15px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.3);
    text-decoration: none;
}

.vote-btn:hover {
    background: var(--metalbear-yellow);
    color: var(--metalbear-black);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(117, 109, 243, 0.5);
}

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

.reset-btn {
    background: var(--metalbear-yellow);
    color: var(--metalbear-black);
    border: 2px solid var(--metalbear-purple);
    border-radius: 8px;
    padding: 10px 15px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.3);
    -webkit-tap-highlight-color: rgba(117, 109, 243, 0.3);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.reset-btn:hover {
    background: var(--metalbear-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(117, 109, 243, 0.5);
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.question-banner {
    margin-bottom: 20px;
    text-align: center;
}

.neon-border {
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--metalbear-purple) 20%,
        var(--metalbear-yellow) 50%,
        var(--metalbear-purple) 80%,
        transparent 100%);
    box-shadow: 0 0 10px rgba(117, 109, 243, 0.4);
}

.question {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    padding: 15px;
    color: var(--metalbear-black);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.results-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: white;
    border-left: 4px solid var(--metalbear-purple);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(117, 109, 243, 0.1);
    transition: all 0.3s ease;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 420px;
    min-width: 420px;
    max-width: 420px;
}

.result-icon {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--metalbear-purple);
    min-width: 60px;
    text-align: center;
}

.result-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--metalbear-black);
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 45px;
    background: var(--metalbear-light-grey);
    border: 2px solid var(--metalbear-medium-purple);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease-out;
    position: relative;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.2) 100%);
}

.bar-yellow {
    background: linear-gradient(90deg, var(--metalbear-purple), #6B63E8);
    box-shadow: 0 0 20px rgba(117, 109, 243, 0.3);
}

.bar-pink {
    background: linear-gradient(90deg, var(--metalbear-yellow), #FFD699);
    box-shadow: 0 0 20px rgba(255, 203, 125, 0.3);
}

.bar-green {
    background: linear-gradient(90deg, var(--metalbear-medium-purple), #F0EFFD);
    box-shadow: 0 0 20px rgba(228, 227, 253, 0.3);
}

.bar-blue {
    background: linear-gradient(90deg, var(--metalbear-purple), var(--metalbear-yellow));
    box-shadow: 0 0 20px rgba(117, 109, 243, 0.3);
}

.bar-orange {
    background: linear-gradient(90deg, #9B94F7, var(--metalbear-purple));
    box-shadow: 0 0 20px rgba(117, 109, 243, 0.3);
}

.bar-count {
    position: absolute;
    right: 15px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--metalbear-black);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.footer {
    margin-top: auto;
    padding-top: 15px;
}

.pool-status {
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--metalbear-black);
    margin-bottom: 10px;
    padding: 8px 15px;
    background: white;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(117, 109, 243, 0.15);
}

.pool-label {
    margin-right: 10px;
    opacity: 0.7;
}

.pool-indicator {
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--metalbear-medium-purple);
    color: var(--metalbear-purple);
    transition: all 0.3s ease;
}

.pool-indicator.pool-warning {
    background: var(--metalbear-yellow);
    color: var(--metalbear-black);
    animation: pulse-warning 1s infinite;
}

.pool-indicator.pool-critical {
    background: #FF6B6B;
    color: white;
    animation: pulse-critical 0.5s infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-critical {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
}

.total-votes {
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--metalbear-purple);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(117, 109, 243, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.total-votes #total-count {
    font-size: 2.5rem;
    color: var(--metalbear-yellow);
    text-shadow: 0 0 15px rgba(255, 203, 125, 0.4);
}

.total-votes .version {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.6;
    text-shadow: none;
}

.taxi-stripe-bottom {
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--metalbear-purple),
        var(--metalbear-purple) 40px,
        var(--metalbear-yellow) 40px,
        var(--metalbear-yellow) 80px
    );
    border-radius: 4px;
}

/* Error banner */
.error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--metalbear-purple);
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(117, 109, 243, 0.5);
    animation: slideDown 0.3s ease;
}

.error-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.error-icon {
    font-size: 1.5rem;
    animation: shake 0.5s infinite;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Tablet optimization */
@media (max-width: 1024px) {
    .container {
        padding: 15px 20px;
    }

    .title {
        font-size: 2.5rem;
    }

    .question {
        font-size: 1.6rem;
    }

    .result-label {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }

    .result-text {
        font-size: 1rem;
    }

    .bar-count {
        font-size: 1.6rem;
    }
}

/* Mobile landscape and smaller tablets */
@media (max-width: 768px) {
    .container {
        padding: 12px 15px;
    }

    .conference-logo-bottom {
        bottom: 15px;
        right: 15px;
        padding: 8px;
    }

    .conference-logo-bottom img {
        max-width: 100px;
        max-height: 65px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .line {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .badge {
        font-size: 1.1rem;
        padding: 8px 12px;
    }

    .reset-btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .question {
        font-size: 1.4rem;
        padding: 12px;
    }

    .result-row {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        align-items: stretch;
    }

    .result-label {
        min-width: unset;
        width: 100%;
        justify-content: space-between;
    }

    .result-text {
        font-size: 0.95rem;
        flex: 1;
    }

    .result-icon {
        min-width: 50px;
        font-size: 1.2rem;
    }

    .bar-container {
        width: 100%;
        height: 50px;
        min-width: 100%;
        position: relative;
        justify-content: flex-end;
        padding-right: 10px;
    }

    .bar {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
    }

    .bar-count {
        position: relative;
        display: inline-block;
        font-size: 1.5rem;
        font-weight: bold;
        background: var(--metalbear-purple);
        color: white;
        padding: 6px 16px;
        border-radius: 20px;
        min-width: 50px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(117, 109, 243, 0.3);
        z-index: 10;
    }

    .pool-status {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .total-votes {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 8px;
    }

    .total-votes #total-count {
        font-size: 2rem;
    }

    .total-votes .version {
        font-size: 0.8rem;
    }
}

/* Mobile phone portrait */
@media (max-width: 480px) {
    .container {
        padding: 10px 12px;
    }

    .conference-logo-bottom {
        bottom: 10px;
        right: 10px;
        padding: 6px;
        border-radius: 10px;
    }

    .conference-logo-bottom img {
        max-width: 80px;
        max-height: 50px;
        border-radius: 6px;
    }

    .subway-lines {
        gap: 8px;
    }

    .line {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }

    .title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .badge {
        font-size: 1rem;
        padding: 8px 10px;
        gap: 4px;
    }

    .reset-btn {
        font-size: 0.85rem;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .question {
        font-size: 1.2rem;
        padding: 10px;
    }

    .results-grid {
        gap: 12px;
    }

    .result-row {
        padding: 12px;
        gap: 10px;
    }

    .result-label {
        gap: 10px;
        justify-content: space-between;
    }

    .result-icon {
        min-width: 40px;
        font-size: 1.1rem;
    }

    .result-text {
        font-size: 0.9rem;
        flex: 1;
    }

    .bar-container {
        height: 45px;
        min-width: 100%;
        justify-content: flex-end;
        padding-right: 10px;
    }

    .bar {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
    }

    .bar-count {
        position: relative;
        display: inline-block;
        font-size: 1.4rem;
        font-weight: bold;
        background: var(--metalbear-purple);
        color: white;
        padding: 6px 14px;
        border-radius: 18px;
        min-width: 45px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(117, 109, 243, 0.3);
        z-index: 10;
    }

    .pool-status {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .total-votes {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .total-votes #total-count {
        font-size: 1.8rem;
    }

    .total-votes .version {
        font-size: 0.7rem;
    }

    .error-content {
        font-size: 1rem;
        padding: 0 10px;
    }

    .error-icon {
        font-size: 1.3rem;
    }
}

/* Small mobile phones */
@media (max-width: 360px) {
    .container {
        padding: 8px 10px;
    }

    .title {
        font-size: 1.5rem;
    }

    .line {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }

    .badge {
        font-size: 0.9rem;
        padding: 6px 8px;
    }

    .reset-btn {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    .question {
        font-size: 1rem;
        padding: 8px;
    }

    .result-text {
        font-size: 0.85rem;
        flex: 1;
    }

    .result-icon {
        min-width: 35px;
        font-size: 1rem;
    }

    .bar-container {
        height: 40px;
        min-width: 100%;
        justify-content: flex-end;
        padding-right: 8px;
    }

    .bar {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
    }

    .bar-count {
        position: relative;
        display: inline-block;
        font-size: 1.2rem;
        font-weight: bold;
        background: var(--metalbear-purple);
        color: white;
        padding: 5px 12px;
        border-radius: 16px;
        min-width: 40px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(117, 109, 243, 0.3);
        z-index: 10;
    }

    .pool-status {
        font-size: 0.85rem;
        margin-bottom: 5px;
        padding: 6px 10px;
    }

    .pool-indicator {
        padding: 3px 10px;
        font-size: 0.9rem;
    }

    .total-votes {
        font-size: 1.2rem;
    }

    .total-votes #total-count {
        font-size: 1.5rem;
    }
}
