:root{
  --bg0:#07080a;
  --bg1:#0b0f14;
  --text:#e7e1d8;
  --muted:rgba(231,225,216,.72);

  --ember2:#ff5a3d;
  --emberGlow:rgba(255,90,61,.22);

  --shadow:0 18px 60px rgba(0,0,0,.55);
}

*{ box-sizing:border-box; }
a.t-link { color: var(--ember2); text-decoration: none; }
a.t-link:hover { text-decoration: underline; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: var(--bg0);
  min-height: 100%;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/img/bg.jpg") center/cover no-repeat;
  filter: blur(5px) brightness(0.28);
  transform: scale(1.06);
}

.site-header{
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10,12,16,.92), rgba(10,12,16,.70));
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
}

.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height: 64px;
}

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

/* --- Game Select --- */
.game-select{
  position: relative;
  flex-shrink: 0;
}

.game-select summary{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 6px 0 5px;
  border-radius: 10px;
  border: 1px solid rgba(255,90,61,.28);
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(180deg, rgba(195,58,43,.35), rgba(15,20,28,.2));
  box-shadow: 0 0 0 1px rgba(0,0,0,.45) inset, 0 10px 30px rgba(0,0,0,.35);
  cursor: pointer;
  user-select: none;
  transition: border-color .18s;
}

.game-select summary::-webkit-details-marker{ display: none; }
.game-select summary::marker{ display: none; }

.game-select summary:hover{
  border-color: rgba(255,90,61,.48);
}

.game-select-icon{ font-size: 16px; line-height: 1; }

.game-select-arrow{
  font-size: 9px;
  opacity: .75;
  color: var(--text);
  transition: transform .18s;
}

.game-select[open] .game-select-arrow{
  transform: rotate(180deg);
}

.game-select-menu{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(14,19,27,.98), rgba(10,12,16,.95));
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.game-select-item{
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-select-item.is-active{
  background: rgba(255,90,61,.12);
  color: var(--text);
  cursor: default;
}

.game-select-item.is-disabled{
  color: rgba(231,225,216,.35);
  cursor: not-allowed;
}

.game-select-check{
  font-size: 11px;
  width: 12px;
  color: var(--ember2);
}

.game-select-item.is-disabled .game-select-check{
  color: transparent;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
  font-weight:800;
  letter-spacing:.4px;
  min-width: 0;
}

.brand-mark{
  width:34px;
  height:34px;
  flex: 0 0 34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(180deg, rgba(195,58,43,.35), rgba(15,20,28,.2));
  border:1px solid rgba(255,90,61,.28);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45) inset, 0 10px 30px rgba(0,0,0,.35);
}

.brand-text{
  min-width: 0;
}

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

.btn{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .06s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  text-align: center;
}

.btn:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
}

.btn:active{
  transform: translateY(1px);
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.btn:disabled:hover{
  background: inherit;
  border-color: inherit;
}

.btn-ghost{ background: transparent; }

.btn-primary{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(195,58,43,.55), rgba(110,20,14,.35));
  border-color: rgba(255,90,61,.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset, 0 0 18px var(--emberGlow);
}

.btn-primary:hover{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(180deg, rgba(225,58,43,.62), rgba(130,24,16,.40));
  border-color: rgba(255,90,61,.48);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset, 0 0 22px rgba(255,90,61,.28);
}

.btn-success{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(34,197,94,.55), rgba(20,110,52,.35));
  border-color: rgba(74,222,128,.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset, 0 0 18px rgba(74,222,128,.18);
}

.btn-success:hover{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(180deg, rgba(34,197,94,.65), rgba(22,128,60,.40));
  border-color: rgba(74,222,128,.48);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset, 0 0 22px rgba(74,222,128,.24);
}

.btn-danger{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(207,46,34,.60), rgba(95,14,10,.35));
  border-color: rgba(255,90,61,.28);
}

.btn-danger:hover{
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(225,58,43,.70), rgba(110,16,12,.38));
  border-color: rgba(255,90,61,.40);
}

.btn-sm{
  padding: 7px 10px;
  font-size: 13px;
  min-height: 34px;
}

.btn-block{ width:100%; }

.btn-outline{
  background: transparent;
  border-color: rgba(255,255,255,.18);
  color: var(--text);
}
.btn-outline:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.28);
}

