* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body.page {
  margin: 0;
  /*background: radial-gradient(circle at 10% 10%, #0b1223 0%, #0a0f1e 45%, #080c18 100%);*/
  background: #0a0f1e;
  color: #e4e9f5;
  min-height: 100vh;
  padding: 96px 32px 32px 32px; /* top padding offsets fixed topbar */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Landing page */
body.landing-page {
  padding-top: 96px;
}

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

.landing-brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  padding: 26px;
}

.landing-title {
  margin: 0 0 10px 0;
  font-size: 44px;
  letter-spacing: 0.3px;
}

.landing-subtitle {
  margin: 0;
  color: #b8ccdd;
  font-size: 16px;
  line-height: 1.5;
  max-width: 56ch;
}

.landing-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.landing-note {
  margin: 16px 0 0 0;
  color: rgba(228, 233, 245, 0.75);
  font-size: 13px;
}

.landing-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-hero-badge {
  border: 1px solid #1f2a44;
  background: rgba(16, 24, 47, 0.55);
  border-radius: 14px;
  padding: 14px 14px;
}

.landing-hero-badge-title {
  font-weight: 800;
  color: #8ab4ff;
  margin-bottom: 4px;
}

.landing-hero-badge-text {
  color: #b8ccdd;
  font-size: 13px;
  line-height: 1.45;
}

.landing-section {
  padding: 4px 6px;
}

.landing-h2 {
  margin: 14px 0 12px 0;
  font-size: 18px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-card {
  background: rgba(16, 24, 47, 0.7);
  border: 1px solid #1f2a44;
  border-radius: 14px;
  padding: 16px 16px;
}

.landing-card h3 {
  margin: 0 0 6px 0;
  font-size: 15px;
}

.landing-card p {
  margin: 0;
  color: #b8ccdd;
  font-size: 13px;
  line-height: 1.45;
}

.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #1f2a44;
  background: rgba(16, 24, 47, 0.55);
}

.landing-step-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(138, 180, 255, 0.12);
  border: 1px solid rgba(138, 180, 255, 0.25);
  color: #e4e9f5;
  flex-shrink: 0;
}

.landing-step-title {
  font-weight: 800;
  margin-bottom: 2px;
}

.landing-step-text {
  color: #b8ccdd;
  font-size: 13px;
  line-height: 1.45;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6px 6px 6px;
  color: rgba(228, 233, 245, 0.7);
  font-size: 13px;
}

.landing-footer-sep {
  margin: 0 6px;
  color: rgba(228, 233, 245, 0.4);
}

.landing-legal-link {
  background: transparent;
  border: none;
  padding: 0;
  color: #8ab4ff;
  cursor: pointer;
  font-size: 13px;
}

.landing-legal-link:hover {
  color: #e4e9f5;
  text-decoration: underline;
}

.legal-modal {
  max-width: 900px;
}

.legal-title {
  font-weight: 900;
  color: #e4e9f5;
}

.legal-subtitle {
  color: rgba(184, 204, 221, 0.85);
  font-size: 12px;
  margin-top: 2px;
}

.legal-body {
  overflow: auto;
  max-height: calc(85vh - 62px);
  padding-right: 4px;
}

.legal-doc h3 {
  margin: 6px 0 10px 0;
  font-size: 16px;
}

.legal-doc h4 {
  margin: 14px 0 6px 0;
  font-size: 13px;
  color: #e4e9f5;
}

.legal-doc p,
.legal-doc li {
  color: #b8ccdd;
  font-size: 13px;
  line-height: 1.55;
}

.legal-doc ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.landing-footer a {
  text-decoration: none;
}

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

.page-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.container-sticky {
  position:-webkit-sticky; 
  position:sticky; 
  top:0;
}

a {
  color: #8ab4ff;
}

.auth-card,
.card {
  background: #10182f;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  width: 520px;
}

.auth-card {
  max-width: 520px;
  margin: 60px auto;
}

/* Auth page (login/register) */
body.auth-page {
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #010409 0%, #0a0f1a 100%);
  overflow: hidden;
}

.auth-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, rgba(10, 15, 30, 0) 70%);
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.auth-modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 520px;
  padding: 0 20px;
}

body.auth-page .auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 32px 28px;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e9f5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Pill-style tabs */
.auth-tabs-pill {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  width: 100%;
}

.tab-pill {
  flex: 1;
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: rgba(184, 204, 221, 0.6);
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.3s ease;
}

