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

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap');

body {
  font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #FFE66D 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  color: #333;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Admin Panel */
.admin-panel {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-top: 20px;
}

.admin-header {
  text-align: center;
  margin-bottom: 30px;
  color: #667eea;
}

.admin-section {
  margin-bottom: 40px;
}

.admin-section h2 {
  color: #667eea;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

button {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

button:active {
  transform: translateY(0) scale(0.98);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.btn-success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

/* Pictures Grid */
.pictures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.picture-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.picture-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.picture-card p {
  margin: 5px 0;
  font-size: 14px;
}

.picture-card strong {
  color: #667eea;
}

.picture-card button {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 14px;
}

/* Players List */
.players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.player-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-card.connected {
  background: #d4edda;
  border: 2px solid #28a745;
}

.player-info {
  flex: 1;
}

.player-name {
  font-weight: 600;
  font-size: 16px;
}

.player-status {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* Join Screen */
.join-screen {
  max-width: 500px;
  margin: 100px auto;
  background: white;
  border-radius: 25px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: bounceIn 0.6s ease;
}

.join-screen h1 {
  color: #FF6B6B;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.join-screen p {
  font-size: 20px;
  color: #666;
  margin-bottom: 30px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.player-button {
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFE66D, #FFD93D);
  color: #333;
  border: 3px solid #FFB700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 230, 109, 0.4);
}

.player-button:hover {
  background: linear-gradient(135deg, #4ECDC4, #44A8A0);
  color: white;
  border-color: #3A9690;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

.player-button:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.player-button.claimed {
  background: linear-gradient(135deg, #d4edda, #b8e6c0);
  border-color: #28a745;
  animation: claimedPulse 1.5s ease infinite;
}

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

/* Gamemaster View */
.gamemaster-view {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-top: 20px;
}

.game-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.game-info {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.game-info h3 {
  color: #667eea;
  margin-bottom: 10px;
}

.scores-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  margin-top: 40px;
}

.scores-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.scores-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 18px 24px;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.scores-table th:first-child {
  border-radius: 15px 0 0 15px;
}

.scores-table th:last-child {
  border-radius: 0 15px 15px 0;
}

.scores-table tbody tr {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scores-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(5px) scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.scores-table td {
  padding: 20px 24px;
  text-align: left;
  font-size: 18px;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.scores-table tbody tr td:first-child {
  border-radius: 15px 0 0 15px;
  font-weight: 700;
  color: #333;
  font-size: 20px;
}

.scores-table tbody tr td:last-child {
  border-radius: 0 15px 15px 0;
}

.scores-table td strong {
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Lobby Player Cards */
.lobby-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.lobby-player-card {
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lobby-player-card:hover {
  transform: translateY(-10px) scale(1.1);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardFloat {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
  }
}

@keyframes cardFloatIn {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes counterRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

/* Display Screen */
.display-screen {
  background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #FFE66D 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 40px;
  color: white;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

.status-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: fadeIn 0.5s ease;
  max-width: 200px;
  text-align: center;
  white-space: nowrap;
}

.status-indicator.voting {
  background: linear-gradient(135deg, #FFE66D, #FFD93D);
  animation: votingPulse 2s ease infinite;
}

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

.status-indicator.complete {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.display-content {
  width: 100%;
  height: 100%;
  text-align: center;
  animation: fadeIn 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 60px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.display-picture {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: bounceIn 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 55vh;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.display-picture img {
  max-width: 100%;
  max-height: 50vh;
  width: auto;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Alternative centered layout for single picture view */
.centered-picture-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 150px);
  gap: 20px;
}

.centered-picture-layout .display-picture {
  max-width: 70%;
  max-height: 60vh;
}

/* Compact scores bar */
.scores-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-top: auto;
}

.display-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
  animation: titlePulse 2s ease infinite;
}

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

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Horizontal Layout for Game Phases */
.horizontal-game-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  justify-content: space-between;
  height: calc(100% - 200px);
  margin-top: 10px;
  margin-bottom: 20px;
}

.picture-section {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-section {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
}

.captions-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 20px;
}

.captions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

.caption-short {
  flex: 0 1 calc(50% - 8px);
  min-width: 280px;
}

.caption-medium {
  flex: 0 1 calc(50% - 8px);
  min-width: 280px;
}

.caption-long {
  flex: 0 1 100%;
}

/* Voting Caption Cards */
.caption-option-card {
  padding: 18px;
  border-radius: 15px;
  color: white;
  font-size: 18px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  position: relative;
  cursor: default;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  overflow: visible;
}

.caption-option-card:hover {
  transform: rotate(0deg) scale(1.08) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
  z-index: 10;
}

.option-number {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 45px;
  height: 45px;
  background: white;
  color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 3px solid rgba(0,0,0,0.1);
}

.option-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Result Cards */
.caption-result-card {
  padding: 25px;
  border-radius: 20px;
  color: white;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  overflow: visible;
}

.caption-result-card:hover {
  transform: rotate(0deg) scale(1.05) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
  z-index: 10;
}

.caption-result-card.correct-answer {
  border: 5px solid #FFD700;
  animation: glowGold 1.5s ease infinite;
}

@keyframes glowGold {
  0%, 100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), 0 8px 25px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 8px 25px rgba(0,0,0,0.3); }
}

/* Card entrance animations */
@keyframes bounceInOption {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(var(--rotation, 0deg));
  }
  70% {
    transform: scale(0.95) rotate(var(--rotation, 0deg));
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(var(--rotation, 0deg));
  }
}

@keyframes bounceInResult {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg) translateY(50px);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) rotate(var(--rotation, 0deg)) translateY(-10px);
  }
  80% {
    transform: scale(0.95) rotate(var(--rotation, 0deg)) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(var(--rotation, 0deg)) translateY(0);
  }
}

.caption-item {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 15px;
  color: #333;
  font-size: 20px;
  text-align: left;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  overflow: visible;
}

.caption-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.caption-item.real {
  background: linear-gradient(135deg, #d4edda, #b8e6c0);
  border: 3px solid #28a745;
  animation: glowGreen 1s ease infinite;
}

@keyframes glowGreen {
  0%, 100% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.5); }
  50% { box-shadow: 0 0 30px rgba(40, 167, 69, 0.8); }
}

.caption-item .caption-author {
  font-size: 16px;
  color: #666;
  margin-top: 10px;
  font-weight: 700;
}

.caption-item .caption-votes {
  font-size: 18px;
  color: #FF6B6B;
  margin-top: 5px;
  font-weight: 600;
}

/* Point Animation */
.points-popup {
  position: absolute;
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  font-size: 36px;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: pointsFloat 2s ease forwards;
  pointer-events: none;
  z-index: 1000;
}

@keyframes pointsFloat {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-150%) scale(0.8);
  }
}

.final-scores {
  background: transparent;
  border-radius: 0;
  padding: 10px 20px 20px 20px;
  color: white;
  max-width: 100%;
  max-height: 95vh;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.final-scores h1 {
  font-size: 72px;
  font-weight: 900;
  color: white;
  margin-bottom: 40px;
  text-align: center;
  animation: titleFloat 3s ease-in-out infinite;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 30px;
  margin: 20px 0;
  perspective: 1000px;
}

.podium-place {
  padding: 35px 25px;
  border-radius: 25px;
  min-width: 200px;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: podiumRise 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(100px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.podium-place:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

@keyframes podiumRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.podium-place.first {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  order: 2;
  min-height: 320px;
  animation-delay: 0.2s;
}

.podium-place.second {
  background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
  order: 1;
  min-height: 260px;
  animation-delay: 0.4s;
}

.podium-place.third {
  background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
  order: 3;
  min-height: 200px;
  animation-delay: 0.6s;
}

.podium-place .place {
  font-size: 72px;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: medalSpin 2s ease-in-out infinite;
}

@keyframes medalSpin {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(15deg); }
}

.podium-place .name {
  font-size: 22px;
  font-weight: 700;
  margin: 15px 0;
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.podium-place .score {
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 10px;
  text-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Player View */
.player-view {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-card-main {
  background: white;
  border-radius: 25px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: fadeIn 0.5s ease;
}

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

.player-header h2 {
  color: #FF6B6B;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.player-score {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: scoreGlow 2s ease infinite;
}

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

.waiting-message {
  text-align: center;
  padding: 30px 20px;
  color: #333;
  font-size: 18px;
  line-height: 1.5;
}

.vote-recorded {
  text-align: center;
  padding: 25px 20px;
  background: #2ecc71;
  color: white;
  font-size: 20px;
  font-weight: 600;
  border-radius: 15px;
  margin: 20px 0;
  line-height: 1.4;
}

.voting-section h3 {
  color: #667eea;
  margin-bottom: 20px;
  text-align: center;
}

.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
}

.vote-button {
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFE66D, #FFD93D);
  color: #333;
  border: 3px solid #FFB700;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 10px rgba(255, 230, 109, 0.4);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
  min-height: 50px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vote-button:hover {
  background: linear-gradient(135deg, #4ECDC4, #44A8A0);
  color: white;
  border-color: #3A9690;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

.vote-button.selected {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  border-color: #FF5733;
  animation: selectedPulse 1s ease infinite;
}

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

.caption-input {
  margin-bottom: 20px;
}

.caption-input textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 16px;
  min-height: 100px;
  resize: vertical;
}

.caption-input textarea:focus {
  outline: none;
  border-color: #667eea;
}

.submit-button {
  width: 100%;
  padding: 15px;
  font-size: 18px;
}

@media (max-width: 768px) {
  .players-grid {
    grid-template-columns: 1fr;
  }

  .display-title {
    font-size: 32px;
  }

  .podium {
    flex-direction: column;
    align-items: center;
  }

  .podium-place {
    order: 0 !important;
    min-width: 80%;
    min-height: auto !important;
  }

  .final-scores {
    padding: 30px 20px;
  }

  .final-scores h1 {
    font-size: 36px;
  }

  .podium-place .place {
    font-size: 56px;
  }

  .podium-place .score {
    font-size: 32px;
  }

  .scores-table th,
  .scores-table td {
    padding: 12px 16px;
    font-size: 14px;
  }

  .scores-table td strong {
    font-size: 18px;
  }
}