.t-card-actions{
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.user-badge{
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page{
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 18px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero{
  width:min(760px, 100%);
  padding: 34px 22px;
  text-align:center;
  border-radius: 18px;
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(255,90,61,.10), transparent 65%),
    linear-gradient(180deg, rgba(14,19,27,.85), rgba(10,12,16,.65));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}



.hero-title{
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
}

.hero-tagline{
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.hiw-section{
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 18px;
}

.hiw-title{
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 0 0 12px;
}

.past-tournaments-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.past-tournaments-table tr{
  border-bottom: 1px solid rgba(231,225,216,.12);
}
.past-tournaments-table td{
  padding: 8px 10px;
  color: var(--muted);
}
.past-tournaments-table td:first-child{
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.past-t-paid{ color: rgba(34,197,94,1) !important; }
.past-t-pending{ color: #f59e0b !important; }

.how-it-works{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.hiw-step{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 28px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  flex: 1;
  text-align: center;
}

.hiw-num{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(195,58,43,.90), rgba(110,20,14,.85));
  border: 1px solid rgba(255,90,61,.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset, 0 0 14px rgba(255,90,61,.18);
}

.hiw-step strong{
  font-size: 15px;
  color: var(--text);
}

.hiw-step span{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}



.field{ margin-bottom: 10px; }
.field-check{ margin-top: 2px; margin-bottom: 6px; }
.check-label{ display:flex; align-items:flex-start; gap:8px; cursor:pointer; color:var(--muted); font-size:13px; line-height:1.4; margin-bottom:0; }
.check-label input[type="checkbox"]{ width:15px; height:15px; flex-shrink:0; cursor:pointer; margin-top:1px; accent-color:var(--ember2); }

label{
  display:block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

input{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(22px 22px at 25% 15%, rgba(255,255,255,.08), transparent 60%),
    rgba(0,0,0,.25);
  color: var(--text);
  outline: none;
}

input:focus{
  border-color: rgba(255,90,61,.45);
  box-shadow: 0 0 0 3px rgba(255,90,61,.12);
}

.error{
  color: #ff8b7a;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}
.field-hint{
  color: rgba(231,225,216,.45);
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.modal.is-open{ display: block; }

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

.user-grid{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.user-row{
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  align-items: center;
}

.user-k{
  color: rgba(231,225,216,.65);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 13px;
}

.user-v{
  color: rgba(231,225,216,.92);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  min-width: 0;
  word-break: break-word;
}

@media(max-width:820px){
  .user-row{
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }
}

.modal-dialog{
  position: relative;
  width: min(480px, calc(100% - 28px));
  margin: 10vh auto 0;
  border-radius: 18px;
  background:
    radial-gradient(520px 180px at 50% 0%, rgba(255,90,61,.10), transparent 65%),
    linear-gradient(180deg, rgba(14,19,27,.95), rgba(10,12,16,.82));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header{
  padding: 14px 14px 10px 16px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.modal-title{
  margin: 0;
  font-size: 18px;
}

.modal-body{
  padding: 14px 16px 16px;
}

.predict-rules{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin-bottom: 14px;
}

.predict-rules-title{
  font-size: 13px;
  font-weight: 800;
  color: rgba(231,225,216,.92);
  margin-bottom: 8px;
}

.predict-rules-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(231,225,216,.72);
  font-size: 13px;
  line-height: 1.5;
}

.reg-terms{
  padding: 12px 16px 4px;
  font-size: 12px;
  color: rgba(231,225,216,.50);
  line-height: 1.5;
}

.reg-terms-title{
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(231,225,216,.65);
}

.reg-terms ul{
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reg-terms a{
  color: rgba(231,225,216,.70);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reg-terms a:hover{
  color: var(--text);
}

.icon-btn{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color:var(--text);
  width:40px;
  height:40px;
  border-radius:12px;
  cursor:pointer;
}

.icon-btn:hover{
  background: rgba(255,255,255,.07);
}

.site-footer{
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(10,12,16,.38), rgba(10,12,16,.18));
}

.site-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px 28px;
}

.footer-note{
  margin: 0 0 10px;
  color: rgba(231,225,216,.62);
  font-size: 13px;
  line-height: 1.6;
}

.footer-note:last-of-type{
  margin-bottom: 14px;
}

.footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.footer-links a{
  color: rgba(231,225,216,.86);
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover{
  text-decoration: underline;
}

.info-page{
  width:min(900px, 100%);
  padding: 28px 22px;
  text-align:left;
}

.info-page h1{
  margin: 0 0 18px;
  font-size: clamp(28px, 3vw, 40px);
}

.info-page h2{
  margin: 26px 0 10px;
  font-size: 20px;
}

.info-page p{
  margin: 0 0 14px;
  color: rgba(231,225,216,.82);
  line-height: 1.68;
}

.info-page ul{
  margin: 0 0 14px;
  padding-left: 20px;
  color: rgba(231,225,216,.82);
  line-height: 1.65;
}

.info-page li{
  margin-bottom: 8px;
}

.info-page .lead{
  color: rgba(231,225,216,.92);
  font-weight: 700;
}

.info-page .notice{
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(231,225,216,.82);
}

.hidden{ display:none !important; }

@media (max-width: 820px){
  .header-inner{
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .user-badge{
    max-width: 100%;
  }
}

@media (max-width: 640px){
  .header-inner{
    padding: 12px;
    gap: 12px;
  }

  .brand{
    width: 100%;
  }

  .brand-text{
    font-size: 14px;
    line-height: 1.2;
  }

  .header-actions{
    width: 100%;
    gap: 8px;
  }

  .header-actions .btn{
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding: 10px 12px;
    font-size: 13px;
  }

  .page{
    padding: 34px 12px 60px;
  }

  .hero{
    padding: 26px 14px;
  }

  .how-it-works{
    flex-direction: column;
  }

  .hiw-section{
    padding: 20px 14px;
  }


  .modal-dialog{
    width: min(100% - 20px, 480px);
    margin-top: 8vh;
  }

  .modal-header{
    padding: 12px;
  }

  .modal-body{
    padding: 12px;
  }

  .site-footer-inner{
    padding: 20px 12px 24px;
  }

  .footer-links{
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .info-page{
    padding: 22px 14px;
  }
}