:root {
    --dark-grey: #151516;
    --light-grey: #1e1e20;
    --gold: #efbd41;
    --border-grey: #38383b;
    --text-grey: #96969C;
    --text-background-grey: #2a2a2d;
    --color-bg: var(--dark-grey);
    --color-container: var(--light-grey);
    --color-header: var(--gold);
    --color-text: #f0f0f0;
    --color-accent: var(--gold);
    --color-accent-hover: var(--gold);
    --color-btn-text: #151516;
    --color-btn-hover-text: #111;
    --color-btn-hover: #99761E;
    --max-width: 1920px; 
}

@font-face {
    font-family: 'BoldPixels';
    src: url('/static/BoldPixels.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

.hidden {
    display: none !important;
}

html {
    cursor: url('/static/cursor.png'), auto;
}

a:hover, button:hover, .answer-bar:hover {
    cursor: url('/static/cursor-hover.png'), auto;
}

body {
    background-color: var(--dark-grey);
    background-image: url('/static/background-tile.png');
    background-repeat: repeat;
    background-attachment: fixed;
    font-family: 'DejaVu Sans Mono', 'Menlo', 'Consolas', 'Monaco', 'Liberation Mono', 'Courier New', monospace;
    color: var(--color-text);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    gap: 0;
    max-width: var(--max-width);
    width: 100%; 
}

.left-panel {
    background: rgba(30, 30, 32, 0.90);
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--border-grey);
}

.question-header {
    margin-bottom: 30px;
}

.question-counter {
    padding: 8px 14px;
    font-size: 0.85em;
    line-height: 1.4;
    text-align: center;
    color: var(--text-grey);
    background: var(--text-background-grey);
    border: 1px solid var(--border-grey);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
    user-select: none;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    font-weight: 200;
    color: var(--color-header);
    font-family: 'BoldPixels', sans-serif;
    line-height: 1.2;
    margin-bottom: 10px;
}

.answers-list {
    flex: 1;
    margin-bottom: 30px;
}

.answer-item {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.answer-bar {
    background: var(--text-background-grey);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.answer-bar:hover {
    background: var(--light-grey);
    border-color: inherit;
    transform: translateX(8px) scale(1.02);
}

.answer-bar.selected {
    box-shadow: 0 0 0 3px var(--gold),
                0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translateX(8px) scale(1.02);
    background: #242427;
}


.answer-bar.selected .answer-rank {
    transform: scale(1.15);
}


.answer-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answer-text {
    font-size: 1.1em;
    font-weight: 500;
    min-height: 1.2em;
    flex: 1;
}

.answer-stats {
    display: flex;
    flex-direction: column;
    flex: 0 0 100px;
    align-items: flex-end;
    gap: 5px;
}

.vote-count {
    color: var(--text-grey);
    font-size: 0.9em;
}

.vote-percentage {
    color: var(--gold);
    font-size: 1.3em;
    font-weight: 600;
}

.skipped-info {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.info-box {
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 0.9em;
    font-weight: 500;
    background: var(--text-background-grey);
    transition: all 0.25s ease;
    cursor: default;
    user-select: none;
}

.total-votes {
    border: 2px solid var(--gold);
    color: var(--gold);
}

.total-votes:hover {
    background: var(--gold);
    color: var(--color-btn-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.skipped-votes {
    border: 2px solid var(--text-grey);
    color: var(--text-grey);
}

.skipped-votes:hover {
    background: var(--text-grey);
    color: var(--color-btn-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: auto;
}

.nav-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: url('/static/cursor-hover.png'), auto;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.navigation a {
    text-decoration: none;
}

.main-btn {
    background: var(--color-accent);
    color: var(--color-btn-text);
}

.main-btn:hover:not(:disabled) {
    background: var(--color-btn-hover);
    color: var(--color-btn-hover-text);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.main-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.main-btn::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.main-btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.skip-btn {
    background: var(--text-background-grey);
    color: var(--text-grey);
    border: 1px solid var(--border-grey);
    padding: 10px 28px;
    font-size: 1.05em;
    opacity: 0.85;
}

.skip-btn:hover:not(:disabled) {
    background: var(--border-grey);
    color: var(--color-text);
    transform: translateY(-1px) scale(1.01);
    opacity: 1;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.right-panel {
    background: rgba(21, 21, 22, 0.85);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.media-preview {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 30, 32, 0.85);
    border-bottom: 2px solid var(--border-grey);
    overflow: auto;
    min-height: 400px;
}

.media-preview .placeholder {
    color: var(--text-grey);
    font-size: 1.2em;
    text-align: center;
}

.media-preview img {
    max-height: 80%;
    max-width: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.media-preview img.clickable-image {
    cursor: url('/static/cursor-hover.png'), auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-preview img.clickable-image:hover {
    transform: scale(1.02);
}

.media-preview iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.media-preview blockquote {
    max-width: 800px;
    padding: 25px 35px;
    background: var(--text-background-grey);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--color-text);
    font-style: normal;
    text-align: left;
    max-height: calc(100% - 40px); 
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    
}

.media-preview blockquote br {
    display: block;
    content: "";
    margin-top: 8px;
}

.media-link {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-btn-text);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
}

.media-link:hover {
    background: var(--color-btn-hover);
    transform: translateY(-2px);
}

.comments-section {
    flex: 1;
    background: rgba(30, 30, 32, 0.85);
    padding: 30px;
    overflow-y: auto;
}

.comments-section h3 {
    color: var(--gold);
    font-size: 1.5em;
    margin-bottom: 20px;
    font-family: 'BoldPixels', sans-serif;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    background: var(--text-background-grey);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    line-height: 1.5;
    margin-bottom: 10px;
}

.comments-list .placeholder {
    color: var(--text-grey);
    text-align: center;
    padding: 20px;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: url('/static/cursor.png'), auto;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    z-index: 10000;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#modalImage {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

@media (max-width: 1400px) {
    h1 {
        font-size: 2em;
    }
    
    .left-panel, .right-panel {
        padding: 30px;
    }
}

@media (max-width: 1200px) {
    .results-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        overflow-y: auto;
    }
    
    body {
        overflow: auto;
    }
    
    .left-panel {
        border-right: none;
        border-bottom: 2px solid var(--border-grey);
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .right-panel {
        position: static;
        min-height: 50vh;
    }
    
    .media-preview {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .left-panel, .right-panel {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .answer-text {
        font-size: 1em;
    }
    
    .vote-percentage {
        font-size: 1.1em;
    }
    
    .navigation {
        flex-direction: column-reverse;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .skipped-info {
        flex-direction: column;
        width: 100%;
    }

    .info-box {
        width: 100%;
        text-align: center;
        font-size: 0.95em;
        padding: 12px 10px;
    }

    .answer-rank {
        min-width: 28px;
        height: 28px;
        font-size: 0.9em;
    }

    .rank-1 {
        transform: scale(1.02);
    }

    .rank-2 {
        transform: scale(1.01);
    }

    .answer-bar.selected {
        transform: scale(1.01);
    }

    .answer-bar.selected:hover {
        transform: scale(1.01);
    }
    
    .trophy-icon {
        width: 28px;
        height: 28px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
    
    #modalImage {
        max-width: 100vw;
        max-height: 100vh;
    }
}

.custom-answers {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-grey);
}

.custom-answers-title {
    color: var(--gold);
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'BoldPixels', sans-serif;
}

.answer-media {
    display: none;
    width: 100%;
    height: 100%;
}

.answer-media.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.answer-comments {
    display: none;
}

.answer-comments.active {
    display: block;
}

.dzidzia {
    max-width: 200px;
}

.answer-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trophy-icon {
    width: 55px;
    height: 70px;
    object-fit: contain;
    animation: trophy-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 3px 6px rgba(239, 189, 65, 0.6));
    margin-left: -6px;
}

@keyframes trophy-entrance {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.answer-rank {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: bold;
    background: var(--border-grey);
    color: var(--text-grey);
    transition: all 0.3s ease;
}


.rank-1 {
    border: 2px solid var(--gold);
    transform: scale(1.03);
    margin: 4px 0;
}

.rank-1 .answer-rank {
    background: var(--gold);
    color: var(--color-btn-text);
}

.rank-1 .answer-text {
    font-size: 1.05em;
    font-weight: 600;
}

.rank-2 {
    border: 2px solid #C0C0C0;
    transform: scale(1.02);
}

.rank-2 .answer-rank {
    background: #C0C0C0;
    color: #111;
}

.rank-3 {
    border: 2px solid #CD7F32;
}

.rank-3 .answer-rank {
    background: #CD7F32;
    color: #111;
}

.rank-1:hover {
    box-shadow: 0 0 14px rgba(239, 189, 65, 0.45);
    transform: scale(1.05) translateX(8px);
}

.rank-2:hover {
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.4);
}

.rank-3:hover {
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.4);
}

.rank-1.selected {
    box-shadow: 0 0 0 3px var(--gold),
                0 10px 24px rgba(239, 189, 65, 0.55);
    transform: scale(1.05) translateX(8px);
}

.rank-2.selected {
    box-shadow: 0 0 0 3px #C0C0C0,
                0 10px 24px rgba(192, 192, 192, 0.5);
}

.rank-3.selected {
    box-shadow: 0 0 0 3px #CD7F32,
                0 10px 24px rgba(205, 127, 50, 0.5);
}

.answer-hidden-content {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.answer-bar.selected .answer-hidden-content {
    opacity: 1;
    pointer-events: auto;
}

.answer-bar.revealed .answer-hidden-content,
.answer-bar.revealed .stats-hidden {
    opacity: 1;
    pointer-events: auto;
}

.answer-placeholder {
    color: var(--text-grey);
    font-style: italic;
    opacity: 0.8;
}

.answer-hidden-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.answer-bar.revealed .answer-hidden-content,
.answer-bar.revealed .stats-hidden {
    opacity: 1;
}

.answer-bar.revealed .answer-placeholder {
    display: none;
}

/* Over 9000! */
.question-16 .over-9000 {
    display: block;
    font-size: 1.6em;
    font-weight: 900;
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: #ffffff;
    text-shadow: 
        -2px -2px 0 #ff0000,
        2px -2px 0 #00ff00,
        -2px 2px 0 #0000ff,
        2px 2px 0 #ffff00,
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 0, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4);
    animation: mlg-rainbow 0.5s ease-in-out infinite, mlg-shake 0.1s ease-in-out infinite;
    letter-spacing: 0.1em;
}

.question-16 .actual-percentage {
    display: block;
    font-size: 0.65em;
    color: var(--gold);
    margin-top: 4px;
    font-weight: 400;
    font-family: 'DejaVu Sans Mono', monospace;
    transform: rotate(0deg);
    text-align: center;
}

@keyframes mlg-rainbow {
    0% {
        filter: hue-rotate(0deg) drop-shadow(0 0 5px #ff00ff);
    }
    25% {
        filter: hue-rotate(90deg) drop-shadow(0 0 5px #00ff00);
    }
    50% {
        filter: hue-rotate(180deg) drop-shadow(0 0 5px #00ffff);
    }
    75% {
        filter: hue-rotate(270deg) drop-shadow(0 0 5px #ffff00);
    }
    100% {
        filter: hue-rotate(360deg) drop-shadow(0 0 5px #ff00ff);
    }
}

@keyframes mlg-shake {
    0% {
        transform: rotate(-5deg) translate(0px, 0px);
    }
    25% {
        transform: rotate(-4deg) translate(1px, -1px);
    }
    50% {
        transform: rotate(-6deg) translate(-1px, 1px);
    }
    75% {
        transform: rotate(-4.5deg) translate(1px, 0px);
    }
    100% {
        transform: rotate(-5deg) translate(0px, 0px);
    }
}