:root {
  --bg: #0d1117; --bg2: #131a24; --card: #1a2230; --line: #263041;
  --txt: #e6edf3; --muted: #8b98a9; --accent: #ff7a2f; --accent2: #4cc38a;
  --steam: #1b2838;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg);
  color: var(--txt); line-height: 1.55;
  background-image: radial-gradient(1200px 500px at 80% -10%, #1c2a1e 0%, transparent 60%),
                    radial-gradient(900px 400px at 0% 0%, #2a1c14 0%, transparent 55%);
}
a { color: var(--accent); text-decoration: none; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }

/* NAV */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; background: rgba(13,17,23,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 800; color: var(--txt); display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  filter: drop-shadow(0 0 6px rgba(255,122,47,.4)); }
.brand span { color: var(--accent); }
.brand em { color: var(--muted); font-style: normal; font-weight: 500; }
.nav nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav nav a { color: var(--muted); font-weight: 600; }
.nav nav a:hover { color: var(--txt); }
.nav .me { display: flex; align-items: center; gap: 8px; color: var(--txt); }
.nav .me img { width: 26px; height: 26px; border-radius: 50%; }
.nav .me b { color: var(--accent); }
.btn-steam { background: linear-gradient(#3a5a7a,#1b2838); color:#fff!important; padding:8px 16px;
  border-radius: 8px; border: 1px solid #2a3f57; }

/* HERO */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; margin: 20px 0 8px; }
.hero h1 { font-size: 44px; line-height: 1.05; margin: 0 0 12px; letter-spacing: -1px; }
.hero h1 span { color: var(--accent); }
.hero-txt p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.status-card { background: linear-gradient(160deg,#16202c,#111722); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; text-align: center; position: relative; }
.status-card .dot { width: 12px; height: 12px; border-radius: 50%; background: #f0553a;
  position: absolute; top: 16px; right: 16px; box-shadow: 0 0 12px #f0553a; }
.status-card.on .dot { background: var(--accent2); box-shadow: 0 0 12px var(--accent2); }
.status-card .players { font-size: 56px; font-weight: 800; line-height: 1; }
.status-card .players i { color: var(--muted); font-style: normal; font-size: 30px; }
.status-card .players-label { color: var(--muted); margin-top: 4px; }
.status-meta { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.status-meta li { padding: 3px 0; border-top: 1px solid var(--line); }

/* STAT TILES (hero) */
.stat-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.stat { background: rgba(26,34,48,.7); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; min-width: 84px; text-align: center; }
.stat .num { display: block; font-size: 26px; font-weight: 800; line-height: 1; }
.stat .num.accent { color: var(--accent); }
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.connect-box { margin-top: 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.connect-box b { color: var(--accent); }

/* LIVE BAND : joueurs + countdown */
.live-band { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin: 20px 0; }
.live-players .pl-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pl-chip { display: flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 14px; font-size: 14px; font-weight: 600; }
.pl-chip .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2); animation: pulse 2s infinite; }
.pl-empty { margin-top: 12px; color: var(--muted); padding: 22px; text-align: center;
  background: var(--card); border: 1px dashed var(--line); border-radius: 12px; }
.pl-empty b { color: var(--accent); }
.restart-card { text-align: center; }
.countdown { font-size: 40px; font-weight: 800; letter-spacing: 1px; color: var(--txt);
  font-variant-numeric: tabular-nums; margin: 8px 0 4px;
  background: linear-gradient(90deg,var(--accent),#ffb27a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ROSTER DINOS */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; margin-top: 14px; }
.dino { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; transition: transform .12s, border-color .12s; border-left: 3px solid var(--line); }
.dino:hover { transform: translateY(-2px); border-color: var(--accent); }
.dino-emo { font-size: 22px; }
.dino-name { font-size: 14px; font-weight: 600; }
.dino.diet-apex { border-left-color: #f0553a; }
.dino.diet-carni { border-left-color: #ff7a2f; }
.dino.diet-herbi { border-left-color: var(--accent2); }
.dino.diet-nocturne { border-left-color: #7a6cf0; }
.dino.diet-volant { border-left-color: #4cc3e0; }
.dino.diet-semi-aqua { border-left-color: #3a9bd8; }

/* PANELS */
.panel { background: rgba(20,26,36,.6); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; margin: 20px 0; }
.panel h2 { margin: 0 0 6px; font-size: 22px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; margin: 14px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.card.vote { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.card.shop { text-align: center; }
.card.shop .icon { font-size: 34px; }
.card.shop p { color: var(--muted); font-size: 13px; min-height: 48px; }
.card.shop .price, .card.shop b { color: var(--accent); font-weight: 800; display: block; margin: 6px 0; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); }

/* BUTTONS */
.btn { display: inline-block; background: var(--accent); color: #10151d; font-weight: 700;
  padding: 9px 16px; border-radius: 8px; border: 0; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(1.08); }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.btn.disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; }
form { margin: 0; }

/* FLASH */
.flash { max-width: 1080px; margin: 16px auto -4px; padding: 12px 18px; background: #1d2e22;
  border: 1px solid var(--accent2); border-radius: 10px; color: #cdeeda; }

/* TABLES */
table { width: 100%; border-collapse: collapse; }
table td, table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.tag.pending { background: #3a2f14; color: #f0c674; }
.lb th { color: var(--muted); }
.lb .rank { font-size: 20px; width: 50px; }
.lb .player { display: flex; align-items: center; gap: 10px; }
.lb .player img { width: 28px; height: 28px; border-radius: 50%; }
.lb tr.top1 { background: rgba(255,196,84,.08); }

/* ACCOUNT */
.account { display: flex; align-items: center; gap: 18px; }
.account .avatar { width: 72px; height: 72px; border-radius: 12px; }
.big-name { font-size: 24px; font-weight: 800; }
.points-badge { display: inline-block; margin-top: 8px; background: var(--accent); color: #10151d;
  font-weight: 800; padding: 6px 14px; border-radius: 20px; }

.discord-placeholder { background: var(--card); border: 1px dashed var(--line); border-radius: 12px;
  padding: 30px; text-align: center; color: var(--muted); }

/* WIDGET DISCORD custom */
.discord-widget { background: linear-gradient(170deg,#1e2230,#15181f); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; }
.dw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dw-logo { font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: #fff;
  display: flex; align-items: center; gap: 8px; }
.dw-logo::before { content: ""; width: 22px; height: 22px; background: #5865F2;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.3 4.4A19.8 19.8 0 0 0 15.4 3l-.3.5a18.3 18.3 0 0 1 4.4 1.4 15.7 15.7 0 0 0-15 0A18.3 18.3 0 0 1 8.9 3.5L8.6 3A19.8 19.8 0 0 0 3.7 4.4 20.5 20.5 0 0 0 .1 18.3a19.9 19.9 0 0 0 6 3l.8-1.1a13 13 0 0 1-2-1l.5-.4a14.2 14.2 0 0 0 12.2 0l.5.4a13 13 0 0 1-2 1l.8 1.1a19.9 19.9 0 0 0 6-3 20.5 20.5 0 0 0-3.9-13.9ZM8.3 15.1c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2Zm7.4 0c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.3 4.4A19.8 19.8 0 0 0 15.4 3l-.3.5a18.3 18.3 0 0 1 4.4 1.4 15.7 15.7 0 0 0-15 0A18.3 18.3 0 0 1 8.9 3.5L8.6 3A19.8 19.8 0 0 0 3.7 4.4 20.5 20.5 0 0 0 .1 18.3a19.9 19.9 0 0 0 6 3l.8-1.1a13 13 0 0 1-2-1l.5-.4a14.2 14.2 0 0 0 12.2 0l.5.4a13 13 0 0 1-2 1l.8 1.1a19.9 19.9 0 0 0 6-3 20.5 20.5 0 0 0-3.9-13.9ZM8.3 15.1c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2Zm7.4 0c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.dw-online { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.dw-online b { color: var(--txt); }
.dw-online .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent2);
  box-shadow: 0 0 0 0 rgba(76,195,138,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(76,195,138,.5);} 70%{box-shadow:0 0 0 7px rgba(76,195,138,0);} 100%{box-shadow:0 0 0 0 rgba(76,195,138,0);} }
.dw-members { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  background: #0f1218; border-radius: 10px; padding: 8px; }
.dw-member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.dw-member:hover { background: rgba(255,255,255,.04); }
.dw-av { position: relative; width: 32px; height: 32px; flex: 0 0 32px; }
.dw-av img { width: 32px; height: 32px; border-radius: 50%; background: #2a2f3a; }
.dw-av .st { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #0f1218; }
.st-online { background: #23a55a; } .st-idle { background: #f0b232; }
.st-dnd { background: #f23f43; } .st-offline { background: #80848e; }
.dw-name { font-size: 14px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-join { display: block; text-align: center; margin-top: 14px; background: #5865F2; color: #fff;
  font-weight: 700; padding: 12px; border-radius: 10px; transition: filter .15s; }
.dw-join:hover { filter: brightness(1.1); }

footer { border-top: 1px solid var(--line); padding: 24px; text-align: center; color: var(--muted);
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

@media (max-width: 780px) { .hero, .two-col { grid-template-columns: 1fr; } .hero h1 { font-size: 34px; } }
