@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=Changa:wght@600;700;800&display=swap");
@import "tokens.css";
@import "animations.css";
@import "mc-creatures.css";
@import "sea-creatures.css";
@import "idle-stalker.css";
@import "turtle.css";

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ocean-abyss);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layered ocean depth */
.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.15), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(46, 196, 182, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(20, 93, 160, 0.12), transparent 45%),
    linear-gradient(
      180deg,
      #020608 0%,
      #051018 15%,
      #0a2540 calc(35% + var(--scroll-depth) * 0.12%),
      #062a45 calc(55% + var(--scroll-depth) * 0.18%),
      #030810 calc(75% + var(--scroll-depth) * 0.1%),
      #010408 100%
    );
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="light"] .ocean-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 150, 200, 0.12), transparent 55%),
    linear-gradient(180deg, #dff0fa 0%, #c5e8f5 40%, #e8f4fc 100%);
}

[data-theme="light"] .noise-overlay {
  opacity: 0.02;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1240px, 92vw);
  margin-inline: auto;
}

/* Premium glass */
.glass {
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 40%, rgba(0, 212, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(0, 212, 255, 0.06);
}

.nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--turquoise), transparent);
  opacity: 0.5;
}

[data-theme="light"] .nav {
  background: rgba(240, 248, 252, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--ocean-primary) 50%, var(--sea-green));
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 900;
  font-family: var(--font-brand);
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow: 0 0 24px var(--glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo-text-main {
  display: block;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 20%, var(--cyan) 60%, var(--turquoise));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  flex: 1;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.15);
}

.nav-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 212, 255, 0.04);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: all 0.25s ease;
}

.icon-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--glow-cyan);
  transform: translateY(-1px);
}

.icon-btn.active {
  border-color: var(--turquoise);
  color: var(--turquoise);
  background: rgba(46, 196, 182, 0.1);
}

/* Sound toggle */
#soundToggle .sound-icon {
  display: block;
  width: 16px;
  height: 14px;
  position: relative;
}

#soundToggle .sound-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 6px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 30%, 45% 30%, 100% 0, 100% 100%, 45% 70%, 0 70%);
}

#soundToggle .sound-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 1px;
  width: 8px;
  height: 12px;
  border: 2px solid currentColor;
  border-left: none;
  border-radius: 0 8px 8px 0;
  opacity: 0.85;
}

#soundToggle.muted .sound-icon::after {
  opacity: 0;
}

#soundToggle.muted .sound-icon {
  opacity: 0.5;
}

#soundToggle.muted::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  transform: rotate(-45deg);
  border-radius: 1px;
}

#soundToggle {
  position: relative;
}

#soundToggle.muted {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Hero — cinematic */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  isolation: isolate;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orb-float 12s ease-in-out infinite;
}

.hero-orb--1 {
  width: 420px;
  height: 420px;
  background: rgba(0, 212, 255, 0.18);
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-orb--2 {
  width: 280px;
  height: 280px;
  background: rgba(46, 196, 182, 0.12);
  bottom: 0;
  right: 5%;
  animation-delay: -4s;
}

.hero-orb--3 {
  width: 200px;
  height: 200px;
  background: rgba(20, 93, 160, 0.25);
  bottom: 20%;
  left: 8%;
  animation-delay: -7s;
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, -18px) scale(1.05);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
  letter-spacing: 0.03em;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 10px var(--turquoise);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, var(--cyan) 45%, var(--turquoise) 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.25));
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  color: var(--turquoise);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.hero-desc {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.search-bar {
  display: flex;
  max-width: 580px;
  margin: 0 auto;
  gap: 0.65rem;
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
}

.search-bar input {
  flex: 1;
  padding: 1rem 1.25rem;
  border-radius: calc(var(--radius-lg) - 4px);
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

.search-bar input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 212, 255, 0.35);
}

.search-bar button {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: calc(var(--radius-lg) - 4px);
  background: linear-gradient(135deg, var(--ocean-bright), var(--sea-green));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 20px rgba(27, 153, 139, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.35);
}

/* Random mod button */
.btn-random-mod {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.35rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(46, 196, 182, 0.06));
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: start;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.12);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, border-color 0.25s;
}

