@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --accent-red: #ff2a55;
  --accent-cyan: #00f2fe;
  --accent-gold: #ffb703;
  --accent-green: #10b981;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.15);
}

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

body {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(255, 42, 85, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.1) 0%, transparent 45%);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Tab Navigation */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-ai {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-cyan));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo-title {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 12px;
  color: var(--text-sub);
}

.nav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-red), #d90429);
  border-color: var(--accent-red);
  box-shadow: 0 0 18px rgba(255, 42, 85, 0.45);
}

/* Hero Section */
.hero {
  padding: 32px 0 24px;
}

.hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-red), var(--accent-cyan));
}

.hero-info h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 12px;
}

.match-tag {
  display: inline-block;
  background: rgba(255, 183, 3, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 183, 3, 0.3);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.tactics-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.tactics-box h3 {
  font-size: 15px;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stat Grid Table */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.summary-stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.summary-stat-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent-cyan);
}

.summary-stat-lbl {
  font-size: 11px;
  color: var(--text-sub);
}

/* Tactical Pitch Section */
.pitch-section {
  padding: 24px 0;
}

.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 8px;
  height: 22px;
  background: var(--accent-red);
  border-radius: 4px;
}

.pitch-container {
  background: linear-gradient(180deg, #11321c 0%, #0a2012 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  height: 460px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6);
}

.pitch-lines {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.halfway-line {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.pitch-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.pitch-player:hover {
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 20;
}

.player-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 42, 85, 0.6);
  overflow: hidden;
}

.player-node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-label {
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-top: 4px;
  white-space: nowrap;
}

.player-stat-badge {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 900;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 2px;
}

/* Filter Section */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-cyan);
  color: #080c14;
  border-color: var(--accent-cyan);
  font-weight: 900;
}

/* Player Cards Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.player-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.player-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.card-header {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #000;
}

.card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.5s ease;
}

.player-card:hover .card-header img {
  transform: scale(1.08);
}

.card-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-red);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.card-pos-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
}

.card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.player-name-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 2px;
}

.player-role-sub {
  font-size: 12px;
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 16px;
}

/* Quantitative Player Stat Badges inside card */
.player-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-cyan);
}

.stat-value.highlight-red {
  color: var(--accent-red);
}

.stat-value.highlight-gold {
  color: var(--accent-gold);
}

.stat-label {
  font-size: 10px;
  color: var(--text-sub);
  font-weight: 700;
}

.info-block {
  margin-bottom: 12px;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-text {
  font-size: 13px;
  color: var(--text-main);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 14px;
  border-radius: 8px;
}

.highlight-counter {
  background: rgba(255, 42, 85, 0.1);
  border: 1px solid rgba(255, 42, 85, 0.3);
  color: #ff99aa;
  font-weight: 500;
}

/* Comparative Stat Table Section */
.stat-table-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 48px;
  overflow-x: auto;
}

.scouting-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.scouting-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  font-weight: 900;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.scouting-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: nowrap;
}

.scouting-table tr:hover td {
  background: rgba(0, 242, 254, 0.04);
}

.num-pill {
  background: var(--accent-red);
  color: #fff;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

/* Match Gallery & Strategy */
.visual-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.gallery-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery-img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.gallery-caption {
  padding: 18px;
}

.gallery-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

/* AI Verified Scouting Verdict (Replaces Manual Checklist) */
.verdict-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
}

.verdict-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.verdict-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-green);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.verdict-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 900;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  margin-top: 2px;
}

.verdict-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.verdict-content p {
  font-size: 13px;
  color: var(--text-sub);
}

footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-sub);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
}
