* { 
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
:root {
  --bg: #0b1020;
  --card: #121a2c;
  --muted: #8fa0bf;
  --text: #e6ecff;
  --accent: #2e64ff;
  --odd-bg: #0f1a33;
  --odd-border: #2e64ff55;
}
html, body { 
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.page-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  padding: 8px 12px;
  border-bottom: 1px solid #223;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.page-header h1 { 
  margin: 0 0 8px 0; 
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
}
.controls { 
  display: flex; 
  flex-wrap: wrap;
  gap: 8px; 
  align-items: center;
  justify-content: center;
  width: 100%;
}
.control { 
  display: flex; 
  flex-direction: column;
  gap: 4px; 
  font-size: 0.75rem; 
  color: var(--muted);
  min-width: 0;
  flex: 1 1 100px;
  max-width: 120px;
}
select, .btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid #223a;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.2s ease;
  min-height: 42px;
  width: 100%;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fa0bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}
.btn { 
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  flex: 1;
  min-width: 100px;
  font-size: 0.95rem;
  padding: 10px 16px;
}

.btn:active {
  transform: translateY(1px);
}
.btn-accent { 
  border-color: var(--accent); 
  color: #fff; 
  background: linear-gradient(180deg, #2e64ff, #1e3fb8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}
.btn-accent:disabled { 
  opacity: 0.6; 
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.status { 
  display: none; /* Hide by default on mobile */
  grid-template-columns: 1fr;
  gap: 4px; 
  width: 100%;
  margin: 8px 0 0 0;
  padding: 8px 0 0 0;
  border-top: 1px solid #223;
  font-size: 0.75rem; 
  color: var(--muted);
}
.status-line strong { color: var(--text); font-weight: 600; margin-right: 6px; }

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 12px 8px;
  width: 100%;
  box-sizing: border-box;
}
.last-updated { color: var(--muted); margin-bottom: 12px; font-size: 12px; }

.odds-board { display: grid; gap: 18px; }
.league-block { background: var(--card); border: 1px solid #223; border-radius: 12px; overflow: hidden; }
.league-header { 
  position: relative;
  display: flex; 
  flex-direction: column;
  padding: 12px 12px 8px;
  border-bottom: 1px solid #223;
  gap: 8px;
}
.league-title { 
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  color: var(--accent);
  text-align: center;
}
.platform-row { 
  display: flex; 
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 6px;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
  width: 100%;
}

.platform-row::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.platform-col.header { 
  flex: 0 0 auto;
  text-align: center; 
  font-size: 0.75rem; 
  color: var(--muted);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  white-space: nowrap;
  min-width: 80px;
}

.match-list { display: grid; }
.match-row { 
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-top: 1px solid #223;
  overflow: hidden;
  padding: 0;
}
.match-row:first-child { border-top: none; }

.match-meta { 
  padding: 12px 12px 8px;
  border-bottom: 1px solid #1a2238;
}

.match-meta .teams { 
  display: grid; 
  gap: 10px;
  padding: 4px 0;
}
.team { 
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 6px 0;
  font-size: 0.95rem;
}
.team::before {
  content: "";
  display: inline-block;
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(145deg, #264, #57a);
}

.platform-odds { 
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 8px 12px;
  gap: 8px;
  background: var(--card);
  scrollbar-width: none; /* Firefox */
}

.platform-odds::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.odd-box {
  display: flex;
  min-width: 0;
  height: 40px;
  min-width: 50px;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--odd-border);
  background: var(--odd-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-align: center;
  flex: 1;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  margin: 0;
  flex-shrink: 0;
}

.odd-box.empty {
  opacity: 0.3;
  background: transparent;
  border: 1px dashed var(--muted);
}

/* Better touch targets for mobile */
.odd-box:not(.empty):active {
  background: var(--accent);
  color: white;
  transform: scale(0.98);
}

/* Larger touch targets on mobile */
@media (max-width: 480px) {
  .odd-box {
    padding: 12px 10px;
    height: 44px;
  }
  
  .team {
    padding: 8px 0;
    font-size: 1rem;
  }
  
  .team::before {
    width: 22px;
    height: 22px;
  }
  
  .league-title {
    font-size: 1.05rem;
  }
  
  .btn {
    padding: 12px 16px;
    min-height: 46px;
  }
  
  select {
    padding: 12px 36px 12px 12px;
  }
}

@media (min-width: 768px) {
  .page-header {
    padding: 12px 20px;
    flex-direction: row;
    align-items: center;
  }
  
  .page-header h1 {
    margin: 0;
    text-align: left;
    width: auto;
  }
  
  .controls {
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: auto;
  }
  
  .status {
    display: grid;
    margin-left: 20px;
    width: auto;
    border-top: none;
    padding: 0;
    text-align: right;
  }
  
  .league-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
  }
  
  .league-title {
    margin: 0;
    text-align: left;
  }
  
  .match-row {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }
  
  .match-meta {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-bottom: none;
    border-right: 1px solid #1a2238;
  }
  
  .platform-odds {
    flex: 2;
    padding: 8px 12px;
  }
  
  .odd-box {
    height: 36px;
    min-width: 60px;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .container {
    padding: 16px 20px;
  }
  
  .page-header {
    padding: 12px 24px;
  }
  
  .page-header h1 {
    font-size: 1.3rem;
  }
  
  .league-block {
    border-radius: 12px;
  }
  
  .match-meta {
    padding: 16px 20px;
  }
  
  .platform-odds {
    padding: 12px 16px;
  }
  
  .odd-box {
    height: 40px;
    min-width: 65px;
    font-size: 0.95rem;
  }
}

/* Extra large screens */
@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
    padding: 20px 24px;
  }
  
  .odd-box {
    min-width: 70px;
  }
}