.btn-random-mod:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--cyan);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.25);
}

.btn-random-mod:active {
  transform: scale(0.98);
}

.btn-random-mod.is-rolling {
  animation: random-shake 0.12s ease infinite;
  pointer-events: none;
}

@keyframes random-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

.btn-random-mod__dice {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ocean-bright), var(--sea-green));
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
}

.btn-random-mod__dice::before,
.btn-random-mod__dice::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.btn-random-mod__dice::before {
  top: 9px;
  left: 9px;
}

.btn-random-mod__dice::after {
  bottom: 9px;
  right: 9px;
}

.btn-random-mod.is-rolling .btn-random-mod__dice {
  animation: dice-roll 0.35s linear infinite;
}

@keyframes dice-roll {
  to {
    transform: rotate(360deg);
  }
}

.btn-random-mod__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.btn-random-mod__text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--cyan);
}

.btn-random-mod__text small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--turquoise));
  box-shadow: 0 0 12px var(--glow-cyan);
}

.section-header a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--turquoise);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 196, 182, 0.25);
  transition: all 0.2s;
}

.section-header a:hover {
  background: rgba(46, 196, 182, 0.1);
  border-color: var(--turquoise);
}

.section-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Mod cards — premium */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.mod-card-wrap {
  position: relative;
  border-radius: calc(var(--radius) + 2px);
  padding: 1px;
  background: linear-gradient(145deg, rgba(0, 212, 255, 0.35), rgba(46, 196, 182, 0.1), rgba(20, 93, 160, 0.2));
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.35s;
}

.mod-card-wrap:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.15), 0 0 0 1px rgba(0, 212, 255, 0.2);
}

.mod-card {
  overflow: hidden;
  border-radius: var(--radius);
  height: 100%;
}

.mod-card a {
  color: inherit;
  display: block;
  height: 100%;
}

.mod-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-primary));
  position: relative;
  overflow: hidden;
}

.mod-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 8, 16, 0.85));
  pointer-events: none;
}

.mod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mod-card-wrap:hover .mod-thumb img {
  transform: scale(1.06);
}

.mod-badge {
  position: absolute;
  top: 0.65rem;
  inset-inline-start: 0.65rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 212, 255, 0.15);
  backdrop-filter: blur(8px);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.35);
}

.mod-body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.mod-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
}

.mod-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.mod-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(46, 196, 182, 0.1);
  color: var(--turquoise);
  border: 1px solid rgba(46, 196, 182, 0.22);
}

.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cat-pill {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.cat-pill:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.12);
  transform: translateY(-2px);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}

.stat-box {
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.stat-box strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--cyan), var(--turquoise));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-box span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-slot {
  min-height: 90px;
  border: 1px dashed rgba(0, 212, 255, 0.2);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  margin: 1.75rem 0;
}

.ad-slot--sidebar {
  min-height: 280px;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.ad-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .ad-slot--sidebar {
    display: none;
  }
}

.footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  font-family: var(--font-display);
  margin-bottom: 0.85rem;
  color: var(--turquoise);
  font-weight: 700;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.45rem;
}

.footer a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mod-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .mod-hero {
    grid-template-columns: 1fr;
  }
}

.mod-gallery {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ocean-mid);
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--glass-border);
}

.mod-info h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.btn {
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 212, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ocean-bright), var(--sea-green));
  border: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(27, 153, 139, 0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.2);
}

.content-block {
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.content-block h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--turquoise);
}

[dir="rtl"] .nav-links,
[dir="rtl"] .mod-meta,
[dir="rtl"] .mod-tags {
  direction: rtl;
}

/* ═══════════════════════════════════════
   EPIC UI — pop, glow, motion
   ═══════════════════════════════════════ */

main {
  position: relative;
  z-index: 3;
}

.nav {
  z-index: 200;
}

/* Global cursor glow — follows mouse on entire site */
:root {
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    radial-gradient(circle, rgba(0, 212, 255, 0.14) 0%, rgba(46, 196, 182, 0.08) 22%, rgba(20, 93, 160, 0.04) 45%, transparent 68%);
  mix-blend-mode: screen;
  will-change: transform;
}