.tab-pill:hover {
  color: #b8ccdd;
  background: rgba(255, 255, 255, 0.05);
}

.tab-pill.active {
  color: #fff;
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.auth-brand-logo {
  width: auto;
  height: 38px;
  display: block;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 32px;
  background: #0a0f1e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  box-sizing: border-box;
}

.topbar-left {
  flex-shrink: 0;
}

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

.topbar-brand-logo {
  height: 22px;
  width: auto;
  display: block;
}

.topbar-logo {
  font-size: 18px;
  font-weight: 700;
  color: #8ab4ff;
  margin: 0;
  letter-spacing: 0.5px;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.topbar-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.topbar-nav a {
  color: #b8ccdd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.topbar-nav a:hover {
  color: #e4e9f5;
  border-bottom-color: #8ab4ff;
}

.topbar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.topbar-btn.secondary {
  background: transparent;
  color: #b8ccdd;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.topbar-btn.secondary:hover {
  background: rgba(138, 180, 255, 0.1);
  color: #e4e9f5;
  border-color: rgba(138, 180, 255, 0.3);
}

.topbar-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.topbar-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.profile-dropdown {
  position: relative;
}

.profile-dropdown #profileBtn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(16, 24, 47, 0.95);
  border: 1px solid #1f2a44;
  border-radius: 8px;
  overflow: hidden;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  margin-top: 8px;
}

.profile-dropdown:hover .dropdown-menu,
.profile-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #e4e9f5;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(138, 180, 255, 0.15);
}

.dropdown-item.logout-item:hover {
  background: rgba(220, 100, 100, 0.15);
  color: #ff6b6b;
}

.glass {
  background: rgba(16, 24, 47, 0.8);
  border: 1px solid #1f2a44;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-radius: 16px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: calc(100vh - 140px);
}

.panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  /*overflow: hidden;*/
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  border: 1px solid #24314e;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 24, 47, 0.7);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #e4e9f5;
  font-weight: 700;
  cursor: pointer;
}

.accordion-item .chevron {
  transition: transform 0.2s ease;
}

.accordion-item.active .chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 0 14px 12px 14px;
}

.accordion-item.active .accordion-panel {
  display: block;
}

.accordion-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}

/*.hover-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
}
.hover-scroll::-webkit-scrollbar {
  width: 6px;
}
.hover-scroll::-webkit-scrollbar-thumb {
  background: #24314e;
  border-radius: 10px;
}*/

/*#matches {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  scrollbar-width: none;
}*/
/*#matches::-webkit-scrollbar {
  display: none;
}*/

.odd-scope-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.odd-scope-tab {
  border: 1px solid #24314e;
  background: #0f172a;
  color: #e4e9f5;
  padding: 5px;
  border-radius: 999px;
  cursor: pointer;
  width:100px;
}

.odd-scope-tab.active {
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-color: #ef4444;
  color: #fff;
}

.search-bar {
  width: 100%;
  margin-bottom: 10px;
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #24314e;
  background: #0d1427;
  color: #e4e9f5;
  font-size: 14px;
}

.search-bar input[type="search"]::placeholder {
  color: #7c86a4;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

button.small {
  padding: 6px 10px;
  font-size: 12px;
}

.select-ghost {
  background: #10172B;
  color: #e4e9f5;
  border: 1px solid #24314e;
  border-radius: 6px;
  padding: 6px 8px;
}

.badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #8ab4ff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.muted {
  color: #a8b3cf;
  margin-top: 4px;
  font-size: 16px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(228, 233, 245, 0.85);
  margin-bottom: -6px;
}

 .tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 4px 0;
 }

 .tab {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #24314e;
  background: transparent;
  color: #e4e9f5;
 }

 .tab.active {
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  border-color: #3b82f6;
  color: #0a0f1e;
 }

input {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #e4e9f5;
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
}

input::placeholder {
  color: rgba(184, 204, 221, 0.5);
}

input:focus {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}
.tab-content.active {
  display: flex;
}

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

