/* SlothGames — site styles */
:root {
  --bg: #0d1015;
  --surface: #151a21;
  --surface-2: #1b212a;
  --border: #262d38;
  --border-strong: #343d4a;
  --text: #e8ebf0;
  --text-2: #a3acb9;
  --text-3: #6f7a89;
  --accent: #3d7bfd;
  --accent-hover: #5a8ffe;
  --yt: #e5322d;
  --yt-hover: #f04a45;
  --radius: 8px;
  --radius-sm: 6px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a4352 var(--bg); }

/* Scrollbar (Chrome/Edge/Safari; Firefox uses scrollbar-color above) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #3a4352; border-radius: 999px;
  border: 3px solid var(--bg); /* inset look */
}
::-webkit-scrollbar-thumb:hover { background: #4d5869; }
::-webkit-scrollbar-thumb:active { background: var(--accent); }
::-webkit-scrollbar-corner { background: var(--bg); }
textarea::-webkit-scrollbar-track { background: var(--surface); }
textarea::-webkit-scrollbar-thumb { border-color: var(--surface); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 16, 21, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: 64px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.logo:hover { color: var(--text); }
.logo img { width: 32px; height: 32px; border-radius: 50%; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a { color: var(--text-2); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
.header-actions { display: flex; gap: 8px; }
.menu-btn {
  display: none; margin-left: auto; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
/* Hamburger: three bars that morph into an X */
.bars { position: relative; width: 18px; height: 12px; display: block; }
.bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.bars span:nth-child(1) { top: 0; }
.bars span:nth-child(2) { top: 5px; }
.bars span:nth-child(3) { top: 10px; }
.open .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.open .bars span:nth-child(2) { opacity: 0; }
.open .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.nav-sub { display: none; }

@media (max-width: 960px) {
  .header-inner { gap: 12px; }
  .menu-btn { display: inline-flex; }
  .header-actions { display: none; }

  /* Slide-down menu */
  .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  }
  .nav > * { opacity: 0; transform: translateY(-10px); transition: opacity .2s ease, transform .25s ease; }
  .site-header.open .nav {
    clip-path: inset(0 0 -40px 0);
    visibility: visible;
    transition: clip-path .32s cubic-bezier(.2, .8, .2, 1), visibility 0s;
  }
  .site-header.open .nav > * { opacity: 1; transform: none; }
  .site-header.open .nav > :nth-child(2) { transition-delay: .03s; }
  .site-header.open .nav > :nth-child(3) { transition-delay: .06s; }
  .site-header.open .nav > :nth-child(4) { transition-delay: .09s; }
  .site-header.open .nav > :nth-child(5) { transition-delay: .12s; }
  .site-header.open .nav > :nth-child(6) { transition-delay: .15s; }
  .nav a { padding: 12px; font-size: 16px; }
  .nav .nav-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .nav .nav-sub .btn { padding: 0 12px; font-size: 15px; height: 44px; }
  .nav .nav-sub .btn-light { color: #0d1015; }
  .nav .nav-sub .btn-secondary { color: var(--text); }
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav > *, .bars span { transition: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-yt { background: var(--yt); color: #fff; }
.btn-yt:hover { background: var(--yt-hover); color: #fff; }
.btn .logo-img { width: 20px; height: 20px; flex: none; object-fit: contain; }
.btn-lg .logo-img { width: 22px; height: 22px; }
.btn-light { background: #f4f5f7; color: #0d1015; }
.btn-light:hover { background: #fff; color: #0d1015; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6b76f5; color: #fff; }
.btn-discord .logo-img { border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: #222a35; color: var(--text); border-color: #45505f; }
.btn-danger { background: transparent; color: #f2726e; border-color: #5a2b2b; }
.btn-danger:hover { background: #2a1818; color: #ff8c88; }
.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Home ---------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; align-items: center; gap: 40px; }
.hero-avatar { width: 152px; height: 152px; border-radius: 50%; border: 1px solid var(--border-strong); flex: none; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.hero h1 { font-size: 48px; margin-bottom: 12px; }
.hero .lead { color: var(--text-2); font-size: 18px; max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) {
  .hero { padding: 40px 0 40px; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-avatar { width: 96px; height: 96px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 16px; }
  .hero-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { padding: 0 12px; }
  .hero-actions .btn:last-child { grid-column: 1 / -1; }
  .hide-sm { display: none; }
}

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: 24px; }
.section-head p { color: var(--text-2); margin-top: 4px; }
.link-arrow { font-weight: 600; font-size: 15px; white-space: nowrap; }

.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; }
.profile {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: border-color .15s, background .15s;
}
.profile:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.profile-logo { width: 40px; height: 40px; border-radius: var(--radius-sm); flex: none; object-fit: cover; }
.profile-text { min-width: 0; }
.profile-text strong { display: block; font-size: 15px; }
.profile-text span { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .chev { margin-left: auto; color: var(--text-3); width: 16px; height: 16px; flex: none; }

/* ---------- Page header ---------- */
.page-header { padding: 48px 0 32px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 36px; margin-bottom: 8px; }
.page-header p { color: var(--text-2); max-width: 640px; }
@media (max-width: 600px) { .page-header { padding: 32px 0 24px; } .page-header h1 { font-size: 28px; } }

/* ---------- Mods listing ---------- */
.toolbar { display: flex; gap: 12px; padding: 24px 0; flex-wrap: wrap; }
.field {
  height: 42px; padding: 0 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  font: 400 15px var(--font);
}
.field:focus { outline: none; border-color: var(--accent); }
.toolbar .search { flex: 1 1 260px; }
.toolbar select { flex: 0 1 200px; }
select.field { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3acb9' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
@media (max-width: 600px) { .toolbar select { flex: 1 1 calc(50% - 6px); } }

.result-count { color: var(--text-3); font-size: 14px; margin-bottom: 16px; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 64px; }
@media (max-width: 400px) { .mod-grid { grid-template-columns: 1fr; } }
.mod-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s;
}
.mod-card:hover { border-color: var(--border-strong); }
.thumb { aspect-ratio: 16 / 9; background: var(--surface-2); display: block; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mod-card:hover .thumb img { transform: scale(1.03); }
.thumb-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.thumb-placeholder svg { width: 56px; height: 56px; opacity: .6; }
.mod-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mod-cat { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.mod-title { font-size: 18px; }
.mod-title a { color: var(--text); }
.mod-title a:hover { color: var(--accent-hover); }
.mod-desc { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--text-3); font-size: 13px; margin-top: auto; padding-top: 8px; }
.mod-stats span { display: inline-flex; align-items: center; gap: 5px; }
.mod-stats svg { width: 14px; height: 14px; }
.mod-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; }

.state { padding: 64px 16px; text-align: center; color: var(--text-2); grid-column: 1 / -1; }
.state h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.skeleton-card { height: 360px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Mod detail ---------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-3); padding: 24px 0 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--text); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding-bottom: 64px; align-items: start; }
.detail-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.detail h1 { font-size: 32px; margin: 28px 0 16px; }
.detail-section h2 { font-size: 18px; margin: 32px 0 12px; }
.prose { color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.steps { color: var(--text-2); padding-left: 20px; margin: 0; }
.steps li + li { margin-top: 6px; }
.sidebar { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar .btn + .btn { margin-top: 8px; }
.facts { margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 14px; }
.facts dt, .facts dd { padding: 10px 0; border-top: 1px solid var(--border); margin: 0; }
.facts dt { color: var(--text-3); padding-right: 16px; }
.facts dd { text-align: right; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; gap: 0; }
  .sidebar { position: static; margin-top: 24px; order: 2; }
  .detail-main { display: contents; }
  .detail-media { order: 0; }
  .detail-title { order: 1; }
  .detail-rest { order: 3; }
  .detail h1 { font-size: 26px; margin: 20px 0 0; }
}

/* ---------- Forms (admin) ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.form .hint { font-weight: 400; color: var(--text-3); font-size: 13px; }
.form .field { width: 100%; }
.form textarea.field { height: auto; min-height: 140px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.form input[type=file].field { padding: 8px; height: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
@media (max-width: 600px) { .panel { padding: 16px; } }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 32px 0 64px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.form .field, .form label { min-width: 0; }
@media (max-width: 600px) {
  .admin-item { flex-wrap: wrap; }
  .admin-item .info { flex-basis: calc(100% - 76px); }
  .admin-item .btn { flex: 1; }
}
.panel h2 { font-size: 18px; margin-bottom: 16px; }
.notice { font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.notice.ok { border-color: #1f5136; background: #11241a; color: #7ee2a8; }
.notice.err { border-color: #5a2b2b; background: #241313; color: #ff9a96; }
.admin-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.admin-item:first-child { border-top: 0; padding-top: 0; }
.admin-item img, .admin-item .mini-ph { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex: none; }
.admin-item .info { flex: 1; min-width: 0; }
.admin-item .info strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item .info span { font-size: 13px; color: var(--text-3); }
.admin-item .btn { height: 32px; padding: 0 10px; font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-3); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }

/* ---------- Admin: token bar, tabs, upload progress ---------- */
.admin-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; padding: 32px 0 0; }
.token-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; flex: 0 1 360px; }
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; gap: 4px; }
.tab { font: 600 14px var(--font); color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-sm); padding: 9px 16px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
@media (max-width: 600px) { .token-field { flex-basis: 100%; } .tabs { width: 100%; } .tab { flex: 1; } }

.progress { position: relative; height: 36px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(61, 123, 253, 0.35); transition: width .3s ease; }
.progress span { position: relative; display: block; line-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; }

/* ---------- Admin: visitor stats ---------- */
.muted { color: var(--text-3); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tile span { display: block; font-size: 13px; color: var(--text-3); }
.tile strong { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

.chart-title, .stat-list h3 { font-size: 15px; margin-bottom: 14px; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--border-strong); }
.col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; }
.col-bar { width: 100%; min-height: 1px; background: var(--accent); border-radius: 4px 4px 0 0; }
.col:hover .col-bar, .col:focus .col-bar { background: var(--accent-hover); }
.col .tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: #222a35; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; pointer-events: none;
}
.col .tip strong { display: block; color: var(--text); margin-bottom: 2px; }
.col:hover .tip, .col:focus .tip { display: block; }
.col:first-child .tip { left: 0; transform: none; }
.col:last-child .tip { left: auto; right: 0; transform: none; }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 16px 0; }
.stat-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stat-list li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; font-size: 14px; border-radius: 4px; overflow: hidden; }
.stat-list .bar { position: absolute; inset: 0 auto 0 0; background: rgba(61, 123, 253, 0.16); border-radius: 4px; }
.stat-list .label { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-list .n { position: relative; color: var(--text-2); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.events { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 680px; }
table.events th { text-align: left; color: var(--text-3); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border-strong); }
table.events td { padding: 8px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
table.events td:first-child { white-space: nowrap; color: var(--text); }

/* ---------- Image slideshow ---------- */
.thumb .gallery { position: absolute; inset: 0; outline: none; }
.g-track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: block; overflow: hidden; }
.g-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.mod-card:hover .thumb img { transform: none; }
.mod-card:hover .g-slide img { transform: scale(1.03); }

.g-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius-sm);
  background: rgba(13, 16, 21, 0.72); color: #fff; cursor: pointer;
  backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s, background .15s;
}
.g-btn svg { width: 18px; height: 18px; }
.g-btn:hover { background: rgba(13, 16, 21, 0.92); }
.g-prev { left: 10px; }
.g-next { right: 10px; }
.gallery:hover .g-btn, .gallery:focus-within .g-btn { opacity: 1; }
@media (hover: none) { .g-btn { opacity: 1; width: 32px; height: 32px; } }

.g-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.g-dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; pointer-events: auto;
  background: rgba(255,255,255,0.45); box-shadow: 0 0 0 1px rgba(0,0,0,0.25); transition: background .15s, transform .15s;
}
.g-dot.on { background: #fff; transform: scale(1.25); }
.g-count {
  position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(13, 16, 21, 0.72); padding: 3px 8px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.mod-card .g-count { display: none; }

/* Detail page: big slideshow + thumbnail strip */
.detail-media { border: 0; border-radius: 0; overflow: visible; }
.detail-media .thumb { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.g-strip { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.g-thumb {
  flex: 0 0 auto; width: 104px; aspect-ratio: 16 / 9; padding: 0; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2);
  opacity: .6; transition: opacity .15s, border-color .15s;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb:hover { opacity: .9; }
.g-thumb.on { border-color: var(--accent); opacity: 1; }
@media (max-width: 600px) { .g-thumb { width: 76px; } }

/* Admin: image editor */
.img-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.img-item { position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.img-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.img-item .cover { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 4px; }
.img-item .img-tools { display: flex; border-top: 1px solid var(--border); }
.img-item .img-tools button { flex: 1; height: 30px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; font: 600 14px var(--font); }
.img-item .img-tools button:hover:not([disabled]) { background: #222a35; color: var(--text); }
.img-item .img-tools button[disabled] { opacity: .3; cursor: default; }
.img-item .img-tools button + button { border-left: 1px solid var(--border); }
.img-item .img-tools .del:hover { color: #ff8c88 !important; }

/* Admin: sign-in */
.signin { max-width: 400px; margin: 80px auto; }
.signin h1 { font-size: 24px; margin-bottom: 6px; }
.signin p { color: var(--text-2); margin-bottom: 20px; font-size: 15px; }

/* ---------- Contact page ---------- */
.contact-wrap { max-width: 760px; padding-top: 32px; padding-bottom: 64px; }
.contact-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact-card .profile-logo { width: 48px; height: 48px; }
.contact-text { flex: 1 1 240px; min-width: 0; }
.contact-label { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.contact-email { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; user-select: all; }
.contact-card .btn { min-width: 120px; }
.btn.copied { background: #1f8a4c; }
.btn.copied:hover { background: #239a55; }
#copy-status { min-height: 1.5em; margin: 10px 2px 0; }
.section-title-sm { font-size: 18px; margin: 32px 0 14px; }
@media (max-width: 600px) { .contact-email { font-size: 18px; } .contact-card .btn { width: 100%; } }
