/* ═══════════════════════════════════════════════════════════════════════════
   sHga3.com — Classic Monochrome Obsidian & Silver Starlight Theme
   Clean, Timeless, High-Contrast Black & Gray Architecture
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-void: #050507;
  --bg-base: #090a0d;
  --bg-surface: rgba(15, 16, 21, 0.84);
  --bg-surface-strong: rgba(19, 21, 27, 0.94);
  --bg-elevated: rgba(27, 30, 38, 0.88);
  --bg-input: rgba(10, 11, 15, 0.92);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.26);

  --text-primary: #f2f4f8;
  --text-secondary: #a4aab8;
  --text-muted: #6f7585;

  --accent-white: #ffffff;
  --accent-silver: #d4d8e2;
  --accent-gray: #424756;
  --danger-bg: rgba(180, 62, 62, 0.14);
  --danger-border: rgba(215, 90, 90, 0.35);
  --danger-text: #f0a1a1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.55);
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  scrollbar-color: #2d313e #06070a;
  scrollbar-width: thin;
}

::selection {
  background: rgba(232, 236, 245, 0.22);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #06070a;
}

::-webkit-scrollbar-thumb {
  background: #282b36;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d4252;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-void);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Starry Night Canvas Background ───────────────────────────────────────── */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -5%, #161923 0%, #090a0e 42%, #030305 100%);
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.032), transparent 44%),
    radial-gradient(circle at 82% 24%, rgba(190, 198, 220, 0.028), transparent 46%),
    radial-gradient(circle at 50% 112%, rgba(0, 0, 0, 0.8), transparent 62%);
}

/* ── Classic Prestige Crest Strip ─────────────────────────────────────────── */

.hero-crest-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 20px;
  margin-bottom: 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 24, 31, 0.86), rgba(11, 12, 17, 0.88));
  border: 1px solid var(--border-medium);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-crest-bar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
}

.hero-crest-left {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.hero-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e9ecf4;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
}

.hero-crest-wordmark {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-white);
}

.hero-crest-divider {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-crest-tagline {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.hero-crest-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mini-stat-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-silver);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
}

/* ── Layout Container ─────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 22px;
}

.main-content {
  flex: 1;
  padding-top: 38px;
  padding-bottom: 72px;
}

/* ── Topbar Header ────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-primary);
  justify-self: start;
}

.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-medium);
  color: var(--accent-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-white);
}

.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Center Nav */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  border: 1px solid var(--border-subtle);
  justify-self: center;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--accent-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #07080b;
  background: linear-gradient(180deg, #f7f8fb 0%, #d9dde7 100%);
  border-color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.nav-btn-owner {
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-btn-owner:not(.active) {
  color: var(--accent-silver);
  background: rgba(255, 255, 255, 0.035);
}

/* Auth Area */
.auth-area {
  justify-self: end;
  display: flex;
  align-items: center;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(35, 38, 48, 0.95), rgba(20, 22, 29, 0.95));
  border: 1px solid var(--border-medium);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-discord:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(48, 52, 66, 0.96), rgba(27, 30, 39, 0.96));
  transform: translateY(-1px);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 10px;
  border-radius: 12px;
  background: rgba(18, 20, 27, 0.92);
  border: 1px solid var(--border-medium);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  background: #14161d;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  max-width: 125px;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.role-badge.owner {
  color: #f3f5fa;
}

.role-badge.member {
  color: #b7becf;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition);
}

.icon-btn:hover {
  color: var(--accent-white);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.09);
}

/* ── Global Banner ────────────────────────────────────────────────────────── */