button {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

button:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button.ghost {
  background: transparent;
  color: #e4e9f5;
  border: 1px solid #24314e;
}

button.ghost-ai {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #e4e9f5;
  border: 1px solid #24314e;
  padding: 7px 20px;
}

.error {
  color: #fca5a5;
  min-height: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-country-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-country-item {
  border: 1px solid #24314e;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 24, 47, 0.7);
}

.match-country-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: #e4e9f5;
  cursor: pointer;
}

.match-country-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.match-country-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.match-country-header .chevron {
  color: #7c86a4;
  font-size: 12px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.match-country-item.open .match-country-header .chevron {
  transform: rotate(0deg);
}

.match-country-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.list-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #24314e;
  background: #0f172a;
  color: #e4e9f5;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.list-item.has-coach {
  border-color: #065f46;
  box-shadow: 0 0 0 1px rgba(6, 95, 70, 0.4);
}

.players-wrap {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referee-note {
  border: 1px dashed #24314e;
  background: #0f172a;
  color: #c7d2fe;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.player-block {
  overflow: hidden;
  background: #0d1427;
}

.player-block-title {
  text-align: center;
  padding: 6px 10px;
  background: #111827;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #a8b3cf;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.player-col {
  padding: 8px 16px;
}

.player-item {
  padding: 4px 0;
  font-size: 13px;
}

.player-col.home {
  text-align: left;
}

.player-col.away {
  text-align: right;
}

.selected-meta {
  padding: 10px 12px;
  border: 1px dashed #24314e;
  background: rgba(36, 49, 78, 0.2);
  color: #e4e9f5;
}

.meta-line {
  display: block;
}

.odds-grid {
  
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  /* margin-bottom: 12px; */
}

.odd-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #24314e;
  border-radius: 10px;
}

.odd-card .odd-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #a8b3cf;
}

.odd-card .odd-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}

.odd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.odd-current {
  font-size: 20px;
}

.odd-open {
  font-size: 12px;
  color: #FFA239;
  text-align: right;
}

.odd-card .arrow {
  font-size: 22px;
  font-weight: 900;
}

.ou-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ou-row-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ou-card {
  border: 1px solid #2f3d5f;
  background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
  position: relative;
}

.ou-info {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #e4e9f5;
  align-self: center;
}

.ou-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  /*font-weight: 800;*/
  letter-spacing: 0.5px;
  /*color: #f87171;*/
}

.ou-mini-open {
  font-size: 12px;
  color: #FFA239;
  text-align: right;
}

.ah-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ah-row-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ah-card {
  border: 1px solid #2f3d5f;
  background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
}

.ah-info {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #e4e9f5;
  align-self: center;
}

.arrow.up {
  color: #22c55e;
}

.arrow.down {
  color: #ef4444;
}

.arrow.flat {
  color: #a8b3cf;
}

.ai-result {
  margin-top: 10px;
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed #24314e;
  background: rgba(36, 49, 78, 0.2);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.45;
  max-height: 65vh;
  overflow-y: auto;
}

@media (max-width: 640px) {
  body.page {
    /* Keep content below the fixed topbar on mobile */
    padding: 84px 16px 16px 16px;
  }
  body.auth-page {
    padding-top: 0;
  }
  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .auth-card,
  .card {
    width: 90vw;
  }
  .auth-modal-container {
    width: 100%;
  }
  /*.topbar {
    flex-direction: column;
    align-items: flex-start;
  }*/
  .odd-scope-tab {
    width: 80px;
  }
  button {
    width: auto;
  }
  .panel {
    height: auto;
  }
  .odds-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* Mobile: OU & AH yan yana 3 kart (info, home/over, away/under) */
  .ou-row-group,
  .ah-row-group {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .ou-card,
  .ah-card {
    border-radius: 12px;
  }

  .ou-info,
  .ah-info {
    justify-content: center;
    padding: 10px 0;
  }

  .ou-card .odd-value,
  .ah-card .odd-value {
    justify-content: center;
    font-size: 18px;
  }

  .ou-mini-head,
  .ah-card .ou-mini-head {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  /* Full-screen AI Analysis modal on mobile */
  #aiModal {
    align-items: stretch;
    justify-content: stretch;
  }

  #aiModal .modal-content {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
  }

  #aiModal .modal-header {
    flex: 0 0 auto;
  }

  #aiModal #aiResult {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: none;
  }
}

