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

:root{
    --deepPurple: #4B2A7A;
    --charcoal: #121212;
    --midnight: #1B2430;
    --slate: #1F2F2B;
    --graphite: #2E2E38;

    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.70);
    --border: rgba(255,255,255,.10);
    --border2: rgba(255,255,255,.14);
    --shadow: 0 12px 40px rgba(0,0,0,.55);
    --radius: 18px;
  }

  *{ box-sizing:border-box; }
  html, body{ height:100%; }

  body{
    margin:0;
    font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background:
      radial-gradient(900px 520px at 15% 10%, rgba(75,42,122,.35), transparent 60%),
      radial-gradient(700px 420px at 85% 20%, rgba(31,47,43,.30), transparent 60%),
      radial-gradient(800px 600px at 50% 100%, rgba(27,36,48,.35), transparent 60%),
      linear-gradient(180deg, var(--charcoal), var(--midnight));
  }

  .app{ max-width: 1400px; margin: 0 auto; padding: 18px 16px 28px; }

  .topbar{
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom: 14px;
  }
  .brand{
    display:flex; align-items:center; gap:10px;
    font-weight: 700;
    letter-spacing: .2px;
    font-size: 14px;
  }
  .dot{
    width:10px; height:10px; border-radius:999px;
    background: var(--deepPurple);
    box-shadow: 0 0 0 4px rgba(75,42,122,.20);
  }
  .pill{
    display:flex; align-items:center; gap:8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(46,46,56,.55);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
  }

  .card{
    background: rgba(46,46,56,.42);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow:hidden;
  }
  .cardHeader{
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(18,18,18,.22);
  }
  .cardBody{ padding: 16px; }

  .h1{ font-size: 18px; font-weight: 700; margin:0; }
  .sub{ margin-top:6px; font-size:12px; color: var(--muted); }

  .row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
  .col{ display:flex; flex-direction:column; gap:10px; }
  .spacer{ height: 8px; }
  .hr{ height:1px; background: rgba(255,255,255,.08); margin: 14px 0; }

  .label{ min-width: 240px; font-size: 12px; color: var(--muted); }

  .input, select.input{
    font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: rgba(18,18,18,.55);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    min-width: 240px;
    transition: border-color .15s ease, transform .05s ease;
  }
  .input:focus{
    border-color: rgba(75,42,122,.55);
    box-shadow: 0 0 0 3px rgba(75,42,122,.18);
  }

  .btn{
    font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: rgba(27,36,48,.92);
    border: 1px solid var(--border2);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform .05s ease, border-color .15s ease, background .15s ease;
    user-select:none;
  }
  .btn:hover{ border-color: rgba(255,255,255,.20); }
  .btn:active{ transform: translateY(1px); }
  .btn.primary{
    background: linear-gradient(180deg, rgba(75,42,122,1), rgba(75,42,122,.85));
    border-color: rgba(255,255,255,.14);
  }
  .btn.ghost{
    background: rgba(46,46,56,.25);
    border-color: var(--border);
  }
  .btn.danger{
    background: rgba(120,30,30,.60);
    border-color: rgba(255,255,255,.14);
  }

  .grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
  }
  .teamBtn{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(18,18,18,.55);
    border: 1px solid var(--border);
    color: var(--text);
    cursor:pointer;
    text-align:left;
    transition: border-color .15s ease, background .15s ease, transform .05s ease;
  }
  .teamBtn:active{ transform: translateY(1px); }
  .teamBtn .meta{
    display:flex; flex-direction:column; gap:2px;
  }
  .teamBtn .id{ font-weight: 700; font-size: 12px; color: rgba(255,255,255,.88); }
  .teamBtn .name{ font-size: 12px; color: var(--muted); }
  .teamBtn .chip{
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(46,46,56,.55);
    border: 1px solid rgba(255,255,255,.10);
    color: rgba(255,255,255,.80);
    white-space:nowrap;
  }
  .teamBtn.on{
    background: rgba(31,47,43,.92);
    border-color: rgba(80,200,140,.35);
    box-shadow: 0 0 0 3px rgba(80,200,140,.12) inset;
  }
  .teamBtn.on .chip{
    background: rgba(31,47,43,.85);
    border-color: rgba(80,200,140,.25);
    color: rgba(200,255,230,.92);
  }

  .tableWrap{ overflow:auto; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); }
  table.tbl{ width:100%; border-collapse:collapse; font-size: 12px; }
  .tbl th, .tbl td{
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    white-space: nowrap;
  }
  .tbl th{
    position: sticky; top: 0;
    background: rgba(18,18,18,.70);
    backdrop-filter: blur(8px);
    text-align:left;
    font-weight:700;
  }
  .tbl tr:hover td{ background: rgba(255,255,255,.03); }

  /* Modal + Toast */
  .overlay{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    display:none;
    align-items:center; justify-content:center;
    padding: 16px;
    z-index: 9999;
  }
  .overlay.show{ display:flex; }
  .modal{
    width: min(520px, 100%);
    background: rgba(46,46,56,.92);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.65);
    overflow:hidden;
  }
  .modalHead{
    padding: 14px 14px 10px;
    background: rgba(18,18,18,.25);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .modalTitle{ font-weight: 700; font-size: 14px; }
  .modalBody{ padding: 14px; color: var(--muted); font-size: 12px; }
  .modalFoot{
    padding: 12px 14px 14px;
    display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap;
  }

  .toastWrap{
    position: fixed;
    right: 16px;
    bottom: 16px;
    display:flex;
    flex-direction:column;
    gap:10px;
    z-index: 9999;
  }
  .toast{
    min-width: 260px;
    max-width: 360px;
    background: rgba(18,18,18,.75);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
    font-size: 12px;
    color: rgba(255,255,255,.88);
  }
  .toast .t{ font-weight: 700; font-size: 12px; }
  .toast .m{ margin-top:4px; color: rgba(255,255,255,.72); }

.btn.pro {
  background: #2ecc71;
  color: #fff;
}

.btn.amat {
  background: #e0e0e0;
  color: #333;
}


/* Admin Game: team + tick alignment */
.adminTeamRow{
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  max-width: 420px;
}

/* Table row banding for readability */
.tbl tbody tr:nth-child(odd) td{
  background: rgba(255,255,255,.02);
}
.tbl tbody tr:nth-child(even) td{
  background: rgba(255,255,255,.05);
}



/* Landing tournaments pills */
.landingWrap{
  position: relative;
  min-height: 320px;
}

.tourGrid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
gap: 14px;
  margin-top: 6px;
  padding-right: 0;
padding-bottom: 0;
}