.cursor-glow-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.25) 0%, rgba(125, 255, 170, 0.08) 40%, transparent 70%);
  animation: core-pulse 2.5s ease-in-out infinite;
}

@keyframes core-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

[data-animations="on"] .cursor-glow {
  opacity: 1;
}

[data-theme="light"] .cursor-glow {
  mix-blend-mode: multiply;
  background:
    radial-gradient(circle, rgba(20, 93, 160, 0.1) 0%, rgba(46, 196, 182, 0.06) 30%, transparent 65%);
}

.hero h1 {
  animation: title-shimmer 4s ease-in-out infinite, title-float 6s ease-in-out infinite;
}

@keyframes title-shimmer {
  0%,
  100% {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 60px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 100px rgba(46, 196, 182, 0.2));
  }
}

@keyframes title-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-badge {
  animation: badge-pop 3s ease-in-out infinite;
}

@keyframes badge-pop {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.25);
  }
}

.search-bar {
  animation: search-glow 3s ease-in-out infinite;
}

@keyframes search-glow {
  0%,
  100% {
    box-shadow: var(--shadow-glow);
  }
  50% {
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.2), 0 0 80px rgba(46, 196, 182, 0.1), var(--shadow-glow);
  }
}

.search-bar button {
  position: relative;
  overflow: hidden;
}

.search-bar button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: btn-shine 3s ease infinite;
}

@keyframes btn-shine {
  0% {
    transform: translateX(-100%);
  }
  40%,
  100% {
    transform: translateX(100%);
  }
}

/* Nav glow links */
.nav-links a {
  position: relative;
  overflow: hidden;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  inset-inline: 0.9rem;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--turquoise));
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px var(--glow-cyan);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.icon-btn {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn:active {
  transform: scale(0.9);
}

/* 3D card tilt + pop */
.mod-card-wrap {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease, box-shadow 0.35s ease;
}

.mod-card-wrap:hover {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-10px) scale(1.02);
}

.mod-card-wrap:hover .mod-badge {
  animation: badge-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.mod-badge {
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  }
}

.tag {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mod-card-wrap:hover .tag {
  transform: translateY(-2px);
}

.tag:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
  transform: scale(1.08);
}

.cat-pill {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-pill:hover {
  transform: translateY(-4px) scale(1.05);
}

/* Scroll reveal pop */
.reveal-item {
  opacity: 0;
  transform: translateY(50px) scale(0.9);
}

.reveal-item.revealed {
  animation: reveal-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--reveal-i, 0) * 0.08s);
}

@keyframes reveal-pop {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  70% {
    transform: translateY(-8px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stat-box {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.stat-box:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.15), var(--shadow-card);
}

.stat-box strong {
  animation: stat-pulse 3s ease-in-out infinite;
}

@keyframes stat-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
  }
}

.section-header h2::after {
  animation: line-grow 2s ease-in-out infinite;
}

@keyframes line-grow {
  0%,
  100% {
    width: 48px;
    opacity: 0.6;
  }
  50% {
    width: 72px;
    opacity: 1;
  }
}

.glass {
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08), var(--shadow-card);
  border-color: rgba(0, 212, 255, 0.28);
}

.logo-icon {
  animation: logo-spin-glow 8s linear infinite;
}

