/* ==========================================================================
   Turnierplaner - Modern Soccer-Themed Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Modern Football Colors */
  --color-pitch: #0d1b2a;
  --color-pitch-light: #1b263b;
  --color-pitch-dark: #050a10;
  --color-grass: #00b4d8;
  --color-grass-light: #48cae4;
  --color-line: #ffffff;

  /* Primary - Electric Blue */
  --color-primary: #0077b6;
  --color-primary-hover: #005f92;
  --color-primary-light: rgba(0, 119, 182, 0.1);

  /* Secondary accent - Neon Green */
  --color-accent: #00f5d4;
  --color-accent-hover: #00d4b8;
  --color-accent-rgb: 0, 245, 212;

  /* Semantic colors */
  --color-success: #00c853;
  --color-success-light: rgba(0, 200, 83, 0.1);
  --color-warning: #ff9100;
  --color-danger: #ff1744;
  --color-info: #00b0ff;

  /* Neutrals - Dark Theme Feel */
  --color-white: #ffffff;
  --color-bg: #f0f4f8;
  --color-surface: #ffffff;
  --color-border: #d0d9e4;
  --color-border-light: #e8eef4;
  --color-text: #0d1b2a;
  --color-text-secondary: #415a77;
  --color-text-muted: #778da9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #00f5d4 100%);
  --gradient-dark: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
  --gradient-glow: linear-gradient(135deg, rgba(0, 245, 212, 0.2) 0%, rgba(0, 119, 182, 0.2) 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows with color */
  --shadow-sm: 0 2px 4px rgba(0, 119, 182, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 119, 182, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px rgba(0, 119, 182, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 24px 48px rgba(0, 119, 182, 0.15), 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(0, 245, 212, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

/* Soccer field pattern background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(180deg, var(--color-pitch) 0%, var(--color-pitch-light) 50%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

/* --------------------------------------------------------------------------
   Container & Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-pitch);
  box-shadow: var(--shadow-lg);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 64px;
}

/* Static pages header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-pitch);
  box-shadow: var(--shadow-lg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 64px;
}

.site-header .nav {
  display: flex;
  gap: var(--space-xs);
}

.site-header .nav a {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.site-header .nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

.site-header .nav a.active {
  background: var(--color-white);
  color: var(--color-pitch);
}

.header-quick-load {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-header .header-quick-input {
  width: 160px;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  font-size: 0.85rem;
}

.site-header .header-quick-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.site-header .header-quick-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb), 0.25);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo:hover {
  color: var(--color-white);
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--color-white);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

/* Navigation */
.nav {
  display: flex;
  gap: var(--space-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

.nav-link.active {
  background: var(--color-white);
  color: var(--color-pitch);
}

.nav-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Progress Bar */
.progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--color-grass-light), var(--color-accent));
  transition: width var(--transition-slow);
}

/* --------------------------------------------------------------------------
   Buttons - Modern Style
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  flex-shrink: 0;
}

/* Primary */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 119, 182, 0.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 245, 212, 0.3);
}

/* Secondary */
.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.header .btn-ghost {
  color: rgba(255, 255, 255, 0.8);
}

.header .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
}

/* Danger */
.btn-danger {
  background: var(--color-danger);
  color: var(--color-white);
}

.btn-danger:hover:not(:disabled) {
  background: #d32f2f;
}

/* Sizes */
.btn-xs {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Main Content & Sections
   -------------------------------------------------------------------------- */
.main {
  padding: var(--space-xl) 0 var(--space-2xl);
  min-height: calc(100vh - 67px);
}

.section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section.active {
  display: block;
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.section-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-title {
  color: var(--color-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.section-actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-sm);
}

.section-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.section-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.section-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.95);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

.card.allow-overflow {
  overflow: visible;
}

.panel.allow-overflow {
  overflow: visible;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--gradient-glow);
  border-bottom: 1px solid var(--color-border-light);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
}

/* ==========================================================================
   Field Configuration / Soccer Field Layout
   ========================================================================== */
