:root {
  --bg: #050505; --card: #101010; --green: #27ae60; --gold: #f1c40f;
  --text: #ffffff; --dim: #888; --border: #333; --red: #c0392b; --neon: #39ff14;
}

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

html, body { margin: 0; padding: 0; }
body { 
  background-color: var(--bg); color: var(--text); 
  font-family: 'Roboto Condensed', sans-serif; 
}
body::before { 
  content: ""; position: fixed; inset: 0; 
  background-image: radial-gradient(#222 1px, transparent 1px); 
  background-size: 20px 20px; z-index: -2; opacity: 0.5; 
}

#app-wrapper {
  width: 100%; max-width: 1000px; margin: 0 auto;
  padding: 20px 15px; display: flex; flex-direction: column;
  align-items: center; min-height: 100vh;
}

.header { margin-bottom: 20px; text-align: center; width: 100%; }
.logo-img { width: 150px; height: auto; filter: drop-shadow(0 0 15px rgba(39, 174, 96, 0.5)); }

#view-home, #view-stats, #view-history { width: 100%; display: none; animation: fade 0.3s; }
@keyframes fade { from{opacity:0;transform:translateY(5px);} to{opacity:1;transform:translateY(0);} }

.nav { width: 100%; display: flex; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.b-back { background: none; border: none; color: var(--dim); font-size: 1rem; cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 5px; text-transform: uppercase; }
.p-title { margin-left: auto; font-family: 'Teko'; font-size: 2rem; color: var(--gold); text-transform: uppercase; line-height: 1; }

.card { 
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; 
  padding: 20px; margin-bottom: 10px; display: flex; justify-content: space-between; 
  align-items: center; cursor: pointer; position: relative; overflow: hidden; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.5); transition: transform 0.1s; 
}
.card:active { transform: scale(0.98); }
.card-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; } 
.c-title { font-family: 'Teko'; font-size: 1.8rem; line-height: 1; color: #fff; text-transform: uppercase; }
.c-sub { font-size: 0.8rem; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.hof-banner { background: linear-gradient(180deg, #0f1f15 0%, #000 100%); border: 1px solid var(--gold); }
.hof-ico { font-size: 1.5rem; }

.tabs { display: flex; gap: 5px; margin-bottom: 15px; overflow-x: auto; }
.tab { flex: 1; background: #151515; color: #666; border: 1px solid var(--border); padding: 10px; text-align: center; font-family: 'Teko'; font-size: 1.2rem; cursor: pointer; border-radius: 4px; white-space: nowrap; }
.tab.active { background: var(--green); color: #000; border-color: var(--green); font-weight: bold; }

.cal-switch { display: flex; background: #111; border-radius: 6px; padding: 3px; margin-bottom: 15px; border: 1px solid #333; }
.cs-btn { flex: 1; text-align: center; padding: 8px; cursor: pointer; color: #666; font-family: 'Teko'; font-size: 1.1rem; text-transform: uppercase; }
.cs-btn.active { background: var(--green); color: #000; border-radius: 4px; }

.match { background: #0a0a0a; border: 1px solid #2a2a2a; border-radius: 6px; margin-bottom: 10px; overflow: hidden; width: 100%; box-shadow: 0 3px 6px rgba(0,0,0,0.4); }
.m-head { padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: #000; font-weight: 700; text-transform: uppercase; }
.m-body { display: flex; align-items: center; padding: 15px 10px; }
.m-team { flex: 1; font-family: 'Teko'; font-size: 1.6rem; color: #fff; text-align: center; line-height: 1; text-transform: uppercase; word-break: break-word; }
.m-score { font-family: 'Teko'; font-size: 2.2rem; color: var(--gold); width: 50px; text-align: center; line-height: 1; }
.m-vs { color: #444; font-family: 'Teko'; font-size: 1rem; margin: 0 5px; }

@media (min-width: 768px) { .m-team { font-size: 2.5rem; } .m-score { font-size: 3rem; width: 80px; } }

.tbl-box { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: #0e0e0e; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th { background: #151515; color: var(--green); font-family: 'Teko'; font-size: 1.1rem; padding: 10px; font-weight: normal; text-align: center; }
td { padding: 10px; border-bottom: 1px solid #222; text-align: center; font-size: 0.95rem; color: #ccc; }
.tl { text-align: left; position: sticky; left: 0; background: #0e0e0e; border-right: 1px solid #222; color: #fff; font-weight: bold; padding-left: 10px; }

.footer-stealth { width: 100%; background: #000; padding: 60px 20px 40px 20px; border-top: 1px solid #111; text-align: center; color: #333; font-size: 0.7rem; }

.date-badge { background: #000; border: 1px solid #333; padding: 2px 6px; border-radius: 3px; font-size: 0.7rem; color: #aaa; }
.time-badge { background: var(--gold); color: #000; font-family: 'Teko'; padding: 0 8px; border-radius: 3px; font-size: 1.2rem; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000; justify-content: center; align-items: center; }
.mbox { background: #111; border: 1px solid #333; width: 95%; max-width: 450px; padding: 20px; border-radius: 8px; max-height: 90vh; overflow-y: auto; }
input, select { width: 100%; background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 10px; border-radius: 4px; margin-bottom: 10px; outline: none; }
.btn { width: 100%; padding: 10px; border: none; border-radius: 4px; font-family: 'Teko'; font-size: 1.3rem; cursor: pointer; text-transform: uppercase; margin-top: 5px; }
.btn-ok { background: var(--green); color: #000; }
.btn-cancel { background: #333; color: #ccc; }
.pane { display: none; } .pane.active { display: block; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 10px; }
.grid-4 div label { font-size: 0.6rem; color: #666; display: block; text-align: center; }
.grid-4 div input { text-align: center; padding: 5px; }
.sc-edit-row { display: flex; gap: 5px; margin-bottom: 5px; align-items: center; }
.sc-edit-name { flex: 1; background: #222; border: 1px solid #444; color: #fff; padding: 8px; border-radius: 4px; font-size: 0.85rem; text-transform: uppercase; }
.sc-edit-num { width: 50px; background: #222; border: 1px solid #444; color: var(--gold); padding: 8px; border-radius: 4px; text-align: center; font-weight: bold; }
.sc-del-btn { color: var(--red); font-weight: bold; padding: 0 10px; cursor: pointer; font-size: 1.2rem; }
.adm-item { display: flex; justify-content: space-between; align-items: center; background: #181818; padding: 8px; margin-bottom: 5px; border-radius: 4px; border-left: 4px solid #333; }
.score-display { background: #000; border: 1px solid #333; color: var(--gold); font-family: 'Teko'; font-size: 2.2rem; text-align: center; width: 60px; border-radius: 6px; pointer-events: none; }
.btn-ag { background: transparent; border: 1px solid #444; color: #888; font-size: 0.7rem; padding: 5px; width: 100%; margin-top: 5px; border-radius: 4px; }
.btn-def { background: #222; border: 1px solid #444; color: #888; font-size: 0.7rem; padding: 5px; width: 100%; margin-top: 5px; border-radius: 4px; }
.adm-hist-row { background: #151515; padding: 8px; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }
.edit-mode-alert { background: var(--gold); color: #000; padding: 8px; text-align: center; font-weight: bold; border-radius: 6px; margin-bottom: 15px; display: none; }
.wall { column-count: 2; column-gap: 10px; }
.wall-item { background: #111; margin-bottom: 10px; break-inside: avoid; position: relative; border-radius: 6px; overflow: hidden; }
.wall-img { width: 100%; display: block; }
.wall-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); opacity: 0; transition: 0.2s; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; }
.wall-item:hover .wall-overlay { opacity: 1; }
#lb { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: none; justify-content: center; align-items: center; }
#lb img { max-width: 95%; max-height: 80vh; border: 2px solid var(--gold); }
.lb-x { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 3rem; cursor: pointer; }
.modal-custom { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; animation: fade 0.3s; }
.mc-box { background: #111; border: 1px solid var(--gold); padding: 25px; border-radius: 12px; width: 90%; max-width: 350px; text-align: center; box-shadow: 0 0 30px rgba(241,196,15,0.1); }
.mc-title { color: var(--gold); font-family: 'Teko'; font-size: 1.8rem; margin-bottom: 15px; text-transform: uppercase; }
.mc-input { width: 100%; padding: 12px; background: #222; border: 1px solid #444; color: #fff; border-radius: 6px; margin-bottom: 10px; font-size: 1rem; text-align: center; }
.mc-input:focus { border-color: var(--green); outline: none; }
.mc-btns { display: flex; gap: 10px; margin-top: 10px; }
