/* public/assets/css/player.css - Athlete & Public Mobile Portal */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700;800&family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root, [data-theme="dark"] {
  --p-bg: #0b1120;
  --p-card-bg: #131d31;
  --p-card-border: #1e293b;
  --p-header-bg: rgba(15, 23, 42, 0.95);
  --p-header-border: #1e293b;
  --p-search-bg: #131d31;
  --p-search-border: #334155;
  --p-primary: #0284c7;
  --p-primary-glow: rgba(2, 132, 199, 0.4);
  --p-accent: #10b981;
  --p-accent-glow: rgba(16, 185, 129, 0.35);
  --p-warning: #f59e0b;
  --p-danger: #ef4444;
  --p-text: #f8fafc;
  --p-text-muted: #94a3b8;
  --font-score: 'Chakra Petch', monospace, sans-serif;
  --font-portal: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, sans-serif;
}

[data-theme="light"] {
  --p-bg: #f8fafc;
  --p-card-bg: #ffffff;
  --p-card-border: #e2e8f0;
  --p-header-bg: rgba(255, 255, 255, 0.95);
  --p-header-border: #e2e8f0;
  --p-search-bg: #ffffff;
  --p-search-border: #cbd5e1;
  --p-primary: #0284c7;
  --p-primary-glow: rgba(2, 132, 199, 0.2);
  --p-accent: #059669;
  --p-accent-glow: rgba(5, 150, 105, 0.2);
  --p-warning: #d97706;
  --p-danger: #dc2626;
  --p-text: #0f172a;
  --p-text-muted: #475569;
}

body.player-body {
  background-color: var(--p-bg);
  color: var(--p-text);
  font-family: var(--font-portal);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Athlete Header */
.player-header {
  background: var(--p-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--p-header-border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.player-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.player-brand-icon {
  font-size: 24px;
  color: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.player-brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--p-text);
  line-height: 1.2;
}

.player-brand-text p {
  font-size: 11px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Search Bar (My Name / Team) */
.player-search-box {
  background: var(--p-search-bg);
  border: 1px solid var(--p-search-border);
  border-radius: 16px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.player-search-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.player-search-input {
  background: transparent;
  border: none;
  color: var(--p-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  padding: 8px 0;
}

.player-search-input:focus {
  outline: none;
}

.player-search-input::placeholder {
  color: var(--p-text-muted);
}

/* Next Match Countdown Card */
.player-next-card {
  background: linear-gradient(135deg, #0c2d48 0%, #145374 100%);
  border: 2px solid #0284c7;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px var(--p-primary-glow);
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.player-next-badge {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}

.player-court-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.player-court-number {
  font-size: 28px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.player-match-time {
  font-size: 15px;
  font-weight: 700;
  color: #fbbf24;
}

.player-versus {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Category Pills (Xuống hàng tự động khi nhiều nội dung) */
.player-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 20px;
}

.player-pill-btn {
  background: var(--p-card-bg);
  color: var(--p-text-muted);
  border: 1px solid var(--p-card-border);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.player-pill-btn:hover {
  background: var(--p-card-border);
  color: var(--p-text);
  border-color: #38bdf8;
}

.player-pill-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
}

/* Match Timeline Cards */
.player-match-card {
  background: var(--p-card-bg);
  border: 1px solid var(--p-card-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.player-match-card.is-my-match {
  border-color: #38bdf8;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.12) 0%, var(--p-card-bg) 100%);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.2);
}

.player-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--p-card-border);
}

.player-match-code {
  font-weight: 800;
  color: var(--p-primary);
  font-family: var(--font-score);
}

.player-court-tag {
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.player-team-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid transparent;
  color: var(--p-text);
  transition: all 0.15s ease;
}

[data-theme="light"] .player-team-line {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.player-team-line.winner {
  background: rgba(16, 185, 129, 0.15);
  border-left: 4px solid #10b981;
  color: var(--p-text);
}

[data-theme="light"] .player-team-line.winner {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-left: 4px solid #059669;
  color: #064e3b;
  font-weight: 800;
}

[data-theme="light"] .player-team-line.winner span {
  color: #064e3b !important;
}

.player-team-line.highlight {
  font-weight: 800;
  color: #38bdf8;
}

[data-theme="light"] .player-team-line.highlight {
  color: #0284c7;
}

.player-scores-badge {
  font-family: var(--font-score);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  gap: 4px;
}

.player-score-set {
  background: var(--p-card-bg);
  color: var(--p-text);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--p-card-border);
  min-width: 26px;
  text-align: center;
  font-weight: 700;
}

[data-theme="light"] .player-score-set {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.player-score-set.won {
  color: #22c55e;
  border-color: #22c55e;
  font-weight: 900;
}

[data-theme="light"] .player-score-set.won {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
  font-weight: 900;
}

.player-tournament-banner {
  background: #ffffff;
  border: 1px solid var(--p-card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .player-tournament-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.player-group-header {
  background: #f1f5f9;
  color: #0284c7;
  border-bottom: 1px solid var(--p-card-border);
}

[data-theme="dark"] .player-group-header {
  background: #0f172a;
  color: #38bdf8;
  border-bottom: 1px solid var(--p-card-border);
}

/* Bottom Floating Navigation for Mobile */
.player-bottom-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--p-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--p-header-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px;
  z-index: 40;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.player-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--p-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
}

.player-nav-tab.active {
  color: var(--p-primary);
  background: var(--p-primary-glow);
}

.player-nav-tab i {
  font-size: 18px;
}

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