/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #eee;
  min-height: 100vh;
  padding: 20px;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: 1.1rem;
  color: #bbb;
  font-style: italic;
}

/* Voting Status */
.voting-status {
  margin-bottom: 30px;
}

.flash {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
}

.flash.notice {
  background-color: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.5);
  color: #81c784;
}

.flash.alert {
  background-color: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.5);
  color: #e57373;
}

.info-message {
  background-color: rgba(255, 193, 7, 0.15);
  border: 2px solid rgba(255, 193, 7, 0.6);
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.5;
}

.info-message strong {
  color: #ffd54f;
  font-size: 1.1rem;
}

.vote-info {
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 1.1rem;
}

.vote-info strong {
  color: #4fc3f7;
}

.votes-counter {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 500;
}

.votes-counter strong {
  font-size: 1.5rem;
  color: #ffd700;
}

.votes-counter .remaining {
  color: #81c784;
  font-size: 1rem;
  display: block;
  margin-top: 5px;
}

.votes-counter .no-remaining {
  color: #e57373;
  font-size: 1rem;
  display: block;
  margin-top: 5px;
}

.voted-for {
  margin-top: 15px;
  padding: 10px;
  background: rgba(79, 195, 247, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(79, 195, 247, 0.3);
}

.instruction {
  margin-top: 15px;
  color: #bbb;
  font-style: italic;
}

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

/* Player Card */
.player-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.player-card.dead {
  opacity: 0.6;
  filter: grayscale(80%);
}

.player-card.dead:hover {
  transform: none;
}

/* Avatar Container */
.avatar-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Death Cross */
.death-cross {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.death-cross-line {
  position: absolute;
  background-color: #f44336;
  width: 100%;
  height: 8px;
  top: 50%;
  left: 0;
  transform-origin: center;
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.8);
}

.death-cross-line-1 {
  transform: translateY(-50%) rotate(45deg);
}

.death-cross-line-2 {
  transform: translateY(-50%) rotate(-45deg);
}

/* Player Info */
.player-info {
  text-align: center;
}

.player-name {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #fff;
}

/* Betting Odds */
.betting-odds {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px 15px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 8px;
}

.odds-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffeb3b;
  font-weight: 600;
}

.odds-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #ffd700;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Vote Stats */
.vote-stats {
  margin-bottom: 15px;
}

.percentage-bar-container {
  width: 100%;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.percentage-bar {
  height: 100%;
  background: linear-gradient(90deg, #4fc3f7 0%, #29b6f6 100%);
  transition: width 0.5s ease;
  border-radius: 10px;
}

.percentage-text {
  font-size: 1.1rem;
  font-weight: bold;
  color: #4fc3f7;
  margin-bottom: 10px;
}

/* Vote Button */
.vote-button {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 15px;
}

.vote-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.vote-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #888;
  cursor: not-allowed;
  opacity: 0.6;
}

.vote-button.voted {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  color: white;
  opacity: 0.8;
}

/* RIP Message */
.rip-message {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f44336;
  padding: 20px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .player-card {
    padding: 15px;
  }

  .player-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .players-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Styles */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.admin-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #ffd700;
}

.admin-tagline {
  font-size: 1.2rem;
  color: #bbb;
  font-style: italic;
  margin-bottom: 20px;
}

.admin-stats {
  font-size: 1.3rem;
  color: #4fc3f7;
  margin-top: 20px;
}

.admin-stats strong {
  font-size: 1.5rem;
  color: #ffd700;
}

/* Admin Podium */
.admin-podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.admin-player-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 25px;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-player-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Rank badges with different colors */
.admin-player-card.rank-1 {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.admin-player-card.rank-2 {
  border-color: #c0c0c0;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.admin-player-card.rank-3 {
  border-color: #cd7f32;
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.rank-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.admin-player-card.rank-1 .rank-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
}

.admin-player-card.rank-2 .rank-badge {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #333;
}

.admin-player-card.rank-3 .rank-badge {
  background: linear-gradient(135deg, #cd7f32 0%, #e89b5f 100%);
  color: #fff;
}

.admin-player-info {
  text-align: center;
}

.admin-player-info .player-name {
  font-size: 1.5rem;
  margin: 15px 0 10px 0;
  color: #fff;
}

/* Admin Betting Odds */
.admin-betting-odds {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 193, 7, 0.15) 100%);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 10px;
}

.admin-betting-odds .odds-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffeb3b;
  font-weight: 600;
}

.admin-betting-odds .odds-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffd700;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

/* Admin Vote Stats */
.admin-vote-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.vote-count {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vote-count .number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #4fc3f7;
  line-height: 1;
}

.vote-count .label {
  font-size: 0.9rem;
  color: #bbb;
  margin-top: 5px;
}

.vote-percentage {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffd700;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 15px;
}

.status-badge.alive {
  background-color: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.5);
  color: #81c784;
}

.status-badge.dead {
  background-color: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.5);
  color: #e57373;
}

/* No Votes Message */
.no-votes-message {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 40px;
}

.no-votes-message p {
  font-size: 1.3rem;
  color: #bbb;
}

/* Admin Actions */
.admin-actions {
  text-align: center;
  padding: 20px;
}

.back-button {
  display: inline-block;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-header h1 {
    font-size: 2rem;
  }

  .admin-tagline {
    font-size: 1rem;
  }

  .admin-podium {
    grid-template-columns: 1fr;
  }

  .admin-vote-stats {
    flex-direction: column;
    gap: 15px;
  }
}
