:root {
  --bg: #04120b;
  --bg-soft: #0a1f15;
  --card: rgba(8, 35, 22, 0.82);
  --text: #e6fff0;
  --muted: #9fcab3;
  --primary: #3bd38a;
  --secondary: #2f8f62;
  --border: rgba(90, 190, 135, 0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #103423 0%, var(--bg) 58%);
  min-height: 100vh;
  overflow-x: hidden;
}
.bg-glow { position: fixed; width: 22rem; height: 22rem; border-radius: 50%; filter: blur(70px); opacity: .35; z-index: -1; }
.bg-glow--one { top:-8rem; right:-6rem; background:#32cc7c; }
.bg-glow--two { left:-8rem; bottom:-8rem; background:#1c6b49; }

.side-agent { position: fixed; top: 86px; width: min(22vw, 360px); max-height: 88vh; object-fit: contain; opacity: .9; z-index: 0; pointer-events: none; filter: drop-shadow(0 0 30px rgba(59,211,138,.35)); }
.side-agent--left { left: 8px; }
.side-agent--right { right: 8px; }
.container { width:min(1220px,92vw); margin:0 auto; position: relative; z-index: 1; }
.header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.1rem 0; }
.brand-wrap { display:flex; align-items:center; gap:.8rem; }
.brand-logo { width:120px; height:120px; border-radius:16px; border:1px solid var(--border); padding:10px; background: transparent; }
.inline-logo { width:40px; height:40px; vertical-align:middle; background: transparent; }
.brand { font-weight:800; letter-spacing:.12em; }
.tabs { display:flex; gap:.7rem; flex-wrap:wrap; }
.tab-btn,.btn { border:1px solid var(--border); border-radius:.8rem; padding:.62rem 1rem; color:var(--text); background:rgba(13,42,27,.8); font:inherit; font-weight:600; cursor:pointer; }
.tab-btn.is-active { background:linear-gradient(90deg,var(--primary),var(--secondary)); color:#03130b; border-color:transparent; }
.hero { padding:1.4rem 0 .3rem; }
.pill { border:1px solid var(--border); border-radius:999px; padding:.3rem .75rem; color:#b8ffd8; background:rgba(70,196,127,.12); font-size:.85rem; }
h1 { margin:.9rem 0; font-size:clamp(1.55rem,3.1vw,2.5rem); }
h2,h3 { margin:.2rem 0 1rem; }
.hint { color: var(--muted); margin: .3rem 0 .8rem; }
.tab-panel { display:none; background:var(--card); border:1px solid var(--border); border-radius:1rem; padding:1rem; margin:1rem 0; backdrop-filter: blur(10px); }
.tab-panel.is-active { display:block; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; min-width:620px; }
th,td { text-align:left; padding:.65rem; border-bottom:1px solid rgba(110,201,149,.2); }
th { color:#d6ffe8; white-space: nowrap; }
td { color:var(--muted); }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(70, 196, 127, .12); }
.team-logo { width:58px; height:58px; object-fit: contain; border-radius:50%; border:1px solid var(--border); background: rgba(6,32,21,.8); padding:4px; }
.tournaments-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.t-card { background:rgba(7,25,16,.9); border:1px solid rgba(110,201,149,.28); border-radius:.85rem; padding:.85rem; cursor:pointer; }
.t-card:hover { border-color: rgba(129, 239, 173, .75); transform: translateY(-2px); }
.t-tag { display:inline-block; font-size:.76rem; padding:.2rem .5rem; border-radius:999px; margin-bottom:.4rem; }
.t-tag.current { background:rgba(64,222,140,.2); color:#81ffc2; }
.t-tag.past { background:rgba(132,171,148,.2); color:#d2f7df; }
.t-tag.upcoming { background:rgba(180,255,184,.14); color:#cfffbb; }
.detail-panel { min-height: 260px; }

.news-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.news-card { display:grid; gap:.35rem; text-align:left; width:100%; }
.news-card span { color: var(--muted); font-size:.9rem; }
.news-content { white-space: pre-wrap; line-height: 1.6; color: #d4fce5; background: rgba(7,25,16,.7); border:1px solid rgba(110,201,149,.28); border-radius:.8rem; padding:.9rem; }

.meta-line { display:flex; flex-wrap:wrap; gap:.9rem; margin-bottom:1rem; color:#cfffe0; }
.participant-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.7rem; }
.participant-card { border:1px solid rgba(110,201,149,.28); background:rgba(7,25,16,.85); border-radius:.8rem; padding:.7rem; text-align:center; }
.participant-card img { width:54px; height:54px; object-fit:contain; display:block; margin:0 auto .4rem; }
.profile-head,.player-head { display:flex; gap:1rem; align-items:center; margin-bottom:1rem; }
.profile-logo { width:108px; height:108px; object-fit:contain; border-radius:16px; border:1px solid var(--border); padding:8px; }
.player-photo { width:160px; height:190px; object-fit:cover; border-radius:14px; border:1px solid var(--border); background: rgba(7,25,16,.85); }
.stat-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; margin-bottom:1rem; }
.stat-card { background:rgba(7,25,16,.85); border:1px solid rgba(110,201,149,.28); border-radius:.7rem; padding:.7rem; }
.stat-card strong { display:block; color:#dcffe9; margin-bottom:.35rem; }
.admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.admin-card { margin-top:.8rem; background:rgba(7,25,16,.85); border:1px solid rgba(110,201,149,.28); border-radius:.85rem; padding:.85rem; }
.form-grid { display:grid; gap:.5rem; }
input,select,textarea { background:#062015; border:1px solid var(--border); border-radius:.55rem; color:var(--text); padding:.55rem .65rem; font:inherit; }
.file-label { display:grid; gap:.35rem; color:var(--muted); font-size:.9rem; }
.action-btn { padding:.45rem .7rem; border-radius:.5rem; border:1px solid var(--border); background:#0d3f28; color:var(--text); cursor:pointer; margin-right:.3rem; }
.action-btn.danger { background:#3d1717; border-color:#814141; }
.footer { display:flex; justify-content:space-between; padding:1rem 0 1.8rem; color:var(--muted); border-top:1px solid rgba(90,190,135,.25); }
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); z-index: 30; }
.modal.hidden { display: none; }
.modal-card { width:min(420px,90vw); background: #0b271a; border:1px solid var(--border); border-radius:1rem; padding:1rem; }
@media (max-width:980px){ .header{flex-direction:column; align-items:flex-start;} .tournaments-grid,.admin-grid,.participant-grid,.stat-cards,.news-grid{grid-template-columns:1fr;} .profile-head,.player-head{flex-direction:column; align-items:flex-start;} .footer{flex-direction:column; gap:.6rem;} .brand-logo{width:94px;height:94px;} .side-agent{display:none;} }


.btn,.tab-btn,.action-btn,.news-card,.t-card { transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease; }
.btn:hover,.tab-btn:hover,.action-btn:hover,.news-card:hover,.t-card:hover { box-shadow: 0 0 0 1px rgba(85,255,169,.35), 0 0 24px rgba(62,214,139,.35); transform: translateY(-1px); }
.btn:active,.tab-btn:active,.action-btn:active,.news-card:active,.t-card:active { transform: scale(.98); }

.spark-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.green-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163,255,210,.95) 0%, rgba(59,211,138,.9) 40%, rgba(59,211,138,0) 75%);
  box-shadow: 0 0 18px rgba(59,211,138,.7);
  animation: spark-fly .62s ease-out forwards;
}

@keyframes spark-fly {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25); opacity: 0; }
}
