/*
 * This is a manifest file that'll be compiled into application.css.
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

/* New Game Page */
.new-game-container {
  max-width: 600px;
  margin: 50px auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.new-game-container h1 {
  color: #2a5298;
  margin-bottom: 30px;
  text-align: center;
  font-size: 2.5rem;
}

.new-game-form {
  margin-bottom: 30px;
}

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

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

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #2a5298;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

.game-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.game-info h2 {
  color: #2a5298;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.game-info ul {
  list-style-position: inside;
  color: #666;
  line-height: 1.8;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #2a5298;
  color: white;
}

.btn-primary:hover {
  background: #1e3c72;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Game Container */
.game-container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.game-header h1 {
  color: #2a5298;
  font-size: 2rem;
}

.game-state {
  display: flex;
  gap: 20px;
  align-items: center;
}

.state-badge {
  background: #2a5298;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}

.pot {
  font-size: 1.5rem;
  font-weight: 700;
  color: #28a745;
}

/* Alert */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Community Cards */
.community-cards-section {
  text-align: center;
  margin-bottom: 40px;
}

.community-cards-section h2 {
  color: #2a5298;
  margin-bottom: 20px;
}

.community-cards {
  display: flex;
  justify-content: center;
  gap: 15px;
  min-height: 140px;
  align-items: center;
}

.no-cards {
  color: #999;
  font-style: italic;
}

/* Card Styles */
.card {
  width: 80px;
  height: 110px;
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card.small {
  width: 60px;
  height: 85px;
}

.card .rank {
  font-size: 24px;
  font-weight: bold;
}

.card.small .rank {
  font-size: 18px;
}

.card .suit {
  font-size: 32px;
  margin-top: 5px;
}

.card.small .suit {
  font-size: 24px;
}

/* Card colors */
.card.hearts,
.card.diamonds {
  color: #dc3545;
}

.card.hearts .rank,
.card.hearts .suit,
.card.diamonds .rank,
.card.diamonds .suit {
  color: #dc3545;
}

.card.clubs,
.card.spades {
  color: #333;
}

.card.back {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 48px;
  border-color: #764ba2;
}

/* Players Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.player-card {
  background: #f8f9fa;
  border: 3px solid #dee2e6;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s;
}

.player-card.current-player {
  border-color: #28a745;
  background: #d4edda;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.player-card.folded {
  opacity: 0.6;
  background: #f5f5f5;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.player-header h3 {
  color: #2a5298;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.human {
  background: #28a745;
  color: white;
}

.badge.ai {
  background: #6c757d;
  color: white;
}

.player-status {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
}

.player-status.active {
  background: #28a745;
  color: white;
}

.player-status.folded {
  background: #dc3545;
  color: white;
}

.player-status.all_in {
  background: #ffc107;
  color: #333;
}

.player-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
}

.player-stats .chips {
  font-weight: 600;
  color: #28a745;
}

.player-stats .current-bet {
  font-weight: 600;
  color: #dc3545;
}

.player-hand {
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hand-cards {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Winner Section */
.winner-section {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  margin: 30px 0;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.winner-section h2 {
  font-size: 2.5rem;
  color: #2a5298;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.winner-info {
  margin-bottom: 20px;
}

.winner-info h3 {
  font-size: 2rem;
  color: #1e3c72;
  margin-bottom: 10px;
}

.hand-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2a5298;
  margin-bottom: 15px;
}

.winning-hand {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.new-game-action {
  margin-top: 30px;
}

/* Action Panel */
.action-panel {
  background: #e7f3ff;
  border: 2px solid #2a5298;
  border-radius: 10px;
  padding: 25px;
  margin: 30px 0;
}

.action-panel h2 {
  color: #2a5298;
  margin-bottom: 20px;
  text-align: center;
}

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

.actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.raise-section {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 300px;
  justify-content: center;
}

.raise-section label {
  font-weight: 600;
  color: #2a5298;
}

.raise-section input[type="number"] {
  padding: 10px;
  border: 2px solid #2a5298;
  border-radius: 6px;
  font-size: 16px;
  width: 150px;
}

/* AI Turn Indicator */
.ai-turn-indicator {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin: 30px 0;
}

.ai-turn-indicator p {
  font-size: 1.2rem;
  color: #856404;
  margin-bottom: 15px;
  font-weight: 600;
}

/* Betting History */
.betting-history {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-top: 30px;
}

.betting-history h2 {
  color: #2a5298;
  margin-bottom: 15px;
}

.bets-list {
  max-height: 200px;
  overflow-y: auto;
}

.bet-item {
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
  color: #666;
}

.bet-item:last-child {
  border-bottom: none;
}

.bet-description {
  font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .game-state {
    flex-direction: column;
    gap: 10px;
  }

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

  .community-cards {
    flex-wrap: wrap;
  }

  .actions form {
    flex-direction: column;
  }

  .raise-section {
    flex-direction: column;
    width: 100%;
  }
}
