:root {
  --bg-main: #0a0d14;
  --bg-surface: #121824;
  --bg-card: #182234;
  --bg-card-hover: #1f2c42;
  --border: #233047;
  --border-light: #324360;
  
  --wks-green: #15803d;
  --wks-green-light: #22c55e;
  --wks-green-glow: rgba(34, 197, 94, 0.2);
  --wks-red: #dc2626;
  --wks-gold: #f59e0b;
  --wks-gold-glow: rgba(245, 158, 11, 0.2);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 75px; /* space for bottom nav */
}

/* App container */
.app-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.club-crest {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wks-green), #064e3b);
  border: 2px solid var(--wks-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--wks-green-glow);
}

.crest-wks {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -0.5px;
  color: #fff;
}

.header-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 10px;
  font-weight: 600;
  color: var(--wks-gold);
  letter-spacing: 0.8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Anti-spoiler button switch */
.spoiler-toggle-btn {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.spoiler-toggle-btn input {
  display: none;
}

.spoiler-toggle-btn .toggle-label {
  color: var(--text-secondary);
}

.spoiler-toggle-btn input:checked + .slider + .toggle-label {
  color: var(--wks-green-light);
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--border);
  color: #fff;
}

/* Status banner */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: rgba(22, 101, 52, 0.15);
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 11px;
  color: var(--text-secondary);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  background-color: var(--wks-green-light);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--wks-green-light);
}

.install-pill {
  background: linear-gradient(135deg, var(--wks-green), var(--wks-green-light));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Main Content */
.main-content {
  padding: 16px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Match Card */
.hero-match-card {
  background: linear-gradient(145deg, #13241b, var(--bg-card));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
}

.hero-match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wks-green-light), var(--wks-gold), var(--wks-red));
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--wks-gold);
  color: var(--wks-gold);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 16px;
}

.hero-team {
  flex: 1;
  text-align: center;
}

.hero-team-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.hero-team.is-slask .hero-team-name {
  color: var(--wks-green-light);
}

.hero-vs {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 0 10px;
}

/* Countdown */
.countdown-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.countdown-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.countdown-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  min-width: 50px;
}

.countdown-num {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* TV & Schedule info */
.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  font-size: 12px;
}

.hero-datetime {
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-broadcast {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
}

/* Secondary Match Card (Ostatni mecz) */
.secondary-match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.secondary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Filter pills */
.section-header {
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.pill.active {
  background: var(--wks-green);
  border-color: var(--wks-green-light);
  color: #fff;
}

/* Match item in list */
.match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.match-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.match-competition-tag {
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.match-competition-tag.PLK {
  background: rgba(34, 197, 94, 0.15);
  color: var(--wks-green-light);
}

.match-competition-tag.EuroCup {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.match-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0;
}

.match-team {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.match-team.highlight {
  color: var(--wks-green-light);
  font-weight: 700;
}

/* Anti-Spoiler Score element */
.score-badge {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.score-badge.spoiler-hidden {
  filter: blur(5px);
  opacity: 0.6;
}

.spoiler-reveal-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--wks-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed var(--wks-gold);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.match-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
  margin-top: 6px;
}

.tv-badge {
  color: #fca5a5;
  font-weight: 600;
}

/* Accordion for round matches */
.round-accordion {
  margin-top: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.round-accordion-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--bg-card);
  user-select: none;
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.round-matches-list {
  padding: 12px;
}

.round-mini-match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.round-mini-match:last-child {
  border-bottom: none;
}

/* Standings */
.standings-toggle-wrapper {
  margin-bottom: 16px;
}

.toggle-switch-pills {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border);
}

.switch-pill {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.switch-pill.active {
  background: var(--wks-green);
  color: #fff;
  box-shadow: 0 2px 8px var(--wks-green-glow);
}

.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.table-header-info h3 {
  font-size: 14px;
  font-weight: 800;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-secondary);
}

.badge-euro {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #93c5fd;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: center;
}

.standings-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 700;
  padding: 8px 6px;
  font-size: 10px;
  text-transform: uppercase;
}

.standings-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.standings-table tr.highlight-slask td {
  background: rgba(22, 101, 52, 0.25);
  color: #fff;
  font-weight: 700;
}

.standings-table tr.highlight-slask td:nth-child(2) {
  color: var(--wks-green-light);
}

.text-left {
  text-align: left !important;
  padding-left: 10px !important;
}

/* News List */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.news-card:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 6px;
}

.news-source-tag {
  font-weight: 700;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
}

.source-official {
  background: rgba(34, 197, 94, 0.15);
  color: var(--wks-green-light);
}

.source-chanas {
  background: rgba(245, 158, 11, 0.15);
  color: var(--wks-gold);
}

.source-plk {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.news-date {
  color: var(--text-muted);
}

.news-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 6px;
}

.news-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.news-read-more {
  font-size: 11px;
  font-weight: 600;
  color: var(--wks-green-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Social / FB tab */
.social-header {
  margin-bottom: 16px;
}

.social-header h2 {
  font-size: 16px;
  font-weight: 800;
}

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

.social-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.social-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.social-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}

.social-avatar.wks-green {
  background: var(--wks-green);
}

.social-avatar.wks-red {
  background: var(--wks-red);
}

.social-info {
  flex: 1;
}

.social-info h3 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.social-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.fb-link-btn {
  background: #1877f2;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
}

.fb-embed-container {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 640px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  flex: 1;
}

.nav-icon {
  font-size: 18px;
}

.nav-text {
  font-size: 10px;
  font-weight: 600;
}

.nav-item.active {
  color: var(--wks-green-light);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}
