:root {
  --gallery-dark: #111827;
  --gallery-accent: #2563eb;
  --gallery-soft: #f3f6fb;
  --gallery-card: #ffffff;
  --gallery-text: #111827;
  --gallery-muted: #6b7280;
}

body { background: var(--gallery-soft); color: var(--gallery-text); }
body.theme-dark {
  --gallery-soft: #0b1220;
  --gallery-card: #111827;
  --gallery-text: #eef2ff;
  --gallery-muted: #cbd5e1;
}
body.theme-dark .text-muted { color: #cbd5e1 !important; }
body.theme-dark .text-dark { color: #eef2ff !important; }
body.theme-dark .form-control, body.theme-dark .form-select, body.theme-dark textarea {
  background: #0f172a; color: #eef2ff; border-color: #334155;
}
body.theme-dark .dropdown-menu { background: #111827; border-color: #334155; }
body.theme-dark .dropdown-item { color: #eef2ff; }
body.theme-dark .dropdown-item:hover { background: #1f2937; }

.gallery-nav { background: linear-gradient(135deg, #111827, #1f2937 58%, #2563eb); }
.nav-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.gallery-footer { color: var(--gallery-muted); }
.gallery-footer a { color: inherit; text-decoration: none; }
.gallery-footer a:hover { text-decoration: underline; }

.hero {
  background: radial-gradient(circle at top left, rgba(37,99,235,.18), transparent 34%), linear-gradient(135deg, var(--gallery-card), rgba(237,243,255,.6));
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 5rem);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.auth-card, .content-card, .image-card, .battle-card, .stat-card {
  background: var(--gallery-card);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .07);
}
.auth-card { max-width: 520px; margin: 0 auto; padding: 2rem; }
.stat-card { padding: 1.25rem; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.image-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.image-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(15, 23, 42, .12); }
.image-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e5e7eb; display: block; }
.media-full { width: 100%; max-height: 76vh; object-fit: contain; background: #000; border-radius: 22px; }

.badge-members { background: #e0edff; color: #1d4ed8; }
.badge-private { background: #f3f4f6; color: #374151; }
.badge-public { background: #dcfce7; color: #166534; }

.dropzone-box { border: 2px dashed #c7d2fe; background: rgba(248,251,255,.72); border-radius: 20px; padding: 1.5rem; }
body.theme-dark .dropzone-box { background: #0f172a; border-color: #334155; }

.btn-primary { background: var(--gallery-accent); border-color: var(--gallery-accent); }
.action-pill { border-radius: 999px; }

.comment-box { border-top: 1px solid rgba(148, 163, 184, .28); padding-top: 1rem; margin-top: 1rem; }
.comment-item { border: 1px solid rgba(148, 163, 184, .28); border-radius: 16px; padding: .9rem; margin-bottom: .75rem; background: rgba(148, 163, 184, .06); }

.slideshow-shell { position: relative; min-height: 72vh; display: flex; align-items: center; justify-content: center; background: #000; border-radius: 28px; overflow: hidden; }
.slideshow-img { width: 100%; max-height: 78vh; object-fit: contain; opacity: 1; transition: opacity .45s ease; }
.slideshow-img.is-fading { opacity: .18; }
.slideshow-caption { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); padding: 4rem 1.5rem 1.25rem; }
.slideshow-controls { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }

.battle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.battle-card { overflow: hidden; }
.battle-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; }
.rank-number { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e0edff; color: #1d4ed8; font-weight: 800; }

.table-card { background: var(--gallery-card); border-radius: 20px; overflow: hidden; border: 1px solid rgba(148, 163, 184, .28); }
body.theme-dark .table { --bs-table-bg: var(--gallery-card); --bs-table-color: var(--gallery-text); --bs-table-border-color: #334155; }

@media (max-width: 767px) { .battle-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .auth-card { padding: 1.25rem; border-radius: 18px; } .gallery-grid { grid-template-columns: 1fr; } }


/* Package 03 public marketing redesign */
.gallery-nav .nav-link { font-weight: 600; }
.navbar-brand span { letter-spacing: -.02em; }
.footer-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }
.gallery-footer { background: #0f172a; color: #cbd5e1; }
.gallery-footer a { display: block; color: #cbd5e1; text-decoration: none; margin: .42rem 0; }
.gallery-footer a:hover { color: #fff; text-decoration: underline; }
.footer-heading { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }

.hero-marketing {
  background: radial-gradient(circle at top left, rgba(56,189,248,.22), transparent 30%), linear-gradient(135deg, #ffffff, #eef2ff 58%, #f5f3ff);
  border-radius: 34px;
  padding: clamp(2rem, 5vw, 5rem);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .11);
  overflow: hidden;
}
body.theme-dark .hero-marketing { background: radial-gradient(circle at top left, rgba(37,99,235,.35), transparent 32%), linear-gradient(135deg, #111827, #0f172a 60%, #1e1b4b); }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border-radius: 999px; background: rgba(37,99,235,.1); color: #1d4ed8; font-weight: 700; font-size: .9rem; }
body.theme-dark .hero-kicker { color: #bfdbfe; background: rgba(96,165,250,.16); }
.hero-image-card { background: rgba(255,255,255,.7); border: 1px solid rgba(148,163,184,.28); border-radius: 30px; padding: 1rem; box-shadow: 0 18px 45px rgba(15,23,42,.12); }
body.theme-dark .hero-image-card { background: rgba(15,23,42,.72); }
.hero-image-card img { width: 100%; border-radius: 22px; display: block; }
.feature-icon { width: 52px; height: 52px; border-radius: 17px; display: inline-flex; align-items: center; justify-content: center; background: #dbeafe; color: #1d4ed8; font-size: 1.45rem; font-weight: 800; margin-bottom: 1rem; }
.marketing-card { background: var(--gallery-card); border: 1px solid rgba(148,163,184,.28); border-radius: 24px; padding: 1.5rem; height: 100%; box-shadow: 0 14px 34px rgba(15,23,42,.06); }
.cta-band { background: linear-gradient(135deg, #111827, #1d4ed8 60%, #7c3aed); color: #fff; border-radius: 30px; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: 0 24px 60px rgba(15,23,42,.18); }
.legal-content h2 { font-size: 1.25rem; margin-top: 1.65rem; }
.legal-content p, .legal-content li { color: var(--gallery-muted); }
.content-hero { background: var(--gallery-card); border: 1px solid rgba(148,163,184,.28); border-radius: 30px; padding: clamp(1.5rem,4vw,3.5rem); box-shadow: 0 18px 45px rgba(15,23,42,.07); }
.check-list { padding-left: 0; list-style: none; }
.check-list li { margin-bottom: .75rem; padding-left: 1.85rem; position: relative; }
.check-list li:before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 900; }
@media (max-width: 991px) { .hero-image-card { margin-top: 1.5rem; } }

/* Package 05 gallery polish */
.gallery-browse-hero {
  background: radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 34%), linear-gradient(135deg, #111827, #1d4ed8 60%, #7c3aed);
  color: #fff;
  border-radius: 30px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 24px 60px rgba(15,23,42,.16);
}
.gallery-browse-hero.public { background: radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 34%), linear-gradient(135deg, #0f172a, #2563eb 55%, #0891b2); }
.gallery-browse-hero .hero-kicker { background: rgba(255,255,255,.16); color: #fff; }
.gallery-filter-bar .form-label { font-weight: 700; }
.gallery-grid-polished { grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }
.gallery-card-polished { position: relative; }
.gallery-card-link { display: block; position: relative; overflow: hidden; }
.gallery-card-link .image-thumb { transition: transform .3s ease; }
.gallery-card-polished:hover .image-thumb { transform: scale(1.035); }
.gallery-card-badge {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.5rem);
  padding: .32rem .62rem;
  background: rgba(15,23,42,.78);
  color: #fff;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--gallery-muted);
}
.gallery-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  border: 1px solid rgba(148,163,184,.20);
}
.detail-stats span { font-size: .9rem; padding: .4rem .7rem; }
.image-detail-card { overflow: hidden; }
.image-description { font-size: 1.03rem; line-height: 1.65; }
.sticky-sidebar { position: sticky; top: 1rem; }
.related-image-list { display: grid; gap: .75rem; }
.related-image-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: .75rem;
  align-items: center;
  padding: .55rem;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(148,163,184,.06);
}
.related-image-item:hover { background: rgba(37,99,235,.08); text-decoration: none; }
.related-image-item img { width: 74px; height: 58px; object-fit: cover; border-radius: 12px; background: #111827; }
.related-image-item span { display: block; font-weight: 700; line-height: 1.2; }
.related-image-item small { display: block; color: var(--gallery-muted); font-weight: 500; margin-top: .25rem; }
.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(37,99,235,.28);
  flex: 0 0 auto;
}
.profile-stat {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.16);
}
.profile-stat strong { display: block; font-size: 1.55rem; line-height: 1; }
.profile-stat span { color: var(--gallery-muted); font-size: .9rem; }
.profile-bio { max-width: 780px; }
.profile-search { min-width: 220px; }
.profile-sort { min-width: 180px; }
body.theme-dark .gallery-card-stats span,
body.theme-dark .related-image-item,
body.theme-dark .profile-stat { background: rgba(148,163,184,.09); border-color: rgba(148,163,184,.20); }
@media (max-width: 991px) { .sticky-sidebar { position: static; } }
@media (max-width: 575px) { .gallery-browse-hero { border-radius: 22px; } .profile-search, .profile-sort { width: 100%; } }
