@font-face {
    font-family: 'Manbow';
    src: url('Manbow.otf?v=1');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1B1B1B;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    text-align: center;
}

* {
    box-sizing: border-box;
}

.manbow-text {
    font-family: 'Manbow', serif !important;
    font-weight: normal !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
    letter-spacing: 5px;
    color: #D4AF37;
    font-size: 3.5em;
    font-weight: 400;
}

.hidden {
    display: none !important;
}

.contestants {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contestant {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .contestant {
        width: 100%;
        min-width: 0;
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .vs {
        margin: 10px 0;
    }

    h1 {
        font-size: 2.5em;
    }

    .game-layout.result-mode {
        flex-direction: column;
        align-items: center;
    }

    .game-layout.result-mode .media-container {
        width: 100%;
    }

    .result-info {
        width: 100%;
        text-align: center;
        align-items: center;
        margin-top: 15px;
    }

    .rating-controls > div {
        width: 100%;
        gap: 10px !important;
    }

    .vote-btn {
        padding: 15px 10px !important;
        font-size: 1em !important;
        flex: 1;
    }
}

.media-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: #D4AF37;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

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

.game-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.game-layout.result-mode {
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.game-layout.result-mode .media-container {
    width: 50%;
    margin-bottom: 0;
}

.result-info {
    width: 50%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 20px 0;
}

.result-info.hidden {
    display: none;
}

.post-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

.post-author {
    color: #aaa;
    margin-bottom: 20px;
}

.post-author a, .post-title a {
    color: #D4AF37;
    text-decoration: none;
}

.post-author a:hover, .post-title a:hover {
    text-decoration: underline;
}

.next-btn {
    background-color: #2196f3;
    margin-top: 20px;
}

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

.modal-content {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #D4AF37;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: #D4AF37;
    margin-top: 0;
}

.score-final {
    font-size: 2em;
    font-weight: bold;
    color: #4caf50;
}

#username-input {
    font-size: 2em;
    width: 150px;
    text-align: center;
    text-transform: uppercase;
    margin: 20px 0;
    background: #333;
    border: 1px solid #555;
    color: white;
    padding: 10px;
    letter-spacing: 5px;
}

.media-container img, .media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.info {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #aaa;
}

button {
    background-color: #5D0D0D;
    color: white;
    border: 1px solid #D4AF37;
    padding: 10px 20px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    touch-action: manipulation;
    min-height: 48px; /* Better touch target */
}

button:hover {
    background-color: #D4AF37;
    color: #1B1B1B;
}

.vs {
    font-size: 2em;
    font-weight: bold;
    color: #ff4500;
}

.streak-info {
    margin-top: 20px;
    font-size: 1.5em;
}

/* Slider Styling */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #D4AF37;
  cursor: pointer;
  margin-top: -10px;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #444;
  border-radius: 3px;
}

.slider-wrapper {
    background: #1e1e1e;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#rating-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 2px; /* Align centers roughly */
}

/* Rating Buttons */
.rate-btn {
    background-color: transparent;
    color: #888;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rate-btn:hover {
    background-color: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    transform: scale(1.1);
}

.rate-btn.active {
    background-color: #D4AF37;
    color: #1B1B1B;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

#rating-slider {
    width: 100%;
    margin: 0;
    display: block;
}