.field-config-container {
  position: relative;
  background: var(--color-pitch-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  overflow: hidden;
}

.soccer-field-svg {
  width: 100%;
  height: auto;
  max-height: 300px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.field-config-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Field areas on canvas */
.field-area {
  cursor: grab;
  transition: filter 0.15s ease;
}

.field-area:hover {
  filter: brightness(1.1);
}

.field-area:active {
  cursor: grabbing;
}

.field-text-group {
  pointer-events: none;
  user-select: none;
}

/* Resize handle */
.resize-handle {
  cursor: se-resize;
  transition: r 0.15s ease, fill 0.15s ease;
}

.resize-handle:hover {
  r: 2.5;
  fill: var(--color-accent);
}

/* Orientation toggle */
.orientation-toggle {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.orientation-toggle:hover {
  opacity: 0.8;
}

.orientation-toggle-label {
  pointer-events: none;
  user-select: none;
}

/* Goal markers */
.goal-marker {
  pointer-events: none;
}

/* Spielform Panel - Modern integrated design */
.spielform-panel {
  margin-top: var(--space-lg);
  background: linear-gradient(135deg, rgba(74, 140, 42, 0.1) 0%, rgba(26, 42, 26, 0.15) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(74, 140, 42, 0.2);
}

.spielform-hint {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.spielform-hint::before {
  content: "⚽";
  font-size: 1rem;
}

.spielform-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.spielform-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-fast);
}

.spielform-field-row:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.spielform-field-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.spielform-btns {
  display: flex;
  gap: 2px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.spielform-btn {
  padding: var(--space-xs) var(--space-sm);
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-muted);
}

.spielform-btn:hover {
  background: rgba(0, 119, 182, 0.1);
  color: var(--color-primary);
}

.spielform-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 119, 182, 0.3);
}

/* Schedule Field Card - Collapsible design matching setup page */
.schedule-field-card {
  margin-bottom: var(--space-md);
  overflow: hidden;
  border: 1px solid rgba(74, 140, 42, 0.3);
  background: linear-gradient(135deg, var(--color-pitch) 0%, var(--color-pitch-light) 100%);
}

.schedule-field-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.schedule-field-card-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.schedule-field-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-white);
}

.schedule-field-card-title svg {
  color: var(--color-accent);
}

.schedule-field-card-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.schedule-field-card-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.schedule-field-card-toggle .chevron-icon {
  color: var(--color-white);
  transition: transform var(--transition-base);
}

.schedule-field-card.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

.schedule-field-card-body {
  padding: 0 var(--space-lg) var(--space-lg);
  transition: all var(--transition-base);
}

.schedule-field-card.collapsed .schedule-field-card-body {
  display: none;
}

