* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.role-selection {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.role-button {
    display: block;
    background: white;
    padding: 40px 60px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    min-width: 250px;
}

.role-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.role-button h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #667eea;
}

.role-button p {
    color: #666;
    font-size: 1.1em;
}

.admin-link-container {
    text-align: center;
    margin-top: 30px;
}

.admin-link-small-text {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.admin-link-small-text:hover {
    color: rgba(255,255,255,0.8);
    text-decoration: underline;
}

/* Host View */
.host-view {
    background: #1a1a2e;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.host-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(102, 126, 234, 0.9);
    border: none;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.menu-toggle:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.1);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-icon {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.host-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    transition: all 0.3s;
}

.host-header.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    z-index: 999;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    display: none !important;
}

.host-header.hidden.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    display: flex !important;
}

.host-header h1 {
    font-size: 2em;
    margin: 0;
}

.host-controls {
    display: flex;
    gap: 15px;
}

.control-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #5568d3;
}

.control-btn:active {
    transform: scale(0.95);
}

.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

.voting-screen-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.round-info {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.round-info h2 {
    font-size: 2em;
    margin-bottom: 5px;
}

.round-info p {
    font-size: 1em;
    margin: 5px 0;
}

.countdown-display {
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.countdown-number {
    font-size: 5em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255,107,107,0.5);
    animation: pulse 1s infinite;
}

.countdown-number.hidden {
    visibility: hidden;
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.image-pair-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.image-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3vw;
    width: 100%;
    height: 100%;
    flex-wrap: nowrap;
}

.image-container {
    flex: 1;
    max-width: 45%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: calc(100% - 60px); /* Account for label space */
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 5px solid white;
}

.image-label {
    font-size: 1.5em;
    margin-top: 15px;
    font-weight: bold;
}

.vote-count {
    transition: opacity 0.5s ease-in;
    font-size: 1.2em;
    margin-top: 10px;
    color: #ffd700;
}

.vs-divider {
    font-size: 3em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255,107,107,0.5);
}

.live-votes {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.vote-bars {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.vote-bar {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 15px;
}

.bar-fill {
    height: 30px;
    background: #667eea;
    border-radius: 5px;
    margin-top: 10px;
    transition: width 0.3s;
}

.result-pair-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.result-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3vw;
    width: 100%;
    height: 100%;
    flex-wrap: nowrap;
}

.result-container {
    flex: 1;
    max-width: 45%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
    transition: transform 0.5s ease-out;
}

.result-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100% - 100px); /* Account for label and vote count space */
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 5px solid white;
    transition: all 0.5s ease-out;
}

.result-container.winner img {
    border: 5px solid #4ade80;
    box-shadow: 0 10px 40px rgba(74,222,128,0.5);
}

.result-container.loser img {
    border: 5px solid #ef4444;
    opacity: 0.6;
}

/* Wiggle animation - softer and smoother */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-1.5deg); }
    75% { transform: rotate(1.5deg); }
}

.result-container.wiggle {
    animation: wiggle 0.3s ease-in-out infinite;
    will-change: transform;
}

.result-container.wiggle img {
    /* Don't apply wiggle to image itself, let container handle it */
    transform: none !important;
}

/* Scale animations */
.result-container.scale-up {
    transform: scale(1.2);
    z-index: 10;
}

.result-container.scale-up img {
    transform: scale(1.2);
    box-shadow: 0 15px 50px rgba(74,222,128,0.7);
}

.result-container.scale-down {
    transform: scale(0.25);
    opacity: 0.5;
}

.result-container.scale-down img {
    transform: scale(0.25);
    opacity: 0.5;
}

.result-label {
    font-size: 1.5em;
    margin-top: 15px;
    font-weight: bold;
    transition: opacity 0.5s ease-in;
}

.result-container.winner .result-label {
    color: #4ade80;
}

.result-container.loser .result-label {
    color: #ef4444;
}