@media (max-width: 420px) {
  body.page {
    padding: 84px 12px 12px 12px;
  }

  .panel-head h2 {
    font-size: 16px;
  }

  .badge {
    font-size: 11px;
    padding: 3px 7px;
  }

  .search-bar input[type="search"] {
    padding: 9px 10px;
    font-size: 13px;
  }

  .muted {
    font-size: 13px;
  }

  .topbar {
    padding: 10px 12px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-center {
    display: none;
  }

  .topbar-logo {
    font-size: 16px;
  }

  .topbar-right {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .topbar-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* Matches panel header: keep title/badge/button on one row */
  section.panel.glass:not(#oddsSection) .panel-head {
    flex-wrap: nowrap;
    align-items: center;
  }

  section.panel.glass:not(#oddsSection) .panel-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
  }

  /* Odds panel header: allow wrapping (more controls) */
  #oddsSection .panel-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  button.small {
    padding: 6px 9px;
    font-size: 11px;
  }

  .select-ghost {
    padding: 6px 7px;
    font-size: 12px;
  }

  .match-list {
    gap: 8px;
  }

  .match-country-name {
    max-width: 120px;
  }

  .match-country-body {
    padding: 10px;
    gap: 8px;
  }

  .list-item {
    padding: 10px;
    border-radius: 10px;
  }

  .list-item strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .panel-actions > * {
    min-width: 0;
  }

  /* Odds panel controls: keep them readable on one screen */
  #aiAnalysisType {
    flex: 1 1 100%;
  }

  #aiExplain,
  #aiLang,
  #aiDebug {
    flex: 1 1 calc(50% - 4px);
  }

  .odd-card .odd-value {
    font-size: 16px;
  }

  .odd-current {
    font-size: 18px;
  }

  .modal-content {
    width: calc(100% - 24px);
    max-height: 90vh;
  }

  .modal-header {
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }

  .modal-header > div {
    flex-wrap: wrap;
    gap: 6px;
  }

  .profile-modal {
    max-width: 100%;
  }

  .ai-logs-list {
    padding: 12px;
    max-height: calc(90vh - 64px);
  }

  .ai-log-card {
    padding: 12px;
  }

  .ai-log-card-row {
    flex-direction: column;
    gap: 8px;
  }

  .ai-log-card-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ai-log-badge {
    padding: 5px 10px;
  }

  .profile-sections {
    grid-template-columns: 1fr;
  }

  .profile-section {
    padding: 16px;
  }

  .form-footer {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

.bts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.bts-card {
  border: 1px solid #2f3d5f;
  background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
}

.dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.cs-card {
  border: 1px solid #2f3d5f;
  background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
}

.htft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.htft-card {
  border: 1px solid #2f3d5f;
  background: linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
}
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  max-width: 720px;
  width: 90%;
  padding: 16px;
  z-index: 1001;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.profile-modal {
  max-width: 1000px;
}

.profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.profile-section {
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(13, 20, 39, 0.6) 100%);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.profile-section:hover {
  border-color: #2f3d5f;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

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

.section-info h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: #e4e9f5;
}

.section-info .muted {
  margin: 0;
  font-size: 13px;
  color: #8899aa;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
  flex: 1;
}

.password-grid {
  gap: 10px !important;
  margin-bottom: 16px !important;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.label-text {
  font-size: 13px;
  font-weight: 500;
  color: #b8ccdd;
  text-transform: capitalize;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #1f2a44;
}

.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.status {
  font-size: 13px;
  color: #e4e9f5;
  min-height: 18px;
}

.status.error {
  color: #ff6b6b;
}

.status.success {
  color: #51d68b;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 2px solid #1f2a44;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-radius: 8px 8px 0 0;
  padding: 0;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #8899aa;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn:hover {
  color: #b8ccdd;
  background: rgba(107, 114, 128, 0.1);
}

.tab-btn.active {
  color: #8ab4ff;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

/* Form Rows for Register */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row > div {
  display: flex;
  flex-direction: column;
}

.form-row input {
  margin-top: 8px;
}

.optional {
  color: #667b88;
  font-size: 12px;
  font-weight: 400;
}

/* AI Logs Modal */
.ai-logs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(85vh - 64px);
  overflow-y: auto;
  padding: 20px;
}

.ai-log-card {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-log-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(102, 126, 234, 0.5);
}

.ai-log-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ai-log-card-main {
  flex: 1;
  min-width: 0;
}

.ai-log-card-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.ai-log-card-league {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}

.ai-log-card-meta {
  font-size: 11px;
  color: #999;
}

.ai-log-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.ai-log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.ai-log-badge--type {
  background: rgba(255, 180, 50, 0.25);
  color: #ffb432;
  font-size: 10px;
  font-weight: 600;
}

.ai-log-badge--view {
  background: rgba(100, 200, 255, 0.2);
  font-size: 11px;
}
