* {
    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(135deg, var(--metalbear-light-grey) 0%, #ffffff 100%);
    min-height: 100vh;
    color: var(--metalbear-black);
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

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

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

.conference-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    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 .logo-img {
    display: block;
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.welcome-banner {
    background: linear-gradient(90deg, var(--metalbear-purple), #8B83F5);
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.4);
    border: 2px solid var(--metalbear-yellow);
}

.welcome-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#conference-name {
    color: var(--metalbear-yellow);
    font-weight: bold;
}

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

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

.title-wrapper {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.5rem;
    color: var(--metalbear-purple);
    text-shadow:
        2px 2px 0 var(--metalbear-yellow),
        -1px -1px 0 var(--metalbear-medium-purple);
    letter-spacing: 2px;
}

.subway-badge {
    display: flex;
    gap: 5px;
}

.line {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.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); }

.main-content {
    flex: 1;
}

.question-card {
    background: white;
    color: var(--metalbear-black);
    padding: 25px 20px;
    border-radius: 12px;
    position: relative;
    margin-bottom: 20px;
    transform: rotate(-1deg);
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.2);
    border: 2px solid var(--metalbear-medium-purple);
}

.staple {
    position: absolute;
    top: 10px;
    width: 20px;
    height: 4px;
    background: linear-gradient(to bottom, #888, #aaa, #888);
    border-radius: 1px;
}

.staple-left { left: 15px; transform: rotate(-5deg); }
.staple-right { right: 15px; transform: rotate(5deg); }

.question {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--metalbear-black);
}

.subtitle {
    font-size: 0.8rem;
    color: var(--metalbear-dark-purple);
    letter-spacing: 3px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: white;
    border: 3px solid var(--metalbear-purple);
    border-radius: 12px;
    color: var(--metalbear-black);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    -webkit-tap-highlight-color: rgba(117, 109, 243, 0.3);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(117, 109, 243, 0.15);
}

.option-btn:hover {
    background: var(--metalbear-purple);
    color: white;
    transform: translateX(5px);
    box-shadow: -5px 5px 0 var(--metalbear-yellow);
}

.option-btn:active {
    transform: translateX(5px) scale(0.98);
}

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

.option-btn:hover .option-icon {
    color: white;
}

.option-text {
    flex: 1;
}

.confirmation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.confirm-card {
    background: white;
    border: 4px solid var(--metalbear-purple);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 350px;
    animation: popIn 0.3s ease-out;
    box-shadow: 0 8px 24px rgba(117, 109, 243, 0.25);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.neon-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--metalbear-purple);
    text-shadow:
        0 0 10px rgba(117, 109, 243, 0.5),
        0 0 20px rgba(117, 109, 243, 0.3);
    margin-bottom: 20px;
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    52% { opacity: 1; }
    54% { opacity: 0.9; }
}

.confirm-choice {
    font-size: 1.1rem;
    color: var(--metalbear-black);
    margin-bottom: 20px;
    padding: 10px;
    background: var(--metalbear-medium-purple);
    border-left: 4px solid var(--metalbear-purple);
    border-radius: 8px;
}

.pizza-icon {
    margin: 20px 0;
}

.thanks {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.3rem;
    color: var(--metalbear-purple);
    margin-bottom: 25px;
}

.results-btn {
    display: inline-block;
    background: var(--metalbear-purple);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(117, 109, 243, 0.4);
    -webkit-tap-highlight-color: rgba(117, 109, 243, 0.3);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.results-btn:hover {
    background: var(--metalbear-yellow);
    color: var(--metalbear-black);
    box-shadow: 0 6px 16px rgba(255, 203, 125, 0.5);
    transform: scale(1.05);
}

.results-btn:active {
    transform: scale(0.98);
}

.footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
}

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

.version {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    opacity: 0.8;
}

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

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

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-card {
    text-align: center;
}

.subway-spinner {
    margin: 0 auto 20px;
}

.token-outer {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--metalbear-purple) 0%, var(--metalbear-yellow) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(117, 109, 243, 0.5);
    animation: spin 1.5s linear infinite;
}

.token-inner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    color: var(--metalbear-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    font-weight: bold;
}

.loading-text {
    color: var(--metalbear-purple);
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error overlay */
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.error-card {
    background: white;
    border: 3px solid var(--metalbear-purple);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(117, 109, 243, 0.3);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

.error-title {
    color: var(--metalbear-purple);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.error-message {
    color: var(--metalbear-black);
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

.retry-btn:hover {
    background: var(--metalbear-yellow);
    color: var(--metalbear-black);
    box-shadow: 0 6px 16px rgba(255, 203, 125, 0.5);
}

.retry-btn:active {
    transform: scale(0.98);
}

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

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

    .title {
        font-size: 2.2rem;
    }

    .question {
        font-size: 1.5rem;
    }

    .option-btn {
        padding: 16px 18px;
        font-size: 0.9rem;
    }

    .confirm-card {
        padding: 30px 25px;
        max-width: 90%;
    }

    .neon-text {
        font-size: 2rem;
    }

    .confirm-choice {
        font-size: 1rem;
    }

    .thanks {
        font-size: 1.2rem;
    }

    .results-btn {
        padding: 12px 35px;
        font-size: 1.2rem;
    }
}

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

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

    .conference-logo img {
        max-width: 90px;
        max-height: 60px;
        border-radius: 6px;
    }

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

    .subway-badge {
        gap: 3px;
    }

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

    .title-wrapper {
        gap: 10px;
        padding: 12px 0;
    }

    .question-card {
        padding: 20px 15px;
    }

    .question {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .options {
        gap: 10px;
    }

    .option-btn {
        padding: 14px 15px;
        font-size: 0.85rem;
        gap: 12px;
    }

    .option-icon {
        min-width: 45px;
        font-size: 1.1rem;
    }

    .confirm-card {
        padding: 25px 20px;
        border: 3px solid var(--taxi-yellow);
    }

    .neon-text {
        font-size: 1.8rem;
    }

    .confirm-choice {
        font-size: 0.95rem;
        padding: 8px;
    }

    .pizza-icon svg {
        width: 50px;
        height: 50px;
    }

    .thanks {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .results-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    .footer-content {
        font-size: 1.1rem;
        padding: 12px;
        flex-direction: column;
        gap: 5px;
    }

    .version {
        font-size: 0.7rem;
    }

    .error-card {
        padding: 30px 20px;
        max-width: 90%;
    }

    .error-title {
        font-size: 1.6rem;
    }

    .error-message {
        font-size: 0.9rem;
    }

    .retry-btn {
        padding: 12px 35px;
        font-size: 1.1rem;
    }

    .token-outer {
        width: 100px;
        height: 100px;
    }

    .token-inner {
        width: 65px;
        height: 65px;
        font-size: 2.5rem;
    }

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

/* Small mobile phones */
@media (max-width: 360px) {
    .title {
        font-size: 1.5rem;
    }

    .question {
        font-size: 1.1rem;
    }

    .option-btn {
        padding: 12px;
        font-size: 0.8rem;
        gap: 10px;
    }

    .option-icon {
        min-width: 40px;
        font-size: 1rem;
    }

    .neon-text {
        font-size: 1.5rem;
    }

    .results-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
}
