*{box-sizing:border-box}
:root{
  --p: #1a7fa8;
  --p-light: #4a9fc9;
  --s: #b8d8e8;
  --s-dark: #8ab3c9;
  --bg: #0a1628;
  --card: #0f2038;
  --line: #2a4a6a;
  --text: #e8f4fc;
  --muted: #8ab3c9;
}

html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
body{background-size:cover;background-attachment:fixed}
a{color:inherit;text-decoration:none}

/* TOPBAR METÁLICA */
.topbar{
  position:sticky;top:0;z-index:20;height:64px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 18px;
  background: linear-gradient(180deg, #0f2038 0%, #1a3a5a 100%);
  border-bottom: 2px solid #4a9fc9;
  box-shadow: 0 2px 20px rgba(26, 127, 168, 0.3);
  backdrop-filter:blur(10px)
}

.brand{display:flex;align-items:center;gap:10px;font-weight:800;color:#b8d8e8;text-shadow:0 0 20px rgba(74,159,201,0.3)}
.brand img{max-height:45px;max-width:190px;object-fit:contain}
.brand-text{font-size:17px}

nav{display:flex;gap:14px;align-items:center;font-size:14px}
nav a{color:#b8d8e8;transition:all .3s;padding:6px 12px;border-radius:6px}
nav a:hover{color:#e8f4fc;background:rgba(74,159,201,0.15);text-shadow:0 0 10px rgba(74,159,201,0.5)}

.container{width:min(1200px,94%);margin:24px auto}

/* CARDS METÁLICOS */
.card{
  background: linear-gradient(145deg, #0f2038, #1a3a5a);
  border: 1px solid #4a9fc9;
  border-radius:18px;
  padding:20px;
  box-shadow: 0 8px 32px rgba(26, 127, 168, 0.2), inset 0 1px 0 rgba(184, 216, 232, 0.1);
}

.login-card{width:min(430px,100%)}

h1,h2,h3{margin:0 0 14px;color:#b8d8e8;text-shadow:0 0 30px rgba(74,159,201,0.2)}
.muted{color:var(--muted);font-size:13px}

.flash{padding:12px 14px;border-radius:11px;margin-bottom:16px}
.flash.ok{background:rgba(26,127,168,0.2);border:1px solid #4a9fc9}
.flash.error{background:rgba(168,26,26,0.2);border:1px solid #c94a4a}

input,select,button,textarea{
  width:100%;padding:12px 13px;margin:6px 0;
  border-radius:10px;
  border:1px solid #2a4a6a;
  background:rgba(10,22,40,0.8);
  color:#e8f4fc;
  font-size:15px;
  transition:all .3s;
}
input:focus,select:focus,textarea:focus{
  border-color:#4a9fc9;
  box-shadow:0 0 20px rgba(74,159,201,0.2);
  outline:none;
}

button,.btn{
  display:inline-block;
  background:linear-gradient(135deg,#1a7fa8,#0f4a6a);
  border:1px solid #4a9fc9;
  font-weight:800;
  cursor:pointer;
  padding:12px 15px;
  border-radius:10px;
  color:#e8f4fc;
  text-shadow:0 1px 2px rgba(0,0,0,0.3);
  box-shadow:0 4px 15px rgba(26,127,168,0.3);
  transition:all .3s;
}
button:hover,.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 25px rgba(26,127,168,0.5);
  border-color:#b8d8e8;
}

.btn.gray{background:linear-gradient(135deg,#4a6a8a,#2a4a6a);border-color:#6a8aaa;box-shadow:0 4px 15px rgba(74,106,138,0.3)}
.btn.red{background:linear-gradient(135deg,#8d2638,#5a1a26);border-color:#c94a5a;box-shadow:0 4px 15px rgba(168,26,26,0.3)}
.btn.small{padding:8px 10px;font-size:12px}

.filters{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin-bottom:18px}

/* GRID DE JOGOS */
.grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}

.game{
  background:linear-gradient(145deg,#0f2038,#1a3a5a);
  border:1px solid #2a4a6a;
  border-radius:15px;
  overflow:hidden;
  transition:all .3s;
  min-width:0;
  box-shadow:0 4px 15px rgba(0,0,0,0.3);
}
.game:hover{
  transform:translateY(-5px);
  border-color:#4a9fc9;
  box-shadow:0 8px 30px rgba(26,127,168,0.4);
}
.game img{
  display:block;
  width:100%;
  aspect-ratio:2/3;
  object-fit:cover;
  background:linear-gradient(135deg,#0a1628,#1a3a5a);
}
.game .info{padding:10px}
.game b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b8d8e8}
.game small{display:block;color:var(--muted);margin-top:5px}

/* HERO */
.hero{
  padding:24px;
  border:1px solid #4a9fc9;
  border-radius:20px;
  background:linear-gradient(135deg,rgba(15,32,56,0.9),rgba(26,58,90,0.9));
  margin-bottom:20px;
  box-shadow:0 8px 32px rgba(26,127,168,0.2);
}
.hero h1{font-size:30px;color:#b8d8e8}
.hero p{color:var(--muted)}

/* STATS */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.stat{
  padding:18px;
  background:linear-gradient(145deg,#0f2038,#1a3a5a);
  border:1px solid #2a4a6a;
  border-radius:14px;
  box-shadow:0 4px 15px rgba(0,0,0,0.2);
}
.stat b{display:block;font-size:30px;color:#b8d8e8}
.stat small{color:var(--muted)}

/* MENU ADM */
.menu{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-top:18px}
.menu a{
  padding:18px;
  background:linear-gradient(145deg,#0f2038,#1a3a5a);
  border:1px solid #2a4a6a;
  border-radius:14px;
  transition:all .3s;
  box-shadow:0 4px 15px rgba(0,0,0,0.2);
  text-align:center;
  font-weight:600;
}
.menu a:hover{
  border-color:#4a9fc9;
  transform:translateY(-3px);
  box-shadow:0 8px 25px rgba(26,127,168,0.3);
}

/* TABELA */
.table-wrap{overflow:auto}
.table{
  width:100%;
  border-collapse:collapse;
  background:linear-gradient(145deg,#0f2038,#1a3a5a);
  border:1px solid #2a4a6a;
  border-radius:12px;
  overflow:hidden;
}
.table th,.table td{
  padding:11px;
  border-bottom:1px solid #2a4a6a;
  text-align:left;
  white-space:nowrap
}
.table th{color:#b8d8e8;font-size:12px;background:rgba(26,127,168,0.1)}

.actions{display:flex;gap:6px;flex-wrap:wrap}
.upload-box{border:1px dashed #4a9fc9;padding:15px;border-radius:12px;background:rgba(10,22,40,0.6);margin:8px 0}
.upload-box input{border:0;padding:5px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.full{grid-column:1/-1}

.thumb{width:55px;height:70px;object-fit:cover;border-radius:7px;border:1px solid #4a9fc9;box-shadow:0 2px 10px rgba(26,127,168,0.2)}

.player{width:100%;height:calc(100vh - 64px);min-height:480px;background:#000}
.player #game{width:100%;height:100%}
.player-head{
  height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  background:linear-gradient(180deg,#0f2038,#1a3a5a);
  border-bottom:1px solid #4a9fc9;
}

.empty{padding:35px;text-align:center;border:1px dashed #4a9fc9;border-radius:15px;color:var(--muted);background:rgba(10,22,40,0.4)}
.footer{text-align:center;padding:30px;color:#6a8aaa;font-size:12px;border-top:1px solid rgba(42,74,106,0.3)}

@media(max-width:900px){.grid{grid-template-columns:repeat(4,1fr)}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.topbar{height:58px;padding:0 10px}.brand img{max-width:130px;max-height:40px}nav{gap:7px;font-size:11px}.container{width:94%;margin:16px auto}.filters,.form-grid{grid-template-columns:1fr}.grid{grid-template-columns:repeat(3,1fr);gap:8px}.game .info{padding:7px}.game b{font-size:11px}.game small{font-size:10px}.hero h1{font-size:22px}.stats{grid-template-columns:1fr 1fr}.stat b{font-size:23px}}
@media(min-width:1300px){.grid{grid-template-columns:repeat(8,1fr)}}