/* -----------------------------
   MyGames Dark — Design System
   Midnight Blue / Deep Navy
-------------------------------- */

:root{
  --bg-main:#070c18;
  --bg-radial-1:#0b1433;
  --bg-radial-2:#070c18;

  --surface-1: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.035);
  --surface-3: rgba(255,255,255,.025);

  --text: #e8edff;
  --muted: rgba(232,237,255,.72);

  --primary: #4fc3ff;
  --accent: #7c8cff;

  --border: rgba(255,255,255,.10);
  --border-strong: rgba(79,195,255,.38);

  --shadow-lg: 0 28px 70px rgba(0,0,0,.60);
  --shadow-md: 0 18px 40px rgba(0,0,0,.45);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.06);

  --radius-lg: 20px;
  --radius-md: 14px;

  --maxw: 1200px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(900px 500px at 18% -10%, var(--bg-radial-1) 0%, var(--bg-radial-2) 60%),
    radial-gradient(700px 450px at 100% 0%, rgba(124,140,255,.18) 0%, rgba(7,12,24,0) 60%),
    radial-gradient(700px 450px at 0% 85%, rgba(79,195,255,.10) 0%, rgba(7,12,24,0) 60%),
    var(--bg-main);
  overflow-x:hidden;
}

a{ color:var(--primary); text-decoration:none; }
a:hover{ color:#8fe0ff; }

.site{
  max-width:var(--maxw);
  margin:0 auto;
  padding: 28px 18px 42px;
}

/* -------- Header -------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7,12,24,.84), rgba(7,12,24,.40));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 180px;
}
.brand-badge{
  width:36px; height:36px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,195,255,.95), rgba(124,140,255,.85));
  box-shadow: 0 18px 38px rgba(79,195,255,.18);
}
.brand-title{
  font-weight: 800;
  letter-spacing: .2px;
  line-height:1.1;
}
.brand-sub{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
}
.nav a{
  color: var(--text);
  opacity: .88;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  transition: transform .18s ease, border-color .18s ease, opacity .18s ease;
}
.nav a:hover{
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(79,195,255,.26);
}

/* -------- Typography -------- */
h1,h2,h3{
  margin: 18px 0 10px;
  letter-spacing: .2px;
}
h1{
  font-size: clamp(30px, 4vw, 46px);
}
h2{
  font-size: clamp(20px, 2.2vw, 28px);
}
p,li{
  color: var(--muted);
  line-height:1.65;
  font-size: 16px;
}

/* -------- Content blocks -------- */
.prose{
  max-width: 850px;
}
.hr{
  height:1px;
  width:100%;
  background: rgba(255,255,255,.08);
  margin: 18px 0;
}

/* -------- Buttons -------- */
button, .button, input[type="submit"]{
  appearance:none;
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  cursor:pointer;
  color: #02101a;
  background: linear-gradient(135deg, rgba(79,195,255,1), rgba(124,140,255,1));
  box-shadow: 0 18px 48px rgba(79,195,255,.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover,.button:hover,input[type="submit"]:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 22px 60px rgba(79,195,255,.26);
}
button:disabled{ opacity:.6; cursor:not-allowed; transform:none; }

/* -------- Forms -------- */
input, select, textarea{
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px 12px;
}
select option{ background: #0b1224; }

/* --------------------------------
   MyGames Plugin Styling Enhancers
   (works with your plugin classes)
----------------------------------- */

/* Controls */
.mygames-controls{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}
.mygames-controls select{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.09);
}

/* Grid */
.mygames-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* Card base */
.mygames-card,
.mygames-rankbuilder{
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
  box-shadow: var(--shadow-md), var(--shadow-inset);
  overflow:hidden;
  transform: translateZ(0);
}

/* Hover lift + neon rim */
.mygames-card{
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mygames-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  background: radial-gradient(600px 120px at 30% 0%, rgba(79,195,255,.25), rgba(124,140,255,0));
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events:none;
}
.mygames-card:hover{
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(79,195,255,.26);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(79,195,255,.14), var(--shadow-inset);
}
.mygames-card:hover::before{
  opacity: 1;
}

/* Thumbnail */
.mygames-thumb{
  width:100%;
  height: 150px;
  object-fit: cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.005);
}

/* Body */
.mygames-cardbody{ padding: 12px 12px 14px; }
.mygames-title{
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  line-height:1.25;
}
.mygames-meta{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.mygames-stats{
  margin-top: 10px;
  display:grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.mygames-stats strong{ color: var(--text); }

/* More button + status */
.mygames-more{ margin-top: 14px; }
.mygames-status, .mygames-save-status{ margin-top: 10px; color: var(--muted); }

/* Rank builder */
.mygames-rankbuilder{
  padding: 14px;
}
.mygames-ranklist{
  list-style:none;
  padding:0;
  margin: 12px 0;
  display:grid;
  gap: 8px;
}
.mygames-rankitem{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.mygames-rankitem:hover{
  transform: translateY(-1px);
  border-color: rgba(79,195,255,.22);
}
.mygames-handle{ cursor: grab; opacity:.75; }
.mygames-rankitem.is-dragging{
  opacity:.75;
  border-color: rgba(79,195,255,.65);
  box-shadow: 0 0 0 2px rgba(79,195,255,.20);
}

/* -------- Footer -------- */
.site-footer{
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

/* -------- Dynamic reveal (JS adds .is-visible) -------- */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive tweaks */
@media (max-width: 520px){
  .brand{ min-width: unset; }
  .nav a{ padding: 7px 9px; }
  .mygames-grid{ grid-template-columns: 1fr; }
}


/* -----------------------------
   Front Page (Home) layout
-------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 6px;
}

.hero-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  box-shadow: var(--shadow-md), var(--shadow-inset);
  padding: 18px 18px 16px;
  overflow: hidden;
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(900px 220px at 25% 0%, rgba(79, 195, 255, .22), rgba(124, 140, 255, 0));
  opacity: .9;
  pointer-events: none;
}

.hero-kicker {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2px;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 62ch;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.button-ghost {
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: none;
}

.button-ghost:hover {
  border-color: rgba(79, 195, 255, .28);
  box-shadow: 0 18px 48px rgba(79, 195, 255, .14);
  color: var(--text);
}

.button-small {
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.hero-badges {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 13px;
}

.hero-side {
  display: grid;
  gap: 14px;
}

.side-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow: var(--shadow-md), var(--shadow-inset);
  padding: 16px;
}

.side-card-accent {
  border-color: rgba(124, 140, 255, .22);
}

.side-title {
  font-weight: 900;
  font-size: 16px;
}

.side-sub {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.side-actions {
  margin-top: 12px;
}

.section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head .muted {
  margin: 0;
  color: var(--muted);
}

.section-card {
  margin-top: 10px;
}

.section-foot {
  margin-top: 12px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }
}