:root {
  --bg: #f7f9fc;
  --fg: #111827;
  --muted: #667085;
  --soft: #eef2f7;
  --card: #ffffff;
  --line: #d9e0ea;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --ink: #101828;
  --blue: #2563eb;
  --gold: #d97706;
  --rose: #e11d48;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 18px 45px rgba(16, 24, 40, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 118, 110, .13), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, .14), transparent 30%),
    linear-gradient(315deg, rgba(217, 119, 6, .08), transparent 28%),
    var(--bg);
}

a {
  color: inherit;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 224, 234, .82);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.12rem;
  text-decoration: none;
}

.brand span span {
  color: var(--primary);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 12px 28px rgba(15, 118, 110, .23);
}

.header-actions,
.hero-actions,
.site-footer nav,
.admin-actions,
.admin-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-pill,
.site-footer a,
.section-head a,
.admin-quick a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #475467;
  font-weight: 800;
  text-decoration: none;
}

.nav-pill:hover,
.nav-pill.is-active,
.admin-quick a:hover {
  background: #eef6f5;
  color: var(--primary-dark);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .20);
}

.button:hover {
  background: var(--primary-dark);
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
}

.button-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  background: #f2f4f7;
}

.landing {
  padding: 34px 0 36px;
}

.landing-inner {
  display: grid;
  gap: 28px;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: end;
  overflow: hidden;
  min-height: 310px;
  padding: 34px 30px;
  border: 1px solid rgba(217, 224, 234, .86);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.9) 46%, rgba(255,255,255,.54) 62%),
    url("https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  box-shadow: 0 22px 70px rgba(16, 24, 40, .13);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 5.1vw, 4.45rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.hero-copy p {
  max-width: 760px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.category-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.category-chip {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.category-chip span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--chip-color);
  color: #fff;
  font-size: .8rem;
}

.hero-cta-panel {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 122px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15,118,110,.88), rgba(37,99,235,.86)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,.12) 28px 30px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 22px 55px rgba(37, 99, 235, .20);
}

.hero-cta-panel span {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  font-size: .8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-cta-panel strong {
  max-width: 290px;
  font-size: 1.1rem;
  line-height: 1.24;
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  min-height: 138px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(217, 224, 234, .86);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.78)),
    linear-gradient(135deg, color-mix(in srgb, var(--category-color) 20%, white), transparent);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--category-color);
  opacity: .14;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-card strong {
  max-width: 180px;
  font-size: 1.22rem;
  line-height: 1.18;
}

.category-card small {
  color: var(--muted);
  font-weight: 850;
}

.category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--category-color);
  color: #fff;
  font-weight: 950;
}

.hero-stats {
  display: grid;
  gap: 10px;
}

.hero-stats div,
.admin-stats div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.hero-stats strong,
.admin-stats strong {
  color: var(--ink);
  font-size: 1.55rem;
}

.hero-stats span,
.admin-stats span {
  color: var(--muted);
  font-weight: 800;
}

.service-section,
.admin-section,
.add-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(217, 224, 234, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-sm);
}

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

.service-grid {
  display: grid;
  gap: 12px;
}

.social-grid,
.games-grid,
.dynamic-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.service-card {
  position: relative;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .40);
  border-radius: 8px;
  color: #fff;
  isolation: isolate;
  text-decoration: none;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .05);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  filter: saturate(1.05);
  box-shadow: var(--shadow);
}

.game-card,
.games-card {
  min-height: 215px;
}

.service-glow {
  position: absolute;
  inset: auto -40px -60px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  opacity: .35;
  filter: blur(10px);
  z-index: -1;
}

.service-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .20);
  font-size: .85rem;
  font-weight: 950;
}

.service-logo svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.service-logo .logo-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}

.service-logo .logo-letter.small {
  font-size: 1.08rem;
}

.logo-youtube svg path:last-child,
.logo-telegram svg path,
.logo-mobilelegends svg path,
.logo-honorofkings svg path,
.logo-freefire svg path {
  fill: currentColor;
}

