:root {
    --bg: #090c0a;
    --surface: #111613;
    --border: #1f2b24;
    --accent: #2ecc71;
    --text: #f0f5f2;
    --muted: #8ea196;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, sans-serif; }

body { background: var(--bg); color: var(--text); line-height: 1.6; }

header { border-bottom: 1px solid var(--border); background: #0b0f0d; position: sticky; top: 0; z-index: 10; }
.nav { max-width: 960px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--accent); text-decoration: none; letter-spacing: 1px; }

main { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

.hero { text-align: center; padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--border); }
.tag { display: inline-block; color: var(--accent); border: 1px solid var(--border); background: var(--surface); padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; font-weight: 700; margin-bottom: 1rem; }
h1 { font-size: 3rem; font-weight: 900; letter-spacing: 2px; margin-bottom: 0.8rem; }
.hero p { color: var(--muted); max-width: 540px; margin: 0 auto 2rem; }

.ip-box { display: inline-flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); padding: 0.6rem 0.8rem 0.6rem 1.2rem; border-radius: 6px; flex-wrap: wrap; justify-content: center; }
#ip-text { font-family: monospace; font-size: 1.1rem; font-weight: 700; }

.btn-main { background: var(--accent); color: #05140b; border: none; padding: 0.6rem 1.1rem; border-radius: 4px; font-weight: 700; cursor: pointer; }
.btn-main:hover { opacity: 0.9; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 0.45rem 0.9rem; border-radius: 4px; font-weight: 600; cursor: pointer; }
.btn-outline:hover { background: var(--accent); color: #05140b; }

.live-status { margin-top: 1.2rem; font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.dot.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; margin-top: 2.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.panel h2 { font-size: 1.25rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.stat { background: var(--bg); border: 1px solid var(--border); padding: 0.9rem; border-radius: 6px; }
.stat span { display: block; font-size: 0.78rem; color: var(--muted); }
.stat strong { font-size: 1.05rem; }

.players-area { background: var(--bg); border: 1px solid var(--border); padding: 0.9rem; border-radius: 6px; font-size: 0.9rem; color: var(--muted); }
.p-tag { display: inline-block; background: rgba(46, 204, 113, 0.12); color: var(--accent); padding: 0.2rem 0.6rem; border-radius: 4px; margin: 0.3rem 0.3rem 0 0; font-family: monospace; }

.vault-form { display: flex; gap: 0.6rem; margin: 1rem 0; flex-wrap: wrap; }
.vault-form input { flex: 1; min-width: 140px; padding: 0.6rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
.coord-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border: 1px solid var(--border); padding: 0.6rem 0.9rem; border-radius: 4px; margin-top: 0.5rem; font-size: 0.9rem; }
.btn-del { background: transparent; color: #e63946; border: 1px solid #e63946; padding: 0.2rem 0.5rem; border-radius: 4px; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin: 2.5rem 0 4rem; }
.card { background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; border-radius: 8px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--accent); }
.card p { color: var(--muted); font-size: 0.92rem; }

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; z-index: 50; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--accent); padding: 1.8rem; border-radius: 8px; width: 90%; max-width: 360px; }
.modal-box h3 { margin-bottom: 1rem; }
.modal-box input { width: 100%; padding: 0.7rem; margin-bottom: 1rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
.btn-close { width: 100%; margin-top: 0.6rem; background: transparent; border: none; color: var(--muted); cursor: pointer; }

#toast { position: fixed; bottom: 20px; right: 20px; background: var(--accent); color: #05140b; font-weight: 700; padding: 0.7rem 1.1rem; border-radius: 4px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
#toast.show { opacity: 1; }

@media (max-width: 600px) { h1 { font-size: 2.2rem; } }