.global-banner {
  margin-top: 20px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: rgba(24, 26, 34, 0.92);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.global-banner.warn {
  border-color: rgba(210, 185, 120, 0.35);
  background: rgba(34, 30, 22, 0.88);
}

.global-banner.error {
  border-color: var(--danger-border);
  background: rgba(35, 18, 20, 0.9);
  color: var(--danger-text);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.view-section {
  display: none;
  animation: fadeSlideIn 260ms ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-white);
}

.section-subtitle {
  margin: 6px 0 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.count-chip,
.guild-chip {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary,
.btn-danger-ghost,
.btn-ghost-sm {
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  padding: 11px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #07080b;
  background: linear-gradient(180deg, #ffffff 0%, #d6dbe6 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.08);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.14);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.btn-ghost-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.btn-ghost-sm:hover {
  color: var(--accent-white);
  border-color: var(--border-medium);
}

.btn-danger-ghost {
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.btn-danger-ghost:hover {
  background: rgba(200, 68, 68, 0.24);
}

/* ── Search Input ─────────────────────────────────────────────────────────── */

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap svg {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 230px;
  padding: 9px 36px 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--border-strong);
}

/* ── Access Notice Bar ────────────────────────────────────────────────────── */

.access-notice {
  margin-bottom: 22px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.access-notice strong {
  color: var(--text-primary);
}

/* ── News Feed ────────────────────────────────────────────────────────────── */

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 21, 28, 0.86), rgba(11, 12, 17, 0.9));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: border-color var(--transition), transform var(--transition);
}

.news-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  opacity: 0.7;
}

.news-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.news-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.author-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  background: #14161e;
}

.author-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.post-date {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.news-title {
  margin: 0 0 10px;
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--accent-white);
}

.news-body {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-secondary);
  white-space: pre-line;
  word-break: break-word;
}

.news-gallery {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.news-gallery.single {
  grid-template-columns: 1fr;
}

.news-gallery-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
  background: #0d0e13;
  transition: transform var(--transition), border-color var(--transition);
}

.news-gallery-img:hover {
  border-color: var(--border-strong);
  transform: scale(1.008);
}

/* ── Tools Grid ───────────────────────────────────────────────────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(20, 22, 29, 0.88), rgba(11, 12, 16, 0.92));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.tool-cover-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0d12;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.tool-cover-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(9, 10, 14, 0.78), transparent);
  pointer-events: none;
}

.tool-author-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tool-author-mini img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.tool-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 320ms ease;
}

.tool-card:hover .tool-cover {
  transform: scale(1.03);
}

.tool-size-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-white);
  background: rgba(7, 8, 12, 0.78);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(8px);
}

.tool-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tool-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tool-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent-white);
}

.tool-desc {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: pre-line;
  word-break: break-word;
  flex: 1;
}

.tool-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  padding: 4px 9px;
  border-radius: 7px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-tag-btn {
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition), border-color var(--transition);
}

.meta-tag-btn:hover {
  color: var(--accent-white);
  border-color: var(--border-medium);
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.tool-footer .btn-primary {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.88rem;
}

/* ── About Section & Owners Grid ──────────────────────────────────────────── */

.about-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 24, 32, 0.9), rgba(10, 11, 15, 0.92));
  border: 1px solid var(--border-medium);
  border-radius: 22px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  margin-bottom: 38px;
  overflow: hidden;
}

.about-hero::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.about-emblem {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--accent-white);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-medium);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.classic-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 18px;
  max-width: 200px;
}

.classic-ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.classic-ornament i {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--accent-silver);
}

.about-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--accent-white);
}

.about-desc {
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: 1rem;
  color: var(--text-secondary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}

.stat-box {
  padding: 16px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-white);
  line-height: 1.2;
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.subsection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.subsection-title {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--accent-white);
}

.owners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.owner-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 22, 29, 0.88), rgba(11, 12, 16, 0.93));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.owner-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.owner-banner {
  height: 74px;
  background: linear-gradient(135deg, #1b1e28 0%, #0e1015 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.owner-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.owner-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.owner-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -32px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.owner-avatar {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid #0e1015;
  background: #171922;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.owner-crown-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: #090a0d;
  background: linear-gradient(180deg, #f5f7fb 0%, #cfd4df 100%);
}

.owner-display-name {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--accent-white);
}

.owner-username {
  margin: 2px 0 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
}

.owner-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.owner-id-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
  direction: ltr;
}