.tourCard{
  width: 100%;
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 999px;
  background: rgba(18,18,18,.55);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}

.tourInfo{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 3px;
  min-width: 0;
}

.tourName{
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tourStatus{
  font-size: 12px;
  opacity: .8;
}

.tourOpenBtn{
  background: rgba(30, 140, 60, .85);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.95);
  border-radius: 999px;
  padding: 10px 24px;
  min-width: 120px;
  font-weight: 700;
}

.tourOpenBtn:hover{
  border-color: rgba(255,255,255,.24);
  background: rgba(30, 160, 70, .90);
}

.tourEmpty{
  opacity: .75;
  font-size: 12px;
  padding: 10px 2px;
}

@media (max-width: 640px){
  .tourGrid{
    grid-template-columns: 1fr;
    padding-right: 0;
    padding-bottom: 0;
  }
  .tourCard{
    max-width: none;
    border-radius: 18px;
  }
  




.landingActions .btn{
  pointer-events: auto;
}


/* Landing: create button under container, aligned right */


}


/* Landing header row */
.landingHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 8px;
}


/* Landing actions (button under card, aligned to card edge) */
#landingActions.landingActions{
  width: 100%;
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
}
@media (max-width: 640px){
  #landingActions.landingActions{ margin-top: 12px; }
}


/* Topbar left group + language switch */
.topLeft{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand#brandHome{
  cursor:pointer;
}

.langSwitch{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.20);
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  color: rgba(0,0,0,.92);
  user-select:none;
}

.langBtn{
  font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 14px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: rgba(0,0,0,.92);
  opacity: .45;
}

.langBtn.active{
  opacity: 1;
}

.langSep{
  opacity: .45;
  font-weight: 800;
}


/* Modern language switch */
.langSwitch{
  display:flex;
  align-items:center;
  gap:0;
  padding:4px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:none;
}

.langBtn{
  padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  background:transparent;
  color:rgba(255,255,255,.65);
  transition:all .15s ease;
}

.langBtn:hover{
  color:#fff;
}

.langBtn.active{
  background: linear-gradient(135deg, #6f4cff, #9b6dff);
  color:#fff;
}

.langSep{
  display:none;
}

/* Brand as home link */
.brand#brandHome{
  cursor:pointer;
}