@keyframes logo-spin-glow {
  0%,
  100% {
    box-shadow: 0 0 24px var(--glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.6), 0 0 60px rgba(46, 196, 182, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.mod-gallery {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}

.mod-gallery:hover {
  transform: scale(1.02);
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.2), var(--shadow-glow);
}

.content-block:hover {
  border-color: rgba(0, 212, 255, 0.25);
}

.footer a {
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.footer a:hover {
  transform: translateX(-4px);
}

[dir="ltr"] .footer a:hover {
  transform: translateX(4px);
}

.cat-pill {
  cursor: pointer;
  font-family: inherit;
}

.cat-pill.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.14);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.mod-loader {
  position: absolute;
  bottom: 0.55rem;
  left: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
  font-family: inherit;
  cursor: default;
}

.mod-loader--filter {
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.mod-loader--filter:hover {
  transform: scale(1.05);
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.2);
  color: var(--cyan);
}

.mod-loader--page {
  position: static;
  display: inline-block;
  margin-bottom: 0.65rem;
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.35);
  color: var(--cyan);
}

.mod-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-fact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.mod-desc-text {
  white-space: pre-line;
  line-height: 1.9;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .mod-facts-grid {
    grid-template-columns: 1fr;
  }
}

.mod-type-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mod-type-value {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
}

.btn-show-more {
  display: block;
  margin: 1.25rem auto 0;
  min-width: 180px;
}

.empty-msg {
  color: var(--text-muted);
  padding: 1rem 0;
}

.cat-pill {
  text-decoration: none;
  transition: all 0.2s ease;
}

.cat-count {
  font-size: 0.72rem;
  opacity: 0.75;
  font-weight: 600;
}

.categories-bar {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
}

.section--tight {
  padding: 1.5rem 0 0;
}

.search-bar--compact {
  margin: 1.5rem 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.page-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-num,
.page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.page-num:hover,
.page-arrow:not(.disabled):hover {
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.1);
}

.page-num.active {
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.16);
}

.page-arrow.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stats-row--single {
  justify-content: center;
}

.stats-row--single .stat-box {
  min-width: 160px;
  text-align: center;
}

.social-card {
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
}

.social-card h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-links a {
  color: var(--turquoise);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.social-links a:hover {
  color: var(--cyan);
}

.footer-grid .social-links {
  gap: 0.35rem;
}

.footer-grid .social-links a {
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════
   Contact FAB · Comments · Gallery · Mobile nav
   ═══════════════════════════════════════ */

.contact-fab {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 350;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.contact-fab__toggle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.35);
  background: linear-gradient(135deg, var(--ocean-bright), var(--sea-green));
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-fab__toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 36px rgba(0, 212, 255, 0.45);
}

.contact-fab__menu {
  min-width: 220px;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(8, 24, 40, 0.92);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 0.45rem;
}

.contact-fab__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--turquoise);
  letter-spacing: 0.04em;
}

.contact-fab__link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.contact-fab__link:hover {
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.1);
}

.contact-fab__link--wa:hover {
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.12);
}

.contact-fab__link--dc:hover {
  border-color: rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.12);
}

.contact-fab.open .contact-fab__toggle {
  transform: rotate(8deg) scale(1.04);
}

.nav-burger {
  display: none;
}

.mod-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  aspect-ratio: auto;
  padding: 0.75rem;
  height: auto;
}

.mod-gallery-main {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  background: var(--ocean-mid);
}

