:root {
  --gold: #f5a623;
  --gold-light: #ffd166;
  --bg0: #0a0a0a;
  --bg1: #1a1a2e;
  --glass: rgba(255,255,255,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: linear-gradient(160deg, var(--bg0) 0%, #12122a 55%, var(--bg1) 100%);
  background-attachment: fixed;
  color: #e8e8ee;
  min-height: 100vh;
  overflow-x: hidden;
}

.num { font-family: 'Inter', sans-serif; font-feature-settings: 'tnum'; }

.app-shell { position: relative; min-height: 100vh; padding-bottom: 88px; }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 400px at 80% -5%, rgba(245,166,35,0.12), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(245,166,35,0.08), transparent 70%);
}

/* Header */
.gp-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 14px 18px;
  background: rgba(10,10,15,0.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245,166,35,0.25);
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-ball { font-size: 30px; filter: drop-shadow(0 0 8px rgba(245,166,35,0.7)); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-en {
  display: block; font-weight: 900; font-size: 20px; letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), #d4880f);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-fa { display: block; font-size: 12px; color: rgba(245,166,35,0.85); font-weight: 500; }
.status-bar { display: flex; align-items: center; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.sb-date { color: #b9b9c8; }
.sb-clock { color: var(--gold-light); font-weight: 600; letter-spacing: 1px; }
.sb-tier {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid; border-radius: 20px; padding: 4px 12px; font-weight: 700; font-size: 12px;
}
.tier-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Main */
.main-area { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 20px 16px; }
.view { display: block; }
.section-title { font-size: 20px; font-weight: 800; margin: 8px 0 18px; color: #f0f0f5; }
.section-sub { font-size: 16px; font-weight: 700; margin: 26px 0 14px; color: var(--gold-light); }
.sub-note { color: #a9a9bb; font-size: 13px; margin-bottom: 18px; }
.empty { text-align: center; padding: 40px 20px; color: #8a8a9e; font-size: 15px; border: 1px dashed rgba(245,166,35,0.3); border-radius: 16px; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: rgba(255,255,255,0.04); border: 1.5px solid; border-radius: 18px;
  padding: 16px 10px; text-align: center; backdrop-filter: blur(8px);
}
.stat-icon { font-size: 22px; margin-bottom: 6px; }
.stat-val { font-size: 30px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 12px; color: #b9b9c8; margin-top: 6px; }

/* Match card */
.match-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.match-card {
  background: linear-gradient(145deg, rgba(30,30,50,0.85), rgba(15,15,28,0.9));
  border: 1.5px solid rgba(245,166,35,0.3);
  border-radius: 18px; padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.match-card:hover { transform: translateY(-3px); border-color: rgba(245,166,35,0.6); box-shadow: 0 16px 40px rgba(245,166,35,0.18); }
.match-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.team-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.team-name { font-size: 13px; font-weight: 700; text-align: center; max-width: 100px; }
.club-badge { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.vs-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 6px; }
.vs { font-size: 22px; font-weight: 900; color: var(--gold); text-shadow: 0 0 12px rgba(245,166,35,0.5); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.status-dot.pending { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.match-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 12px; flex-wrap: wrap; }
.mb-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #c9c9d6; }
.mb-icon { font-size: 14px; }
.mb-time { font-size: 11px; }
.mb-conf { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 120px; justify-content: flex-end; }
.conf-num { font-size: 12px; font-weight: 700; color: var(--gold-light); }

/* Conf bar */
.conf-track { flex: 1; height: 8px; background: rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden; max-width: 120px; }
.conf-track.big { max-width: none; height: 12px; margin-top: 10px; }
.conf-fill { height: 100%; background: linear-gradient(90deg, #d4880f, var(--gold), var(--gold-light)); border-radius: 6px; transition: width 1.1s cubic-bezier(.16,1,.3,1); box-shadow: 0 0 10px rgba(245,166,35,0.5); }

/* Stagger animation */
.stagger { opacity: 0; transform: translateY(24px); animation: rise .55s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Detail sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .3s ease; }
.sheet-backdrop.closing { animation: fadeOut .3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #16162b, #0b0b16);
  border-top: 2px solid var(--gold); border-radius: 24px 24px 0 0;
  padding: 14px 18px 30px; box-shadow: 0 -20px 60px rgba(0,0,0,0.7);
  animation: slideUp .38s cubic-bezier(.16,1,.3,1);
}
.sheet.closing { animation: slideDown .32s ease forwards; }
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes slideDown { to { transform: translateY(100%); } }
.sheet-handle { width: 46px; height: 5px; border-radius: 4px; background: rgba(245,166,35,0.5); margin: 0 auto 16px; cursor: pointer; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.sh-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.sh-name { font-size: 14px; font-weight: 800; text-align: center; }
.sh-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; }
.sh-vs { font-size: 26px; }
.sh-date { font-size: 11px; color: #9a9aae; }

.pred-box { background: linear-gradient(135deg, rgba(245,166,35,0.18), rgba(245,166,35,0.05)); border: 1.5px solid var(--gold); border-radius: 16px; padding: 16px; text-align: center; margin-bottom: 18px; }
.pred-title { font-size: 12px; color: var(--gold-light); font-weight: 700; letter-spacing: 1px; }
.pred-main { font-size: 22px; font-weight: 900; margin: 8px 0 4px; color: #fff; }
.pred-conf { font-size: 13px; color: #cfcfda; }

.stats-compare { background: rgba(255,255,255,0.04); border-radius: 14px; padding: 6px 12px; margin-bottom: 14px; }
.sc-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sc-row:last-child { border-bottom: none; }
.sc-row.header { font-weight: 800; color: var(--gold-light); font-size: 13px; }
.sc-cell { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.sc-mid { flex: 1.4; text-align: center; font-size: 12px; color: #9a9aae; }

.last5-wrap { display: flex; gap: 14px; margin-bottom: 16px; }
.l5-side { flex: 1; background: rgba(255,255,255,0.03); border-radius: 12px; padding: 10px; text-align: center; }
.l5-label { font-size: 11px; color: #9a9aae; margin-bottom: 8px; }
.l5-pills { display: flex; gap: 5px; justify-content: center; }
.wdl { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }

.strength-wrap { margin-bottom: 18px; }
.sw-title { font-size: 13px; font-weight: 700; color: var(--gold-light); margin-bottom: 12px; text-align: center; }
.sw-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sw-name { width: 90px; font-size: 12px; font-weight: 700; text-align: left; }
.sw-track { flex: 1; height: 14px; background: rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden; }
.sw-fill { height: 100%; border-radius: 8px; transition: width 1.1s cubic-bezier(.16,1,.3,1); }
.sw-fill.home { background: linear-gradient(90deg, #22c55e, #4ade80); }
.sw-fill.away { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.sw-val { width: 30px; font-weight: 800; font-size: 14px; }

.result-box { padding: 16px; border-radius: 16px; }
.rb-title { font-size: 13px; font-weight: 700; color: var(--gold-light); margin-bottom: 12px; }
.rb-btns { display: flex; gap: 8px; }
.rb-btn { flex: 1; padding: 12px 4px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: #d0d0dc; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; }
.rb-btn:hover { border-color: var(--gold); }
.rb-btn.active { background: linear-gradient(135deg, var(--gold), #d4880f); color: #111; border-color: var(--gold); }
.rb-status { margin-top: 12px; text-align: center; font-weight: 800; font-size: 14px; }
.rb-status.correct { color: #22c55e; }
.rb-status.incorrect { color: #ef4444; }

/* Glass */
.glass { background: rgba(255,255,255,0.055); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 8px 30px rgba(0,0,0,0.35); }

/* Admin form */
.admin-form { border-radius: 20px; padding: 20px; }
.form-row { margin-bottom: 16px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gp-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: #c9c9d6; margin-bottom: 8px; }
.conf-badge { background: linear-gradient(135deg, var(--gold), #d4880f); color: #111; padding: 2px 10px; border-radius: 12px; font-weight: 800; font-size: 13px; }
.gp-input { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.12); color: #fff; font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s; }
.gp-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,0.15); }
input[type=datetime-local].gp-input { color-scheme: dark; }

.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: #16162b; border: 1px solid rgba(245,166,35,0.4); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.ac-item { padding: 10px 14px; font-size: 14px; cursor: pointer; }
.ac-item:hover { background: rgba(245,166,35,0.15); color: var(--gold-light); }

.pred-btns { display: flex; gap: 8px; }
.pred-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #c9c9d6; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; }
.pb-icon { font-size: 20px; }
.pred-btn:hover { border-color: rgba(245,166,35,0.5); }
.pred-btn.active { background: linear-gradient(135deg, rgba(245,166,35,0.3), rgba(245,166,35,0.1)); border-color: var(--gold); color: #fff; box-shadow: 0 0 18px rgba(245,166,35,0.25); }

.gp-slider { -webkit-appearance: none; width: 100%; height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--gold) var(--p), rgba(255,255,255,0.12) var(--p)); outline: none; }
.gp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold)); border: 2px solid #111; cursor: pointer; box-shadow: 0 0 10px rgba(245,166,35,0.6); }
.gp-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid #111; cursor: pointer; }

.gold-btn { position: relative; overflow: hidden; width: 100%; padding: 15px; border: none; border-radius: 14px; background: linear-gradient(135deg, var(--gold-light), var(--gold), #d4880f); color: #111; font-family: inherit; font-size: 16px; font-weight: 900; cursor: pointer; box-shadow: 0 8px 24px rgba(245,166,35,0.35); transition: transform .15s; }
.gold-btn:active { transform: scale(0.98); }

/* Ripple */
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.5); transform: scale(0); animation: rippleAnim .6s ease-out; pointer-events: none; }
@keyframes rippleAnim { to { transform: scale(2.5); opacity: 0; } }

/* Admin list */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row-wrap { position: relative; border-radius: 14px; overflow: hidden; }
.admin-row-del { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 18px; background: linear-gradient(90deg, #ef4444, #b91c1c); color: #fff; font-weight: 800; font-size: 13px; }
.admin-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(20,20,36,0.95); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; transition: transform .25s; }
.ar-vs { font-size: 13px; color: var(--gold); font-weight: 800; }
.ar-text { flex: 1; font-size: 13px; font-weight: 600; }
.ar-del { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.4); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-weight: 900; }
.ar-del:hover { background: #ef4444; color: #fff; }

/* Plans */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card { position: relative; border: 2px solid; border-radius: 22px; padding: 26px 18px; text-align: center; transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s; box-shadow: 0 12px 34px rgba(0,0,0,0.5); }
.plan-card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 24px 60px rgba(0,0,0,0.6); }
.plan-card.popular { transform: scale(1.04); }
.plan-card.popular:hover { transform: translateY(-10px) scale(1.07); }
.plan-card.owned { box-shadow: 0 0 0 3px rgba(245,166,35,0.6), 0 12px 34px rgba(0,0,0,0.5); }
.ribbon { position: absolute; top: 14px; left: -34px; transform: rotate(-45deg); background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #111; font-size: 10px; font-weight: 900; padding: 4px 40px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.plan-icon { font-size: 46px; margin-bottom: 10px; }
.plan-name { font-size: 20px; font-weight: 900; }
.plan-price { font-size: 18px; font-weight: 800; margin: 8px 0 16px; color: #fff; }
.plan-perks { list-style: none; text-align: right; margin-bottom: 20px; }
.plan-perks li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 0; color: #d0d0dc; border-bottom: 1px solid rgba(255,255,255,0.06); }
.perk-check { color: #22c55e; font-weight: 900; }
.plan-btn { width: 100%; padding: 13px; border: none; border-radius: 14px; background: linear-gradient(135deg, var(--gold-light), var(--gold), #d4880f); color: #111; font-family: inherit; font-size: 15px; font-weight: 900; cursor: pointer; position: relative; overflow: hidden; transition: transform .15s; }
.plan-btn:active { transform: scale(0.97); }
.plan-btn.owned { background: rgba(34,197,94,0.2); color: #22c55e; border: 1px solid #22c55e; }

/* Footer */
.gp-footer { position: relative; z-index: 1; text-align: center; padding: 24px 16px 10px; }
.remix-link { color: var(--gold); font-weight: 700; text-decoration: none; font-size: 14px; border-bottom: 1px dashed rgba(245,166,35,0.5); }
.remix-link:hover { color: var(--gold-light); }
.disclaimer { display: block; font-size: 11px; color: #6a6a7e; margin-top: 10px; }

/* Nav */
.gp-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-around; background: rgba(10,10,18,0.9); backdrop-filter: blur(16px); border-top: 1px solid rgba(245,166,35,0.25); padding: 8px 0 max(8px, env(safe-area-inset-bottom)); }
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: #8a8a9e; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; padding: 6px 20px; border-radius: 12px; transition: color .2s; }
.nav-icon { font-size: 20px; transition: transform .2s; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active .nav-icon { transform: translateY(-2px) scale(1.15); filter: drop-shadow(0 0 8px rgba(245,166,35,0.6)); }

/* Responsive */
@media (max-width: 720px) {
  .plans-grid { grid-template-columns: 1fr; }
  .plan-card.popular, .plan-card { transform: none; }
  .plan-card:hover { transform: translateY(-6px); }
}
@media (min-width: 721px) and (max-width: 1000px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
  .match-list { grid-template-columns: 1fr 1fr; }
  .gp-nav { top: 0; bottom: auto; border-top: none; }
  .app-shell { padding-bottom: 0; padding-top: 0; }
}
</style>