.owner-profile-link {
  margin-top: auto;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}

.owner-profile-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-strong);
}

/* ── Owner Panel Forms (Option 3 & Option 4) ──────────────────────────────── */

.panel-card {
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-medium);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.step-verify-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-medium);
  margin-bottom: 26px;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #07080b;
  background: linear-gradient(180deg, #ffffff, #cdd2de);
}

.step-verify-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.step-verify-info strong {
  font-size: 0.94rem;
  color: var(--accent-white);
}

.step-verify-info span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.status-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-strong);
  color: var(--accent-white);
}

.classic-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-white);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: stretch;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.req {
  color: #d6dbe6;
}

.opt {
  font-weight: 400;
  color: var(--text-muted);
}

.text-input,
.text-area {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.text-area {
  resize: vertical;
  min-height: 120px;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(8, 9, 13, 0.72);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent-white);
  background: rgba(255, 255, 255, 0.05);
}

.dropzone-image {
  padding: 20px;
  min-height: 224px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-compact {
  padding: 22px 18px;
}

.dropzone-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.dropzone-lead {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dropzone-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: right;
  padding: 6px 8px;
}

.file-chip-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-chip-info strong {
  color: var(--accent-white);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.image-preview-wrap {
  position: relative;
  width: 100%;
  height: 196px;
}

.image-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
}

.remove-preview-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(7, 8, 12, 0.86);
}

.news-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.news-thumb-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
}

.news-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-thumb-remove {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-medium);
  background: rgba(6, 7, 10, 0.85);
  color: var(--accent-white);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

/* Upload Progress */
.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9ca3b5, #ffffff);
  transition: width 120ms linear;
}

.progress-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.form-footer {
  display: flex;
  justify-content: flex-start;
}

/* ── Empty States & Skeletons ─────────────────────────────────────────────── */

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px dashed var(--border-medium);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  color: var(--accent-white);
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.skeleton-card {
  height: 190px;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(18, 20, 26, 0.8) 8%, rgba(30, 33, 43, 0.85) 18%, rgba(18, 20, 26, 0.8) 33%);
  background-size: 200% 100%;
  border: 1px solid var(--border-subtle);
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

/* ── Modals & Toasts ──────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(3, 4, 6, 0.84);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #101218;
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

.modal-title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: var(--accent-white);
}

.modal-body {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.login-modal-card {
  max-width: 460px;
}

.login-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.login-modal-head .modal-title {
  margin: 0;
}

.login-modal-sub {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.login-steps-box {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.login-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-cmd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border-medium);
  color: var(--accent-white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  direction: ltr;
}

.login-code-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px;
}

.login-bot-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 18px;
}

.btn-full {
  width: 100%;
}

.oauth-option-wrap {
  margin-top: 16px;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  border: 1px solid var(--border-medium);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
}

.modal-close-float {
  position: fixed;
  top: 20px;
  left: 22px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: rgba(12, 14, 19, 0.92);
  color: var(--accent-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.toast-stack {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(17, 19, 26, 0.96);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.88rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  animation: fadeSlideIn 200ms ease-out;
}

.toast.error {
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.toast.success {
  border-color: rgba(255, 255, 255, 0.34);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 7, 10, 0.72);
  padding: 18px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-brand {
  font-family: "Cinzel", Georgia, serif;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 920px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand auth"
      "nav nav";
  }

  .brand { grid-area: brand; }
  .auth-area { grid-area: auth; }
  .main-nav {
    grid-area: nav;
    width: 100%;
    overflow-x: auto;
    justify-content: center;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .panel-card {
    padding: 18px;
  }

  .about-hero {
    padding: 26px 18px;
  }

  .search-input {
    width: 100%;
  }

  .user-meta {
    display: none;
  }
}