.mod-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mod-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.mod-gallery-thumb {
  flex: 0 0 84px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mod-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mod-gallery-thumb.active,
.mod-gallery-thumb:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.mod-gallery-empty {
  display: grid;
  place-items: center;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mod-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.mod-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.comment-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font-family: inherit;
}

.comment-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.comment-ratings {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.comment-ratings legend {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.comment-ratings label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.comments-list {
  display: grid;
  gap: 0.85rem;
}

.comment-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

.comment-head time {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.comment-rating {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.comment-rating--good {
  color: #7dffb0;
  background: rgba(46, 196, 182, 0.15);
}

.comment-rating--bad {
  color: #ff8a8a;
  background: rgba(255, 90, 90, 0.12);
}

.comment-rating--neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.comment-item p {
  margin: 0;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav-inner {
    position: relative;
  }

  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline: 0;
    flex-direction: column;
    padding: 0.65rem;
    border-radius: var(--radius-md);
    background: rgba(8, 24, 40, 0.95);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    z-index: 220;
  }

  .nav-links.open {
    display: flex;
  }

  .comment-form-row {
    grid-template-columns: 1fr;
  }

  .contact-fab {
    inset-inline-end: 0.85rem;
    bottom: 0.85rem;
  }
}

/* Auth · Favorites · Profile */
.mod-thumb {
  position: relative;
}

.mod-fav-btn {
  position: absolute;
  top: 0.5rem;
  inset-inline-end: 0.5rem;
  z-index: 3;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mod-fav-btn:hover,
.mod-fav-btn.active {
  background: rgba(255, 80, 120, 0.85);
  border-color: rgba(255, 120, 150, 0.6);
  transform: scale(1.08);
}

.mod-fav-btn--page {
  position: static;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
}

.auth-nav {
  display: flex;
  align-items: center;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(93, 219, 138, 0.45);
  background: linear-gradient(135deg, rgba(45, 143, 82, 0.35), rgba(0, 212, 255, 0.12));
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-auth:hover {
  border-color: var(--mc-accent);
  box-shadow: 0 0 16px rgba(93, 219, 138, 0.2);
  transform: translateY(-1px);
}

.btn-auth__icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.72rem;
}

.auth-nav__btn {
  padding: 0;
  border: 2px solid rgba(0, 212, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.auth-nav__avatar,
.comment-avatar,
.profile-modal__avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-nav__avatar {
  width: 36px;
  height: 36px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.profile-modal[hidden] {
  display: none !important;
}

.profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.profile-modal__panel {
  position: relative;
  width: min(380px, 92vw);
  padding: 1.5rem;
  text-align: center;
}

.profile-modal__close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.profile-modal__avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  display: block;
}

.profile-modal__upload {
  display: inline-block;
  margin-bottom: 1rem;
  cursor: pointer;
}

.profile-modal__name {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.profile-modal__email {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.profile-modal__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.comment-login-prompt {
  padding: 1.25rem;
  text-align: center;
  display: grid;
  gap: 0.85rem;
}

.comment-form-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

#commentForm.comment-form {
  display: grid;
  gap: 1rem;
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════
   Browse page — Modrinth-inspired layout
   ═══════════════════════════════════════ */

.browse-page {
  padding-top: 1rem;
}

.browse-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
}

.browse-tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.browse-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.browse-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--sea-green), var(--ocean-bright));
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 4px 16px rgba(46, 196, 182, 0.25);
}

.browse-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.browse-sidebar {
  position: sticky;
  top: 5rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.browse-filter + .browse-filter {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.browse-filter__title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 0.65rem;
}

.browse-filter__list {
  display: grid;
  gap: 0.2rem;
}

.browse-filter__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.browse-filter__item:hover {
  color: var(--text);
  background: rgba(0, 212, 255, 0.08);
}

.browse-filter__item.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.12);
  font-weight: 700;
}

.browse-filter__count {
  font-size: 0.72rem;
  opacity: 0.7;
}

.browse-select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-family: inherit;
  font-size: 0.85rem;
}

.browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
}

.browse-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.browse-search__icon {
  color: var(--text-dim);
  font-size: 1rem;
}

.browse-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.browse-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.browse-sort {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.browse-sort select {
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-family: inherit;
  font-size: 0.82rem;
}

.browse-view-toggle {
  display: flex;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.browse-view-btn {
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.browse-view-btn.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
}

.browse-results-head {
  margin-bottom: 1rem;
}

.browse-results-head h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.mod-list {
  display: grid;
  gap: 0.65rem;
}

.mod-row {
  position: relative;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-row:hover {
  border-color: rgba(0, 212, 255, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.mod-row__link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
}

.mod-row .mod-fav-btn {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  z-index: 2;
}

.mod-row__icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ocean-mid);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-row__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.mod-row__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.mod-row__badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
}

.mod-row__desc {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mod-row__tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.mod-row__tag--cat {
  color: var(--turquoise);
  border-color: rgba(46, 196, 182, 0.25);
  background: rgba(46, 196, 182, 0.1);
}

.mod-row__tag--loader {
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.25);
}

.mod-row__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 5.5rem;
  padding-inline-end: 2rem;
}

.mod-row__stat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.mod-row__stat--rating {
  color: #ffd56a;
}

.browse-grid.hidden {
  display: none;
}

@media (max-width: 900px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }

  .browse-sidebar {
    position: static;
    max-height: none;
  }

  .mod-row__link {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .mod-row__stats {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    padding-inline-start: calc(52px + 1rem);
    padding-inline-end: 0;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .browse-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .browse-toolbar__actions {
    justify-content: space-between;
  }
}