/* Schedule Field Layout inside the card */
.schedule-field-layout {
  background: var(--color-pitch-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.schedule-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.schedule-field-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.schedule-field-legend {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.schedule-field-layout .soccer-field-svg {
  width: 100%;
  height: auto;
  max-height: 180px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
  background: #4a8c2a;
}

.field-marker-display {
  transition: all 0.3s ease;
}

.field-marker-display rect {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.field-marker-display.field-active rect {
  animation: fieldActivePulse 2s ease-in-out infinite;
}

@keyframes fieldActivePulse {
  0%, 100% {
    fill: rgba(0, 245, 212, 0.35);
    stroke-width: 0.6;
  }
  50% {
    fill: rgba(0, 245, 212, 0.55);
    stroke-width: 1.2;
    filter: drop-shadow(0 0 6px rgba(0, 245, 212, 0.7));
  }
}

.card-accent {
  background: linear-gradient(135deg, var(--color-pitch) 0%, var(--color-pitch-light) 100%);
  color: var(--color-white);
}

.card-accent .card-header {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-accent .card-title {
  color: var(--color-white);
}

.card-accent .card-footer {
  background: rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

.card-wide {
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.form-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 600px) {
  .form-grid,
  .form-grid.cols-3,
  .form-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .form-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-group .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6b5a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Planner form layout */
.planner-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.panel {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.panel legend {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  padding: 0 var(--space-xs);
}

.panel-note {
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field label,
.field-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.helper {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.field.span-2 {
  grid-column: span 2;
}

.inline-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.inline-controls input {
  flex: 1;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.status-message[data-tone="ok"] {
  color: var(--color-success);
}

.status-message[data-tone="error"] {
  color: var(--color-danger);
}

.status-message[data-tone="pending"] {
  color: var(--color-text-secondary);
}

.load-controls {
  margin: var(--space-sm) 0;
}

.remote-link {
  color: var(--color-primary);
  text-decoration: none;
}

.remote-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .field.span-2 {
    grid-column: span 1;
  }

  .inline-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

.address-input-row {
  position: relative;
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.btn-maps {
  flex-shrink: 0;
  padding: 0.625rem 0.875rem;
}

.btn-maps svg {
  color: var(--color-primary);
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-right: 2.5rem;
}

.input-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.input-icon.success {
  color: var(--color-success);
}

.input-icon.loading {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Input with addon (clear button) */
.input-with-addon {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.input-with-addon input {
  flex: 1;
}

.btn-clear-input {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear-input:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  color: var(--color-white);
}

/* Label hint icon */
.label-hint {
  cursor: help;
  color: var(--color-primary);
  font-size: 0.875rem;
  margin-left: var(--space-xs);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border);
  transition: var(--transition-fast);
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-white);
  transition: var(--transition-fast);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: var(--color-primary);
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

.switch input:focus + .slider {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Round limit row styling */
.round-limit-row {
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.05) 0%, rgba(0, 119, 182, 0.02) 100%);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 119, 182, 0.15);
}

.round-limit-row .form-group label {
  color: var(--color-text);
  font-weight: 600;
}

/* K.O. Options wrapper */
.ko-options-wrapper {
  background: linear-gradient(135deg, rgba(74, 140, 42, 0.08) 0%, rgba(74, 140, 42, 0.03) 100%);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(74, 140, 42, 0.2);
}

.ko-options-wrapper .form-group label {
  color: var(--color-text);
  font-weight: 600;
}

.ko-options-wrapper select {
  background-color: var(--color-white);
}

/* Suggestions dropdown */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--space-xs);
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition-fast);
}

.suggestion-item:hover {
  background: var(--color-primary-light);
}

.suggestion-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border-light);
}

.suggestion-main {
  font-weight: 500;
  color: var(--color-text);
}

.suggestion-secondary {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Address status icon */
.input-icon.loading svg {
  animation: spin 1s linear infinite;
}

.input-icon.success {
  color: var(--color-success);
}

.input-icon.error {
  color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Mode Selection
   -------------------------------------------------------------------------- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 768px) {
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
}

.mode-option {
  cursor: pointer;
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-sm);
  background: var(--color-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-fast);
}

.mode-option input:checked + .mode-card {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.mode-card:hover {
  background: var(--color-primary-light);
}

.mode-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.mode-icon svg {
  width: 18px;
  height: 18px;
}

.mode-name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text);
  line-height: 1.2;
}

.mode-desc {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Stats / Preview
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

.preview-info {
  font-size: 0.875rem;
  opacity: 0.9;
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   Badge
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 var(--space-sm);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-white);
}

.badge-live {
  background: var(--color-danger);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge.highlight {
  animation: badgeHighlight 0.6s ease;
}

@keyframes badgeHighlight {
  0% { transform: scale(1); background: var(--color-primary); }
  50% { transform: scale(1.3); background: var(--color-success); }
  100% { transform: scale(1); background: var(--color-primary); }
}

/* --------------------------------------------------------------------------
   Teams Layout
   -------------------------------------------------------------------------- */
.teams-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 800px) {
  .teams-layout {
    grid-template-columns: 1fr;
  }
}

.team-entry-form {
  display: grid;
  gap: var(--space-md);
}

.bulk-import {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.bulk-import-panel {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Team List */
.team-list-container {
  max-height: 400px;
  overflow-y: auto;
}

.team-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.team-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  color: var(--color-text-muted);
  text-align: center;
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.team-item:hover {
  background: var(--color-primary-light);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.team-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-club {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Club header for grouped teams */
.team-club-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
}

.team-club-header:first-child {
  margin-top: 0;
}

.team-club-header .club-name {
  flex: 1;
}

.team-club-header .club-count {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 500;
}

/* Grouped team items (indented under club header) */
.team-item-grouped {
  margin-left: var(--space-md);
  border-left: 3px solid var(--color-primary-light);
}

.team-item-grouped .team-name {
  font-size: 0.875rem;
}

.team-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.team-remove:hover {
  background: rgba(244, 67, 54, 0.1);
  color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Groups
   -------------------------------------------------------------------------- */
.groups-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.group-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-pitch);
  color: var(--color-white);
}

.group-name {
  font-weight: 700;
  font-size: 1rem;
}

.group-count {
  font-size: 0.875rem;
  opacity: 0.8;
}

.group-teams {
  list-style: none;
  padding: var(--space-md);
  min-height: 100px;
}

.group-teams.drag-over {
  background: var(--color-primary-light);
}

.group-team {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  cursor: grab;
  transition: all var(--transition-fast);
}

.group-team:hover {
  background: var(--color-primary-light);
}

.group-team.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.group-team.conflict {
  background: rgba(244, 67, 54, 0.1);
  border: 1px dashed var(--color-danger);
}

.group-team-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.875rem;
}

.group-team-club {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.groups-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
}

.conflict-notice {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: var(--radius-md);
  color: var(--color-warning);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Schedule
   -------------------------------------------------------------------------- */
.schedule-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.schedule-card {
  overflow: visible;
}

.schedule-filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
}

.filter-btn {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.filter-group-btns {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Schedule Info Header - Modern Stadium Style */
.schedule-info-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-2xl);
  background: var(--gradient-dark);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  color: var(--color-white);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

/* Animated gradient border */
.schedule-info-header::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Floating orbs background effect */
.schedule-info-header::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px;
  right: -50px;
  animation: floatOrb 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

.schedule-info-main {
  position: relative;
  z-index: 1;
}

.schedule-tournament-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--color-white);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0, 245, 212, 0.3);
}

.schedule-info-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
}

.schedule-info-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.schedule-info-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.schedule-info-item svg {
  color: var(--color-accent);
}

.schedule-maps-link {
  color: var(--color-white);
  text-decoration: none;
  background: rgba(0, 245, 212, 0.2);
  border: 1px solid rgba(0, 245, 212, 0.3);
  transition: all var(--transition-base);
}

.schedule-maps-link:hover {
  background: rgba(0, 245, 212, 0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Schedule Duration Info */
.schedule-info-duration {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-info-duration .schedule-info-item {
  font-size: 0.8125rem;
  background: rgba(0, 119, 182, 0.2);
  border-color: rgba(0, 119, 182, 0.3);
}

.schedule-info-duration .schedule-info-item svg {
  color: #00b4d8;
}

/* Live Ticker - Glassmorphism Style */
.schedule-live-ticker {
  position: relative;
  z-index: 1;
  min-width: 320px;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.ticker-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px var(--color-accent);
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px var(--color-accent);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
    box-shadow: 0 0 20px var(--color-accent);
  }
}

.ticker-content {
  font-size: 0.875rem;
  max-height: 80px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.ticker-content::-webkit-scrollbar {
  width: 4px;
}

.ticker-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.ticker-placeholder {
  opacity: 0.5;
  font-style: italic;
  font-size: 0.8125rem;
}

.ticker-message {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ticker-message:last-child {
  border-bottom: none;
}

.ticker-message-time {
  font-size: 0.6875rem;
  opacity: 0.6;
  margin-right: var(--space-sm);
  font-variant-numeric: tabular-nums;
}

/* Schedule Tabs - Modern Pill Style */
.schedule-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  background: var(--color-white);
  padding: var(--space-sm);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.schedule-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.schedule-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.schedule-tab:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.schedule-tab.active {
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.schedule-tab.active::before {
  opacity: 1;
}

.schedule-tab svg,
.schedule-tab span {
  position: relative;
  z-index: 1;
}

.schedule-tab svg {
  flex-shrink: 0;
  transition: transform var(--transition-bounce);
}

.schedule-tab.active svg {
  transform: scale(1.1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

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

/* Ticker Input in Results - Modern Style */
.ticker-input-group {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--gradient-glow);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

.ticker-input-group .input {
  flex: 1;
  border: 2px solid transparent;
  background: var(--color-white);
  transition: all var(--transition-base);
}

.ticker-input-group .input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.ticker-history {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ticker-history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  animation: slideInRight 0.3s ease-out;
}

.ticker-history-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.ticker-history-item:last-child {
  margin-bottom: 0;
}

.ticker-history-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.ticker-history-text {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.ticker-history-delete {
  padding: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.ticker-history-delete:hover {
  background: rgba(255, 23, 68, 0.1);
  color: var(--color-danger);
}

.ticker-history-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Live Standings Container */
.live-standings-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Visual Bracket */
.bracket-visual {
  overflow-x: auto;
  padding: var(--space-md);
}

.bracket-visual-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
}

.bracket-container {
  display: flex;
  gap: var(--space-xl);
  min-width: max-content;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 200px;
}

.bracket-round-title {
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-primary);
}

.bracket-match {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: var(--space-sm) 0;
  overflow: hidden;
}

.bracket-team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--color-border-light);
}

.bracket-team:last-child {
  border-bottom: none;
}

.bracket-team.winner {
  background: var(--color-success-light);
  font-weight: 600;
}

.bracket-team-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-team-score {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  color: var(--color-primary);
}

/* Overall placements table */
.placements-section {
  margin-top: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}

.placements-title {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-pitch);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.875rem;
}

.placements-table-wrap {
  overflow-x: auto;
}

.placements-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.placements-table th,
.placements-table td {
  padding: var(--space-sm);
}

.placements-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-white);
  font-size: 0.6875rem;
  text-transform: uppercase;
  text-align: left;
}

.placements-table th:first-child,
.placements-table td:first-child {
  width: 70px;
  text-align: center;
  font-weight: 700;
  color: var(--color-primary);
}

.placements-table tr:nth-child(even) {
  background: var(--color-white);
}

.placement-note {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Schedule Table */
.schedule-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  font-size: 0.875rem;
  align-items: center;
  border-bottom: 1px solid var(--color-border-light);
}

.schedule-row.schedule-head {
  background: var(--color-pitch);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.schedule-row.schedule-separator {
  grid-template-columns: 1fr;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-sm);
}

.schedule-row.schedule-entry.is-alt {
  background: var(--color-bg);
}

.schedule-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: nowrap;
}

.schedule-time {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.schedule-group-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-match {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.schedule-matchline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
}

.schedule-team {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-team.home {
  text-align: right;
}

.schedule-team.away {
  text-align: left;
}

.schedule-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
}

.schedule-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 70px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.schedule-score.has-result {
  color: var(--color-primary);
}

.schedule-score.no-result {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}

.schedule-score .score-separator {
  color: var(--color-text-muted);
}

.score-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  justify-content: center;
}

.score-input {
  width: 42px;
  padding: 2px 6px;
  text-align: center;
  font-weight: 600;
}

.score-divider {
  color: var(--color-text-muted);
  font-weight: 600;
}

.score-decision {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .schedule-meta {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
  }
}

/* Live table skin */
.schedule-live {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.schedule-live .schedule-row {
  border-bottom: 1px solid var(--color-border-light);
}

.schedule-live .schedule-row.schedule-head {
  border-radius: 0;
}

.schedule-live .schedule-row.schedule-separator {
  margin: 0;
  border-radius: 0;
}

.schedule-live .schedule-row.schedule-entry {
  font-size: 0.9375rem;
  padding: var(--space-md) var(--space-lg);
}

.schedule-live .schedule-row.schedule-entry:hover {
  background: var(--color-primary-light);
}

.schedule-live .schedule-row.schedule-entry.is-decided {
  box-shadow: inset 4px 0 0 rgba(0, 200, 83, 0.6);
}

.schedule-live .schedule-meta {
  gap: 6px;
}

.schedule-live .schedule-time {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.schedule-live .schedule-field {
  background: rgba(0, 119, 182, 0.08);
  border: 1px solid rgba(0, 119, 182, 0.2);
}

.schedule-live .schedule-group-label {
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.schedule-live .schedule-score {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  min-width: 86px;
  white-space: nowrap;
}

.schedule-live .schedule-score.has-result {
  background: rgba(0, 180, 216, 0.12);
  border-color: rgba(0, 180, 216, 0.3);
}

.schedule-live .schedule-score.no-result {
  color: var(--color-text-muted);
}

/* Compact Schedule */
.schedule-compact {
  display: flex;
  flex-direction: column;
}

.schedule-phase {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 6px 12px;
  margin-top: var(--space-md);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.schedule-phase:first-child {
  margin-top: 0;
}

.schedule-line {
  display: grid;
  grid-template-columns: 90px 32px minmax(0, 1fr) 60px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-white);
  transition: background var(--transition-fast);
}

.schedule-line:nth-child(odd) {
  background: var(--color-bg);
}

.schedule-line:hover {
  background: var(--color-primary-light);
}

.schedule-line.has-result {
  background: rgba(0, 200, 83, 0.05);
}

.schedule-line.has-result:hover {
  background: rgba(0, 200, 83, 0.1);
}

.sl-time {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
}

.sl-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  background: var(--color-pitch);
  color: var(--color-white);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.sl-team {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}

.sl-home {
  text-align: right;
}

.sl-away {
  text-align: left;
}

.sl-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.sl-score.decided {
  color: var(--color-primary);
  font-weight: 700;
}

.sl-score.decided strong {
  font-weight: 700;
}

.sl-score.decided span {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
  .schedule-line {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 4px;
    padding: 8px 10px;
  }

  .schedule-line::before {
    content: attr(data-meta);
    font-size: 0.6875rem;
    color: var(--color-text-muted);
  }

  .sl-time,
  .sl-field {
    display: none;
  }

  .sl-home,
  .sl-away {
    text-align: left;
  }

  .schedule-line {
    display: flex;
    flex-wrap: wrap;
  }

  .sl-home {
    order: 1;
    flex: 1;
  }

  .sl-score {
    order: 2;
    flex: 0 0 auto;
  }

  .sl-away {
    order: 3;
    flex: 1;
  }
}

.schedule-footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Bracket
   -------------------------------------------------------------------------- */
.bracket-card {
  margin-top: var(--space-lg);
}

.bracket {
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  padding: var(--space-md);
}

.bracket-round {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 200px;
}

.bracket-round-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-align: center;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
}

.bracket-match {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

.bracket-team:first-child {
  border-bottom: 1px solid var(--color-border-light);
}

.bracket-team.winner {
  background: var(--color-primary-light);
  font-weight: 600;
}

.bracket-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */
.results-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.admin-panel .card-body {
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.04), rgba(0, 245, 212, 0.04));
  border-radius: var(--radius-md);
}

.admin-grid {
  align-items: start;
}

.admin-actions {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.share-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 220px;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.admin-share-block {
  display: grid;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.share-qr {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.share-qr img {
  width: 140px;
  height: 140px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 6px;
  border: 1px solid var(--color-border-light);
}

.schedule-share-card {
  margin-top: var(--space-lg);
}

@media (max-width: 900px) {
  .results-layout {
    grid-template-columns: 1fr;
  }
}

.live-games {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.live-game {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.05), rgba(244, 67, 54, 0.1));
  border: 1px solid rgba(244, 67, 54, 0.2);
  border-radius: var(--radius-md);
}

.live-indicator {
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: var(--radius-full);
  animation: pulse 1.5s infinite;
}

.live-game-teams {
  flex: 1;
  font-weight: 500;
}

.live-game-field {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 500px;
  overflow-y: auto;
}

.results-locked-note {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 145, 0, 0.35);
  background: rgba(255, 145, 0, 0.12);
  color: var(--color-text);
  font-size: 0.8rem;
}

.results-list.is-locked .result-item {
  opacity: 0.7;
}

.results-list.is-locked input,
.results-list.is-locked .result-option {
  cursor: not-allowed;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

.result-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.result-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-light);
}

.result-time {
  font-weight: 600;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.result-field {
  padding: 2px 8px;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-weight: 500;
}

.result-group {
  margin-left: auto;
  font-weight: 500;
  color: var(--color-text);
}

.result-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
}

.result-team {
  font-size: 0.875rem;
}

.result-team:last-child {
  text-align: right;
}

.result-score {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.result-score input {
  width: 40px;
  padding: var(--space-xs);
  text-align: center;
  font-weight: 600;
}

.result-options {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-border-light);
}

.result-option {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.result-option:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.result-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.result-option input[type="checkbox"]:checked + span {
  color: var(--color-primary);
  font-weight: 600;
}

.result-score span {
  color: var(--color-text-muted);
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-xl);
}

/* Standings */
.standings-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.standings-group {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.standings-title {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-pitch);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.875rem;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.standings-table th,
.standings-table td {
  padding: var(--space-sm);
  text-align: center;
}

.standings-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-white);
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.standings-table th:first-child,
.standings-table td:first-child {
  text-align: left;
  padding-left: var(--space-md);
}

.standings-table tr:nth-child(even) {
  background: var(--color-white);
}

.standings-table .pos {
  font-weight: 700;
  color: var(--color-primary);
}

.standings-table .pts {
  font-weight: 700;
}

.standings-table .team-name {
  text-align: left !important;
  font-weight: 500;
}

.standings-table tr.qualifying {
  background: var(--color-success-light) !important;
}

.standings-table tr.qualifying td:first-child {
  border-left: 3px solid var(--color-success);
}

.standings-table .positive {
  color: var(--color-success);
}

.standings-table .negative {
  color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease;
}

.modal-content.modal-sm {
  max-width: 360px;
}

.modal-content.modal-lg {
  max-width: 720px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.modal-header h2 {
  font-size: 1.125rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

/* Export Options */
.export-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.export-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--color-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.export-option:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.export-option svg {
  color: var(--color-primary);
}

.export-option span {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Mode Info Grid */
.mode-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .mode-info-grid {
    grid-template-columns: 1fr;
  }
}

.mode-info-card {
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.mode-info-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.mode-info-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.mode-pros-cons {
  font-size: 0.8125rem;
  margin-top: var(--space-md);
}

.mode-pros-cons .pros {
  color: var(--color-success);
  margin-bottom: var(--space-xs);
}

.mode-pros-cons .cons {
  color: var(--color-danger);
}

.mode-details {
  margin: var(--space-sm) 0;
  padding-left: var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.mode-details li {
  margin-bottom: var(--space-xs);
}

.mode-details li strong {
  color: var(--color-primary);
}

.mode-formula {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body::before,
  .header,
  .btn,
  .section-actions,
  .modal,
  .nav,
  .filter-controls,
  .progress-section {
    display: none !important;
  }

  body {
    background: #fff !important;
    font-size: 11pt;
  }

  .section {
    display: block !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc;
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .card-header {
    background: #f5f5f5 !important;
    border-bottom: 2px solid #333;
    padding: 0.5rem 1rem;
  }

  /* Print styles for compact schedule */
  .schedule-compact {
    gap: 0 !important;
  }

  .schedule-phase {
    background: #333 !important;
    color: #fff !important;
    font-weight: bold;
    border-radius: 0 !important;
    margin: 0.5rem 0 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    page-break-before: auto;
  }

  .schedule-line {
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    padding: 0.2rem 0.4rem !important;
    font-size: 9pt;
  }

  .schedule-line:nth-child(odd) {
    background: #f9f9f9 !important;
  }

  .sl-field {
    background: #333 !important;
    color: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .schedule-row.schedule-head {
    background: #333 !important;
    color: #fff !important;
    font-weight: bold;
    border-radius: 0 !important;
  }

  .schedule-row.schedule-separator {
    background: #666 !important;
    color: #fff !important;
    margin: 0.5rem 0 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    page-break-before: auto;
  }

  .schedule-field {
    background: transparent !important;
    border: 1px solid #999;
    padding: 1px 4px !important;
    font-size: 9pt;
  }

  .standings-table {
    font-size: 10pt;
    border-collapse: collapse;
  }

  .standings-table th,
  .standings-table td {
    border: 1px solid #ccc;
    padding: 0.25rem 0.5rem;
  }

  .standings-table thead {
    background: #f0f0f0 !important;
  }

  .group-card {
    break-inside: avoid;
  }

  @page {
    margin: 1.5cm;
  }
}

/* --------------------------------------------------------------------------
   Landing Page
   -------------------------------------------------------------------------- */
.landing {
  padding-bottom: var(--space-2xl);
}

.landing-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  color: var(--color-white);
  background: linear-gradient(135deg, #0b1724 0%, #0d1b2a 50%, #0a2236 100%);
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 119, 182, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(0, 245, 212, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.landing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06) 0%, transparent 35%);
  pointer-events: none;
}

.landing-hero > * {
  position: relative;
  z-index: 1;
}

/* Landing Hero Button Styles */
.landing-hero .btn-ghost,
.landing-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.landing-hero .btn-ghost:hover,
.landing-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-2xl);
  align-items: center;
}

.landing-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
}

.landing-hero-copy h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: var(--space-sm) 0 var(--space-md);
  color: var(--color-white);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.landing-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 44ch;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: var(--space-lg) 0 var(--space-md);
}

.landing-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.highlight-card {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.highlight-title {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.highlight-sub {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.landing-hero-panel {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
}

.landing-hero-panel h2 {
  margin-bottom: var(--space-sm);
}

.landing-steps {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
  display: grid;
  gap: var(--space-md);
}

.landing-steps li {
  display: grid;
  gap: var(--space-xs);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dashed var(--color-border-light);
}

.landing-steps li:last-child {
  border-bottom: none;
}

.step-title {
  font-weight: 700;
}

.step-sub {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.landing-section {
  padding: var(--space-2xl) 0;
}

.landing-section-header {
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

.landing-section-header p {
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.landing-feature-card {
  height: 100%;
}

.landing-cta {
  padding-bottom: var(--space-2xl);
}

.landing-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-xl);
}

.landing-cta-card h2 {
  color: var(--color-white);
}

.landing-cta-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-top: var(--space-xs);
}

.landing-quick {
  background: var(--color-bg);
}

.landing-quick-inner {
  text-align: center;
}

.landing-quick-inner h2 {
  margin-bottom: var(--space-sm);
}

.landing-quick-inner p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.landing-quick-form {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  max-width: 420px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .landing-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    height: auto;
    padding: var(--space-md) 0;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: var(--space-md) 0;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: var(--space-xs);
  }

  .site-header .nav::-webkit-scrollbar {
    display: none;
  }

  .header-quick-load {
    order: 2;
    width: 100%;
    flex-wrap: wrap;
  }

  .site-header .header-quick-input {
    flex: 1;
    width: auto;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .section-actions {
    margin-left: 0;
    width: 100%;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* Schedule info header responsive */
  .schedule-info-header {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
    gap: var(--space-lg);
  }

  .schedule-info-header::after {
    display: none;
  }

  .schedule-tournament-title {
    font-size: 1.5rem;
  }

  .schedule-info-details {
    gap: var(--space-sm);
  }

  .schedule-info-item {
    font-size: 0.8125rem;
    padding: var(--space-xs) var(--space-sm);
  }

  .schedule-live-ticker {
    min-width: 100%;
    max-width: 100%;
  }

  .schedule-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: var(--space-xs);
    padding: var(--space-xs);
    -webkit-overflow-scrolling: touch;
  }

  .schedule-tabs::-webkit-scrollbar {
    display: none;
  }

  .schedule-tab {
    flex: 0 0 auto;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
  }

  .ticker-input-group {
    flex-direction: column;
    padding: var(--space-sm);
  }

  .ticker-input-group .btn {
    width: 100%;
  }

  .ticker-history-item {
    padding: var(--space-sm);
    flex-wrap: wrap;
  }

  .ticker-history-text {
    order: 2;
    width: 100%;
    margin-top: var(--space-xs);
  }
}

/* --------------------------------------------------------------------------
   Additional Small Screen Styles (< 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --space-xl: 1.5rem;
    --space-lg: 1rem;
  }

  body {
    font-size: 0.875rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8125rem;
  }

  .btn-lg {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
  }

  .card {
    padding: var(--space-md);
  }

  .card-header {
    padding: var(--space-sm) var(--space-md);
  }

  .card-body {
    padding: var(--space-sm) var(--space-md);
  }

  .form-group label {
    font-size: 0.75rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
  }

  .header-actions {
    display: none;
  }

  .logo-text {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .section-icon {
    width: 36px;
    height: 36px;
  }

  .section-icon svg {
    width: 20px;
    height: 20px;
  }

  .landing-hero {
    padding: var(--space-lg) 0;
  }

  .landing-hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .landing-hero-panel {
    padding: var(--space-md);
  }

  .landing-highlights {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .highlight-card {
    padding: var(--space-sm);
  }

  .landing-steps li {
    padding: var(--space-sm);
    padding-left: calc(var(--space-md) + 28px);
  }

  .landing-steps li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    left: var(--space-sm);
  }

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

  .mode-card {
    padding: var(--space-sm);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.625rem;
  }

  .team-list-item {
    padding: var(--space-sm);
  }

  .schedule-table .schedule-row {
    font-size: 0.75rem;
    padding: var(--space-xs);
  }

  .schedule-row .match-time {
    font-size: 0.6875rem;
  }

  .schedule-row .match-field {
    font-size: 0.625rem;
  }

  .result-card {
    padding: var(--space-sm);
  }

  .result-input {
    width: 40px;
    padding: var(--space-xs);
    font-size: 1rem;
  }

  .standings-table th,
  .standings-table td {
    padding: var(--space-xs);
    font-size: 0.75rem;
  }

  .standings-table .team-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    font-size: 10pt;
    line-height: 1.4;
    background: white !important;
  }

  /* Hide non-essential elements */
  .header,
  .site-header,
  .nav,
  .header-actions,
  .header-quick-load,
  .btn,
  .modal,
  .notification,
  .section-actions,
  .ticker-input-group,
  .schedule-tabs,
  .schedule-filters,
  .schedule-live-ticker,
  .schedule-share-card,
  .admin-panel,
  footer,
  .landing-cta,
  #section-setup,
  #section-teams,
  #section-groups {
    display: none !important;
  }

  /* Show only the schedule section for printing */
  .main,
  .container,
  .section,
  #section-schedule,
  #section-results {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Make schedule section visible */
  #section-schedule {
    display: block !important;
  }

  /* Print header info */
  .schedule-info-header {
    display: block !important;
    background: none !important;
    border: 2px solid #333;
    padding: 10pt;
    margin-bottom: 15pt;
    page-break-after: avoid;
  }

  .schedule-tournament-title {
    color: #000 !important;
    font-size: 18pt;
    font-weight: bold;
    margin-bottom: 5pt;
  }

  .schedule-info-details {
    color: #333 !important;
    font-size: 10pt;
  }

  .schedule-info-item {
    background: none !important;
    padding: 2pt 0 !important;
    color: #333 !important;
  }

  .schedule-info-item svg {
    display: none;
  }

  /* Schedule table */
  .schedule-card,
  .schedule-table {
    display: block !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
  }

  .schedule-row {
    display: grid !important;
    grid-template-columns: 80pt 1fr 50pt !important;
    border-bottom: 1px solid #ccc;
    padding: 4pt 0;
    page-break-inside: avoid;
  }

  .schedule-row:nth-child(even) {
    background: #f5f5f5 !important;
  }

  .schedule-group-header {
    background: #333 !important;
    color: white !important;
    padding: 6pt 8pt;
    font-weight: bold;
    font-size: 11pt;
    page-break-after: avoid;
    margin-top: 10pt;
  }

  /* Standings tables */
  .standings-card,
  .standings-container {
    display: block !important;
    background: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 15pt;
  }

  .standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }

  .standings-table th {
    background: #333 !important;
    color: white !important;
    padding: 4pt 6pt;
    text-align: left;
    font-weight: bold;
  }

  .standings-table td {
    padding: 3pt 6pt;
    border-bottom: 1px solid #ddd;
  }

  .standings-table tr:nth-child(even) {
    background: #f5f5f5 !important;
  }

  .standings-table .qualifying {
    background: #e6f3e6 !important;
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  .card {
    page-break-inside: avoid;
    background: none !important;
    box-shadow: none !important;
    border: 1px solid #ddd;
    margin-bottom: 10pt;
  }

  /* Links */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* Hide SVG icons in print */
  .schedule-info-item svg,
  .section-icon,
  .logo-icon,
  .btn svg {
    display: none !important;
  }

  /* Footer for print */
  @page {
    margin: 1cm;
    size: A4 portrait;
  }

  /* First page header */
  .schedule-info-main {
    background: none !important;
  }

  .schedule-info-duration {
    color: #333 !important;
  }

  /* Tab content - show all */
  .tab-content {
    display: block !important;
  }

  #tab-schedule,
  #tab-standings {
    display: block !important;
  }

  #tab-bracket {
    display: none !important;
  }
}