.player-list {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.player-list h3 {
    margin-bottom: 15px;
}

.player-list div {
    padding: 8px;
    margin: 5px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.player-scores, .final-scores {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.scores-list {
    margin-top: 15px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin: 8px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 1.1em;
}

.score-item.highlight {
    background: rgba(255,215,0,0.3);
    border: 2px solid #ffd700;
}

.next-round-message {
    text-align: center;
    font-size: 1.2em;
    margin-top: 30px;
    color: #ffd700;
}

.next-battle-controls {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
}

.next-battle-controls .large-btn {
    padding: 20px 50px;
    font-size: 1.5em;
    font-weight: bold;
    min-width: 300px;
}

.next-round-hint {
    margin-top: 15px;
    color: rgba(255,255,255,0.6);
    font-size: 0.9em;
    font-style: italic;
}

.auto-advanced-display {
    text-align: center;
    margin: 40px 0;
}

.auto-advanced-display h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #ffd700;
}

.auto-advanced-message {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #ffd700;
    font-style: italic;
}

.auto-advanced-display .image-container {
    max-width: 600px;
    margin: 0 auto;
}

.auto-advanced-display .image-container img {
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    border: 5px solid #ffd700;
    box-shadow: 0 10px 40px rgba(255,215,0,0.5);
}

#finishedScreen {
    padding: 40px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
}

#finishedScreen h2 {
    font-size: 3em;
    margin-bottom: 40px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.final-winner {
    text-align: center;
    margin: 40px 0;
}

.final-winner img {
    max-width: 600px;
    width: 100%;
    border-radius: 15px;
    border: 5px solid #ffd700;
    box-shadow: 0 10px 40px rgba(255,215,0,0.5);
}

.final-winner h3 {
    font-size: 2em;
    margin-top: 20px;
    color: #ffd700;
}

.player-winners {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255,215,0,0.2);
    border-radius: 15px;
    text-align: center;
}

.player-winners h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffd700;
}

#winnersList {
    font-size: 1.5em;
}

#winnersList div {
    padding: 15px;
    margin: 10px 0;
    background: rgba(255,215,0,0.3);
    border-radius: 10px;
}

/* Podium Styles */
.podium-container {
    margin-top: 40px;
    padding: 30px;
    text-align: center;
}

.podium-container h3 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #ffd700;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    min-height: 400px;
}

.podium-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    max-width: 250px;
}

.podium-gold {
    order: 2;
}

.podium-silver {
    order: 1;
}

.podium-bronze {
    order: 3;
}

.podium-stand {
    width: 100%;
    padding: 30px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.podium-gold .podium-stand {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    height: 280px;
    border: 3px solid #ffed4e;
    box-shadow: 0 15px 40px rgba(255,215,0,0.5);
}

.podium-silver .podium-stand {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    height: 220px;
    border: 3px solid #e8e8e8;
    box-shadow: 0 12px 35px rgba(192,192,192,0.4);
}

.podium-bronze .podium-stand {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a857 100%);
    height: 180px;
    border: 3px solid #e6a857;
    box-shadow: 0 10px 30px rgba(205,127,50,0.4);
}

.podium-stand:hover {
    transform: translateY(-5px);
}

.podium-medal {
    font-size: 4em;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.podium-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #1a1a2e;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(255,255,255,0.5);
    word-break: break-word;
}

.podium-score {
    font-size: 1.1em;
    color: #1a1a2e;
    opacity: 0.9;
    font-weight: 600;
}

.no-players-message {
    padding: 40px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    font-size: 1.2em;
}

/* Player View */
.player-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.player-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.player-header {
    text-align: center;
    margin-bottom: 30px;
}

.player-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.player-name {
    font-size: 1.3em;
    color: rgba(255,255,255,0.9);
    font-weight: bold;
}

.waiting-content, .lobby-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 500px;
    margin: 50px auto;
}

/* Host Lobby Screen */
#hostLobbyScreen {
    text-align: center;
    padding: 40px;
}

#hostLobbyScreen h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffd700;
}

.lobby-info {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.8);
}

.host-lobby-players-grid {
    position: relative;
    padding: 30px;
    margin: 30px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    min-height: 500px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
}

.player-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    border: 3px solid rgba(255,255,255,0.3);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow: visible;
    transform-origin: center center;
}

.player-circle.floating {
    animation: floatAround linear infinite;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(var(--move-x, 15px), calc(var(--move-y, -10px) * -1));
    }
    50% {
        transform: translate(calc(var(--move-x, 15px) * -1), var(--move-y, -10px));
    }
    75% {
        transform: translate(calc(var(--move-x, 15px) * 0.5), calc(var(--move-y, -10px) * 0.5));
    }
    100% {
        transform: translate(0, 0);
    }
}

.player-circle:hover {
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    z-index: 5;
}

