/* ===== Karbit Prime matte/doff style ===== */
:root{
  --bg:#090d17;
  --panel:#141d2d;
  --panel-2:#192337;
  --line:rgba(255,255,255,.08);
  --text:#eef2ff;
  --muted:#a8b1c8;
  --purple:#7d5cff;
  --purple-2:#9b6dff;
  --pink:#ff69b4;
  --rose:#e78bb2;
  --gold-1:#f6e8a9;
  --gold-2:#d9ad35;
  --gold-3:#8f6a15;
  --shadow:0 18px 40px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body.kp-body{
  background:
    radial-gradient(circle at top left, rgba(125,92,255,.22), transparent 25%),
    radial-gradient(circle at top right, rgba(255,105,180,.10), transparent 18%),
    linear-gradient(180deg,#09111f 0%, #070b14 100%);
  color:var(--text);
  font-family:Arial, Helvetica, sans-serif;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.kp-shell{
  width:min(1180px, calc(100% - 28px));
  margin:0 auto;
  padding:18px 0 32px;
}

.kp-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0 18px;
}

.kp-logo{
  font-size:clamp(28px, 4vw, 38px);
  font-weight:800;
  letter-spacing:.2px;
  background:linear-gradient(90deg,var(--purple),#8a64ff 45%, #b26dff 70%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.kp-topnav, .kp-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.kp-topnav a, .kp-link-chip, .kp-profile-chip{
  padding:10px 14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  border-radius:999px;
  color:var(--muted);
}

.kp-profile-chip{
  color:#fff;
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02));
}

.hero{
  display:grid;
  grid-template-columns:1.2fr .9fr;
  gap:18px;
  align-items:center;
  padding:20px;
  border-radius:28px;
  background:linear-gradient(180deg, rgba(20,29,45,.95), rgba(14,22,34,.92));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.hero h1{
  margin:0 0 8px;
  font-size:clamp(30px, 5vw, 48px);
  line-height:1.05;
}

.hero p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}

.hero-search{
  display:flex;
  gap:10px;
  align-items:center;
}

.hero-search input{
  width:100%;
  min-height:54px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.09);
  background:#1b2438;
  color:#fff;
  padding:0 18px;
  outline:none;
}

.hero-search button, .kp-btn{
  min-height:52px;
  border:none;
  border-radius:16px;
  padding:0 18px;
  cursor:pointer;
}

.hero-search button, .kp-btn-primary{
  background:linear-gradient(90deg,var(--purple),#8a64ff 50%, #af6cff);
  color:#fff;
  font-weight:700;
}

.kp-btn-secondary{
  background:#202c44;
  color:#fff;
}

.kp-btn-danger{
  background:#442434;
  color:#fff;
}

.quick-nav, .stats-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}

.quick-card, .stat-card{
  border-radius:24px;
  background:linear-gradient(180deg, rgba(28,39,61,.96), rgba(22,31,48,.96));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.quick-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:18px;
  font-weight:700;
  color:#f3f5ff;
}

.quick-emoji{font-size:20px}

.stat-card{
  padding:22px;
  text-align:center;
}

.stat-value{
  font-size:32px;
  font-weight:800;
}

.stat-label{
  margin-top:6px;
  color:var(--muted);
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:14px;
  margin:26px 0 14px;
}

.section-head h2{
  margin:0 0 4px;
  font-size:28px;
}
.section-head p{margin:0;color:var(--muted)}

.slider-wrap{
  position:relative;
}

.game-slider{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(240px, 280px);
  gap:14px;
  overflow:auto;
  scroll-behavior:smooth;
  padding-bottom:8px;
  scrollbar-width:none;
}
.game-slider::-webkit-scrollbar{display:none}

.slider-nav{
  position:absolute;
  top:45%;
  transform:translateY(-50%);
  z-index:2;
  width:42px;
  height:42px;
  border-radius:50%;
  border:none;
  background:rgba(12,16,27,.85);
  color:#fff;
  cursor:pointer;
  box-shadow:var(--shadow);
}
.slider-prev{left:-10px}
.slider-next{right:-10px}

.game-card{
  border-radius:26px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(27,37,58,.97), rgba(19,27,42,.97));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.game-card-link{display:block}
.game-cover{
  aspect-ratio:16/10;
  background:#1b2438;
  overflow:hidden;
}
.game-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.game-cover-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-size:44px;
}
.game-content{padding:16px}
.game-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.game-title-row h3{
  margin:0;
  font-size:19px;
  line-height:1.2;
}
.game-meta{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.mini-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:800;
}
.mini-badge.public{
  background:rgba(62,177,121,.14);
  color:#92f4be;
}
.mini-badge.premium{
  background:rgba(146,93,255,.16);
  color:#d0b3ff;
}

.hero-search{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:14px;
  align-items:center;
}

.hero-search input{
  width:100%;
  min-width:0;
}

.hero-search button{
  min-width:96px;
  white-space:nowrap;
}

.quick-nav{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.quick-card{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
  flex-wrap:wrap;
}

.quick-card span:last-child{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

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

  .quick-nav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .stats-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .hero{
    padding:18px;
    gap:16px;
  }

  .hero h1{
    font-size:clamp(28px, 9vw, 44px);
  }

  .hero-search{
    grid-template-columns:1fr;
  }

  .hero-search button{
    width:100%;
  }

  .quick-nav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }

  .quick-card{
    min-height:92px;
    padding:14px 12px;
    flex-direction:column;
    gap:8px;
  }

  .quick-card span:last-child{
    font-size:15px;
    line-height:1.2;
  }

  .stats-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }

  .stat-card{
    padding:18px 14px;
  }

  .stat-value{
    font-size:28px;
  }
}
