/* Indian Poker Styles */
:root {
  --color-bg: #f5f2eb;
  --color-bg-secondary: #eae6db;
  --color-text: #4a4540;
  --color-text-muted: #8a857e;
  --color-border: #d4cfc4;
  --color-accent: #7c6f5b;
  --color-card-red: #e74c3c;
  --color-card-black: #2c3e50;
  --color-gold: #ffd700;
  --color-green: #27ae60;
  --color-fold: #95a5a6;
}

[data-theme="dark"] {
  --color-bg: #1a1a2e;
  --color-bg-secondary: #16213e;
  --color-text: #e0dcd5;
  --color-text-muted: #8a857e;
  --color-border: #3a3550;
  --color-accent: #a89880;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

.header {
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-center { flex: 1; }
.header h1 { font-size: 1.1rem; font-weight: 800; }
.header-sub { font-size: 0.75rem; opacity: 0.8; }
.back-btn {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.9;
}
.dark-toggle {
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
}

.container { max-width: 500px; margin: 0 auto; padding: 16px; }

/* Login Required */
.login-required {
  text-align: center;
  padding: 40px 20px;
  background: var(--color-bg-secondary);
  border-radius: 16px;
  margin-top: 20px;
}
.login-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}

/* Token Bar */
.token-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #5a3e00;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.token-bar-pot { margin-left: auto; }

[data-theme="dark"] .token-bar {
  background: linear-gradient(135deg, #b8860b, #cd950c);
  color: #fff;
}

/* Other Players' Cards */
.other-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.other-card {
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

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

.other-card-name {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.other-card-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.card-red { color: var(--color-card-red); }
.card-black { color: var(--color-card-black); }

.other-card-status {
  font-size: 0.7rem;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-block;
}

.status-waiting { background: #ffeaa7; color: #856404; }
.status-acted { background: #dfe6e9; color: #636e72; }
.status-fold { background: #ffeaea; color: #c0392b; }
.status-call { background: #e8f5e9; color: #27ae60; }
.status-raise { background: #fff3e0; color: #e67e22; }

[data-theme="dark"] .other-card {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

/* My Card */
.my-card-area {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.my-card {
  background: linear-gradient(135deg, var(--color-accent), #5a4f3d);
  color: #fff;
  border-radius: 16px;
  padding: 20px 40px;
  text-align: center;
  position: relative;
  min-width: 140px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.my-card-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.my-card-value {
  font-size: 3rem;
  font-weight: 800;
  display: block;
}

.my-card-hint {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 4px;
}

.my-card.revealed {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #5a3e00;
}

/* Bet Actions */
.bet-prompt {
  text-align: center;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1rem;
}

.raise-control {
  text-align: center;
  margin-bottom: 12px;
}

.raise-control label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.raise-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}

.raise-btns .raise-btn {
  padding: 6px 14px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.raise-btns .raise-btn.active {
  border-color: #e67e22;
  background: #fff3e0;
  color: #e67e22;
}

.action-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.action-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex: 1;
  max-width: 140px;
}

.action-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.action-btn:active { transform: translateY(0); }

.fold-btn { background: #dfe6e9; color: #636e72; }
.call-btn { background: #27ae60; color: #fff; }
.raise-btn-action { background: #e67e22; color: #fff; }

/* Waiting */
.waiting-area { text-align: center; padding: 20px; }
.waiting-text {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.action-status {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.refresh-btn {
  padding: 10px 24px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Result */
.result-area { margin-top: 10px; }
.result-card {
  background: var(--color-bg-secondary);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.result-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.all-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.all-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.all-card-name { font-size: 0.75rem; color: var(--color-text-muted); }
.all-card-value { font-size: 1.8rem; font-weight: 800; }
.all-card-action { font-size: 0.7rem; margin-top: 4px; }
.all-card.winner { border: 2px solid #ffd700; background: #fffde7; }
.all-card.fold { opacity: 0.5; }

[data-theme="dark"] .all-card {
  background: #1a1a2e;
}
[data-theme="dark"] .all-card.winner {
  background: #2a2500;
  border-color: #b8860b;
}

.result-message {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-accent);
}
.result-balances {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Cannot Start */
.cannot-start {
  text-align: center;
  padding: 40px 20px;
  background: var(--color-bg-secondary);
  border-radius: 16px;
}
.cannot-text { font-size: 0.95rem; }

/* Rules */
.rules-section {
  margin-top: 24px;
  background: var(--color-bg-secondary);
  border-radius: 16px;
  padding: 20px;
}
.rules-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.rules-list {
  list-style: none;
  padding: 0;
}
.rules-list li {
  padding: 6px 0;
  font-size: 0.85rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--color-border);
}
.rules-list li:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 400px) {
  .other-card { min-width: 90px; padding: 12px 14px; }
  .other-card-value { font-size: 1.8rem; }
  .action-btn { padding: 10px 14px; font-size: 0.85rem; }
}