.logo-spotify svg circle {
  fill: currentColor;
  opacity: .18;
}

.service-text {
  display: grid;
  gap: 2px;
  padding-right: 36px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .35);
}

.service-text strong {
  font-size: 1rem;
  line-height: 1.15;
}

.service-text small {
  font-weight: 850;
  opacity: .88;
}

.service-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.service-note {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  color: var(--muted);
  line-height: 1.65;
}

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  font-weight: 850;
}

.empty-state.compact {
  padding: 18px;
}

.site-footer {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}

.site-footer p {
  color: var(--muted);
}

.admin-page {
  min-height: 100vh;
  padding: 24px 0 32px;
}

.admin-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-hero,
.admin-dashboard-head,
.password-panel,
.admin-login-card {
  border: 1px solid rgba(217, 224, 234, .86);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-sm);
}

.admin-hero {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.admin-dashboard-head {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  gap: 22px;
  align-items: stretch;
  padding: 24px;
  margin-bottom: 18px;
}

.admin-dashboard-head p,
.admin-login-card p,
.password-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.admin-dashboard-head h1,
.admin-login-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

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

.admin-login-card {
  width: min(520px, 100%);
  margin: 56px auto 0;
  padding: 28px;
}

.form-row {
  margin: 12px 0;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: .9rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(15, 118, 110, .55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .10);
}

input[type="color"] {
  padding: 4px;
}

.notice,
.error {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 850;
}

.notice {
  background: #ecfdf3;
  color: #027a48;
}

.error {
  background: #fef3f2;
  color: #b42318;
}

.items-editor {
  display: grid;
  gap: 12px;
}

.add-panel {
  margin-bottom: 18px;
}

.analytics-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 224, 234, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
}

.analytics-panel h2 {
  font-size: 1.65rem;
}

.analytics-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

.hint-box {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1efff;
  color: #475467 !important;
  font-size: .9rem;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.category-editor-list {
  display: grid;
  gap: 12px;
}

.category-editor {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-editor-preview {
  min-height: 154px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.24), transparent 36%),
    linear-gradient(135deg, var(--category-color), #101828);
}

.category-editor-preview span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  font-weight: 950;
}

.category-editor-preview strong {
  font-size: 1.1rem;
}

.category-editor-preview small {
  opacity: .82;
  font-weight: 850;
}

.category-fields {
  align-items: end;
}

.add-form {
  display: grid;
  gap: 12px;
}

.add-grid {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.item-editor {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.item-preview {
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background-size: cover !important;
  background-position: center !important;
}

.item-fields {
  min-width: 0;
}

.item-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.item-toggles {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.check-label input {
  width: auto;
  min-height: auto;
}

.danger-check {
  color: #b42318;
}

.editor-grid {
  display: grid;
  grid-template-columns: .9fr 1.2fr 1.2fr .8fr .55fr;
  gap: 0 10px;
}

.span-2 {
  grid-column: span 2;
}

.password-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-top: 18px;
}

.password-panel h2 {
  font-size: 1.35rem;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: 16px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(247,249,252,0), var(--bg) 34%);
}

@media (max-width: 1100px) {
  .category-editor,
  .item-editor,
  .editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-editor-preview,
  .item-preview,
  .span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .hero-panel,
  .admin-dashboard-head,
  .password-panel,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .admin-hero,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .hero-panel,
  .service-section,
  .admin-section,
  .analytics-panel,
  .admin-dashboard-head,
  .admin-login-card {
    padding: 18px;
  }

  .social-grid,
  .games-grid,
  .dynamic-grid,
  .category-editor,
  .item-editor,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .category-editor-preview,
  .item-preview,
  .span-2 {
    grid-column: span 1;
  }

  .hero-actions,
  .hero-actions .button,
  .admin-actions,
  .admin-actions .button,
  .panel-actions,
  .panel-actions .button {
    width: 100%;
  }
}