.player-circle-name {
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
    padding: 10px;
    word-break: break-word;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.player-circle .explosion {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transform-origin: center center;
}

.explosion.explode {
    animation: explode 0.6s ease-out;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.explosion::before,
.explosion::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #ff6b6b 0%, #ffd700 30%, #ffaa00 60%, transparent 80%);
    transform: translate(-50%, -50%);
}

.explosion::before {
    transform: translate(-50%, -50%) rotate(0deg);
}

.explosion::after {
    transform: translate(-50%, -50%) rotate(45deg);
    background: radial-gradient(circle, #ffaa00 0%, #ff6b6b 30%, #ffd700 60%, transparent 80%);
}

.bullet {
    position: fixed;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffd700 0%, #ff6b6b 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ff6b6b, 0 0 30px rgba(255,107,107,0.5);
    z-index: 1000;
    pointer-events: none;
    transition: left 0.5s linear, top 0.5s linear;
    transform: translate(-50%, -50%);
}

.host-lobby-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.large-btn {
    padding: 20px 50px;
    font-size: 1.5em;
    font-weight: bold;
}

.secondary-btn {
    background: rgba(255,255,255,0.2);
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.3);
}

.waiting-content h2, .lobby-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.lobby-message {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-style: italic;
}

.lobby-hint {
    color: #667eea;
    font-size: 0.9em;
    margin-bottom: 20px;
    font-weight: bold;
}

.lobby-players {
    margin-top: 30px;
}

.lobby-players h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.lobby-player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.lobby-player-list.scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.lobby-player-list.scrollable::-webkit-scrollbar {
    width: 8px;
}

.lobby-player-list.scrollable::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.lobby-player-list.scrollable::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.lobby-player-list.scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.lobby-player {
    padding: 15px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s;
}

.lobby-player.you {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.lobby-player.shootable {
    cursor: pointer;
    background: #e0e0e0;
}

.lobby-player.shootable:hover {
    background: #d0d0d0;
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lobby-player.shootable:active {
    transform: scale(0.95);
}

.lobby-player.got-shot {
    animation: gotShot 0.5s ease-out;
}

@keyframes gotShot {
    0%, 100% { transform: scale(1); }
    50% { 
        transform: scale(1.1);
        background: #ff6b6b;
        color: white;
    }
}

.no-players {
    color: #999;
    font-style: italic;
    padding: 20px;
}

#nameInput {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #667eea;
    border-radius: 10px;
    margin: 15px 0;
}

.join-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.join-btn:hover {
    background: #5568d3;
}

.vote-buttons {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    flex: 1;
    align-items: stretch;
}

.vote-button {
    flex: 1;
    min-height: 300px;
    background: white;
    border: none;
    border-radius: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.vote-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.vote-button:active {
    transform: scale(0.95);
}

.vote-button.selected {
    background: #667eea;
    color: white;
    border: 5px solid #ffd700;
    box-shadow: 0 0 30px rgba(102,126,234,0.6);
}

.vote-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-label {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.button-subtitle {
    font-size: 0.6em;
    opacity: 0.7;
}

.vote-status {
    text-align: center;
    font-size: 1.3em;
    color: white;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.results-content, .finished-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 50px auto;
}

.results-content h2, .finished-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.round-result, .final-result {
    margin: 20px 0;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 1.1em;
}

.waiting-message {
    color: #666;
    margin-top: 20px;
    font-style: italic;
}

/* Round Overview Screen */
.round-overview-content {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.overview-section {
    margin: 30px 0;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.winners-section {
    border: 3px solid rgba(74,222,128,0.5);
    background: rgba(74,222,128,0.1);
}

.losers-section {
    border: 3px solid rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.1);
}

.section-title {
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
}

.winners-title {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74,222,128,0.5);
}

.losers-title {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239,68,68,0.5);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.overview-image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 1;
}

.overview-image-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.overview-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.winner-item {
    border: 4px solid #4ade80;
    box-shadow: 0 5px 20px rgba(74,222,128,0.4);
}

.winner-item:hover {
    box-shadow: 0 8px 30px rgba(74,222,128,0.6);
}

.loser-item {
    border: 4px solid #ef4444;
    box-shadow: 0 5px 20px rgba(239,68,68,0.4);
    opacity: 0.7;
}

.loser-item:hover {
    opacity: 0.9;
    box-shadow: 0 8px 30px rgba(239,68,68,0.6);
}

.no-losers {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    font-size: 1.2em;
}

/* Player view round overview */
.player-overview-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 1200px;
    margin: 50px auto;
}

.player-overview-content h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.player-view .overview-section {
    background: #f0f0f0;
    border-radius: 10px;
}

.player-view .winners-section {
    border: 3px solid #4ade80;
    background: rgba(74,222,128,0.1);
}

.player-view .losers-section {
    border: 3px solid #ef4444;
    background: rgba(239,68,68,0.1);
}

.player-view .winners-title {
    color: #22c55e;
}

.player-view .losers-title {
    color: #dc2626;
}

.player-view .no-losers {
    color: #666;
}

/* Admin View */
.admin-view {
    background: #1a1a2e;
    color: white;
    min-height: 100vh;
}

/* Password Modal */
.password-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;
}

.password-modal-content {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.password-modal-content h2 {
    margin-bottom: 20px;
    color: white;
}

.password-modal-content p {
    margin-bottom: 20px;
    color: rgba(255,255,255,0.8);
}

.password-modal-content input {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.password-modal-content input::placeholder {
    color: rgba(255,255,255,0.5);
}

.password-modal-content input:focus {
    outline: none;
    border-color: #667eea;
}

.password-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.password-error {
    color: #ef4444;
    margin-top: 15px;
    font-size: 0.9em;
}

.password-error.hidden {
    display: none;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.admin-header h1 {
    font-size: 2em;
    margin: 0;
}

.back-link, .admin-link {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s;
    display: inline-block;
}

.back-link:hover, .admin-link:hover {
    background: #5568d3;
}

.admin-link-small {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    margin-left: 10px;
}

.admin-link-small:hover {
    text-decoration: underline;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-section {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
}

.admin-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: white;
}

.group-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.group-controls input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    font-size: 1em;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
}

.group-controls input::placeholder {
    color: rgba(255,255,255,0.5);
}

.admin-btn {
    padding: 12px 24px;
    font-size: 1em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-btn:hover {
    background: #5568d3;
}

.admin-btn.primary {
    background: #4ade80;
}

.admin-btn.primary:hover {
    background: #22c55e;
}

.admin-btn.danger {
    background: #ef4444;
}

.admin-btn.danger:hover {
    background: #dc2626;
}

.admin-btn.small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: background 0.3s;
}

.group-item:hover {
    background: rgba(255,255,255,0.15);
}

.group-item.active {
    background: rgba(102,126,234,0.3);
    border: 2px solid #667eea;
}

.group-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.3em;
}

.group-info p {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.9em;
}

.group-actions {
    display: flex;
    gap: 10px;
}

.no-groups, .no-images {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.drop-zone {
    border: 3px dashed rgba(255,255,255,0.3);
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.05);
}

.drop-zone:hover {
    border-color: #667eea;
    background: rgba(102,126,234,0.1);
}

.drop-zone.drag-over {
    border-color: #4ade80;
    background: rgba(74,222,128,0.2);
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.drop-zone-text {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: white;
}

.drop-zone-subtext {
    font-size: 1em;
    color: rgba(255,255,255,0.6);
}

.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    text-align: center;
}

.upload-progress.hidden {
    display: none;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    transition: transform 0.3s;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.delete-image-btn {
    background: rgba(239,68,68,0.9);
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s;
}

.delete-image-btn:hover {
    background: #ef4444;
}

.image-name {
    padding: 10px;
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Group Selection in Host View */
.group-selection {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.group-selection label {
    font-size: 1.1em;
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
}

.group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.group-button {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.group-button:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.group-button.selected {
    background: rgba(102,126,234,0.3);
    border-color: #667eea;
    border-width: 3px;
    box-shadow: 0 0 20px rgba(102,126,234,0.5);
}

.group-button .group-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.group-button .group-count {
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
}

.loading-groups, .no-groups {
    padding: 20px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    text-align: center;
}

@media (max-width: 768px) {
    .vote-buttons {
        flex-direction: column;
    }
    
    .vote-button {
        min-height: 200px;
    }
    
    .image-pair, .result-pair {
        flex-direction: column;
    }
    
    .host-header {
        flex-direction: column;
        gap: 15px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .group-controls {
        flex-direction: column;
    }

    .group-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .group-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .group-selection {
        flex-direction: column;
        align-items: stretch;
    }
    
    .overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        min-height: auto;
    }
    
    .podium-item {
        max-width: 100%;
        width: 100%;
    }
    
    .podium-gold {
        order: 1;
    }
    
    .podium-silver {
        order: 2;
    }
    
    .podium-bronze {
        order: 3;
    }
    
    .podium-stand {
        width: 100%;
        max-width: 300px;
    }
    
    .podium-gold .podium-stand {
        height: 200px;
    }
    
    .podium-silver .podium-stand {
        height: 160px;
    }
    
    .podium-bronze .podium-stand {
        height: 130px;
    }
    
    #finishedScreen h2 {
        font-size: 2em;
    }
}

