/* ============================================================
   SHIRAZI TECH — Stylesheet
   Dark/light adaptive via [data-theme] on <html>
   ============================================================ */

/* --- Tokens --- */
:root {
  --bg:              #080c14;
  --bg-2:            #0d1220;
  --bg-card:         #0f1624;
  --bg-card-hover:   #141d2e;
  --text:            #e2e8f4;
  --text-muted:      #6b7a99;
  --accent:          #3d8ef8;
  --accent-dim:      rgba(61, 142, 248, 0.12);
  --accent-glow:     rgba(61, 142, 248, 0.25);
  --amber:           #f5a623;
  --border:          #1a2540;
  --border-bright:   #243050;
  --radius:          14px;
  --shadow:          0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-card:     0 4px 24px rgba(0, 0, 0, 0.5);
  --glow-blue:       0 0 24px rgba(61, 142, 248, 0.18);

  --badge-internal:       rgba(255,255,255,0.06);
  --badge-internal-text:  #8899bb;
  --badge-beta:           rgba(61, 142, 248, 0.12);
  --badge-beta-text:      #5fb3f5;
  --badge-live:           rgba(52, 211, 153, 0.12);
  --badge-live-text:      #34d399;

  --btn-download-bg:      rgba(255,255,255,0.06);
  --btn-download-text:    #c8d4ec;
  --btn-beta-bg:          rgba(61, 142, 248, 0.15);
  --btn-beta-text:        #5fb3f5;
  --btn-store-bg:         rgba(52, 211, 153, 0.12);
  --btn-store-text:       #34d399;
  --btn-web-bg:           rgba(139, 92, 246, 0.15);
  --btn-web-text:         #c4b5fd;
}

[data-theme="light"] {
  --bg:              #f0f4fc;
  --bg-2:            #e8edf8;
  --bg-card:         #ffffff;
  --bg-card-hover:   #f5f8ff;
  --text:            #0f172a;
  --text-muted:      #64748b;
  --accent:          #2563eb;
  --accent-dim:      rgba(37, 99, 235, 0.08);
  --accent-glow:     rgba(37, 99, 235, 0.15);
  --border:          #dde4f0;
  --border-bright:   #c8d4e8;
  --shadow:          0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-card:     0 2px 16px rgba(0, 0, 0, 0.08);
  --glow-blue:       0 0 24px rgba(37, 99, 235, 0.1);

  --badge-internal:       #edf0f7;
  --badge-internal-text:  #475569;
  --badge-beta:           #dbeafe;
  --badge-beta-text:      #1d4ed8;
  --badge-live:           #d1fae5;
  --badge-live-text:      #065f46;

  --btn-download-bg:      #edf0f7;
  --btn-download-text:    #334155;
  --btn-beta-bg:          #dbeafe;
  --btn-beta-text:        #1d4ed8;
  --btn-store-bg:         #d1fae5;
  --btn-store-text:       #065f46;
  --btn-web-bg:           #ede9fe;
  --btn-web-text:         #6d28d9;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Subtle dot-grid texture on dark mode */
[data-theme="dark"] body {
  background-image: radial-gradient(circle, rgba(61,142,248,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .site-header {
  background: rgba(240, 244, 252, 0.82);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

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

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}

.accent { color: var(--accent); }

.brand-store {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9em;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  aspect-ratio: 1 / 1 !important;
  box-sizing: border-box;
}

@media (hover: hover) {
  .theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: scale(1.08);
  }
  .theme-toggle:hover .icon-sun svg { animation: spin-glow 0.6s ease forwards; }
  .theme-toggle:hover .icon-moon svg { animation: moon-rock 0.5s ease forwards; }

  .sidebar-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: scale(1.08);
  }
  .sidebar-toggle:hover svg line { animation: line-glow 0.3s ease forwards; }
}

.theme-toggle:active {
  transform: scale(0.95);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.theme-toggle:active .icon-sun svg  { animation: spin-glow 0.6s ease forwards; }
.theme-toggle:active .icon-moon svg { animation: moon-rock 0.5s ease forwards; }

.sidebar-toggle:active {
  transform: scale(0.95);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.sidebar-toggle:active svg line { animation: line-glow 0.3s ease forwards; }

@keyframes spin-glow {
  0%   { transform: rotate(0deg);   filter: drop-shadow(0 0 0px #fbbf24); }
  100% { transform: rotate(45deg);  filter: drop-shadow(0 0 8px #fbbf24); }
}

@keyframes moon-rock {
  0%   { transform: rotate(0deg) scale(1); }
  40%  { transform: rotate(-15deg) scale(1.15); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes line-glow {
  0%   { stroke: currentColor; }
  100% { stroke: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
}

.theme-toggle svg {
  display: block;
}

[data-theme="dark"]  .icon-sun  { display: flex; color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,0.7)); }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: flex; }

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .sidebar-toggle,
[data-theme="dark"] .lang-wrapper {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 10px rgba(251,191,36,0.2);
}


/* --- Hero Section --- */
.hero {
  position: relative;
  height: auto;
  min-height: 250px; /* reduced */
  padding: 60px 0 20px 0; /* thinner bottom */
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  right: 15%;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translateY(-50%);
  z-index: 0;
  filter: blur(40px);
  animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; transform: translateY(-50%) scale(0.9); }
  100% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 0;
}

.hero-inner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1.8; /* much wider text area */
}

.hero-visual {
  flex: 1;
  display: block; /* Visible on mobile too */
  position: relative;
  min-height: 250px;
  max-width: 350px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .hero-content {
    padding-right: 40px;
  }
  .hero-visual {
    margin: 0;
  }
}

@media (max-width: 899px) {
  .hero-inner-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-height: auto;
    margin: 0;
    z-index: -1;
    opacity: 0.2;
    pointer-events: none;
  }
  .hero-actions {
    justify-content: center;
  }
  [dir="rtl"] .hero-title,
  [dir="rtl"] .hero-sub { 
    text-align: center; 
  }
  .hero-bg-glow {
    right: auto;
    left: 50%;
    margin-left: -35vw;
    width: 70vw;
    height: 70vw;
  }
}

/* Single Animated App Icon */
.single-app-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  object-fit: contain;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

[data-theme="light"] .single-app-icon {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

@media (max-width: 899px) {
  .single-app-icon {
    width: 140px;
    height: 140px;
    border-radius: 32px;
  }
}

/* 1. Float */
.anim-float { animation: animFloat 2s ease forwards; }
@keyframes animFloat {
  0% { transform: translate(-50%, -30%); opacity: 0; }
  15% { transform: translate(-50%, -50%); opacity: 1; }
  50% { transform: translate(-50%, -60%); opacity: 1; }
  85% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(-50%, -80%); opacity: 0; }
}

/* 2. Pulse / Breathe */
.anim-pulse { animation: animPulse 2s ease forwards; }
@keyframes animPulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  85% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}

/* 3. Rotate */
.anim-rotate { animation: animRotate 2s linear forwards; }
@keyframes animRotate {
  0% { transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); opacity: 0; }
  15% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
  85% { transform: translate(-50%, -50%) rotate(45deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(90deg) scale(0.5); opacity: 0; }
}

/* 4. Shake / Wobble */
.anim-shake { animation: animShake 2s ease forwards; }
@keyframes animShake {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1) rotate(-10deg); opacity: 1; }
  35% { transform: translate(-50%, -50%) scale(1) rotate(10deg); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1) rotate(-10deg); opacity: 1; }
  85% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}

/* 5. Glow */
.anim-glow { animation: animGlow 2s ease forwards; }
@keyframes animGlow {
  0% { transform: translate(-50%, -50%); opacity: 0; box-shadow: 0 0 0 rgba(var(--accent-rgb), 0); }
  15% { transform: translate(-50%, -50%); opacity: 1; box-shadow: 0 0 30px var(--accent); }
  85% { transform: translate(-50%, -50%); opacity: 1; box-shadow: 0 0 40px var(--accent); }
  100% { transform: translate(-50%, -50%); opacity: 0; box-shadow: 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* 6. Crossfade */
.anim-crossfade { animation: animCrossfade 2s ease forwards; }
@keyframes animCrossfade {
  0% { transform: translate(-50%, -50%); opacity: 0; }
  15% { transform: translate(-50%, -50%); opacity: 1; }
  85% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(-50%, -50%); opacity: 0; }
}

/* 7. Slide */
.anim-slide { animation: animSlide 2s ease forwards; }
@keyframes animSlide {
  0% { transform: translate(-150%, -50%); opacity: 0; }
  15% { transform: translate(-50%, -50%); opacity: 1; }
  85% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(50%, -50%); opacity: 0; }
}

/* 8. Zoom */
.anim-zoom { animation: animZoom 2s ease forwards; }
@keyframes animZoom {
  0% { transform: translate(-50%, -50%) scale(2); opacity: 0; filter: blur(5px); }
  15% { transform: translate(-50%, -50%) scale(1); opacity: 1; filter: blur(0); }
  85% { transform: translate(-50%, -50%) scale(1); opacity: 1; filter: blur(0); }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; filter: blur(5px); }
}

/* 9. Flip */
.anim-flip { animation: animFlip 2s ease forwards; }
@keyframes animFlip {
  0% { transform: translate(-50%, -50%) perspective(400px) rotateY(-90deg); opacity: 0; }
  15% { transform: translate(-50%, -50%) perspective(400px) rotateY(0deg); opacity: 1; }
  85% { transform: translate(-50%, -50%) perspective(400px) rotateY(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) perspective(400px) rotateY(90deg); opacity: 0; }
}

/* 10. Cube */
.anim-cube { animation: animCube 2s ease forwards; }
@keyframes animCube {
  0% { transform: translate(-50%, -50%) perspective(400px) rotateX(90deg); opacity: 0; }
  15% { transform: translate(-50%, -50%) perspective(400px) rotateX(0deg); opacity: 1; }
  85% { transform: translate(-50%, -50%) perspective(400px) rotateX(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) perspective(400px) rotateX(-90deg); opacity: 0; }
}

/* 11. Ken Burns */
.anim-kenburns { animation: animKenBurns 2s linear forwards; }
@keyframes animKenBurns {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  85% { transform: translate(-45%, -45%) scale(1.2); opacity: 1; }
  100% { transform: translate(-45%, -45%) scale(1.3); opacity: 0; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

.hero-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  max-width: 100%; /* removed 400px restriction */
  opacity: 0.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}

.hero-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.hero-btn.primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.hero-btn.secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-bright);
}

.hero-btn.secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-btn:active {
  transform: scale(0.97);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 6px;
  padding: 28px 0 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  font-weight: 600;
}

/* --- Page Layout --- */
.page-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
  padding-top: 28px;
  padding-left: 16px;
  padding-right: 40px;
  width: 100%;
}

/* --- Sidebar --- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
  margin-right: 32px;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

[data-theme="dark"] .sidebar-section {
  border-color: rgba(61,142,248,0.45) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 14px rgba(61,142,248,0.18);
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Search */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  padding: 8px 10px;
  transition: border-color 0.2s;
}
.sidebar-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.82rem;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0;
  line-height: 1;
  display: none;
}
.search-clear.visible { display: block; }

/* Nav items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s;
}
.nav-item:hover {
  background: var(--accent-dim);
  color: var(--text);
}
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-count {
  margin-left: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  color: var(--text-muted);
}
.nav-item.active .nav-count {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#statBoxLive:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="dark"] #statBoxLive:hover {
  box-shadow: 0 4px 12px rgba(61,142,248,0.15);
}

.stat-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 8px;
  text-align: center;
}
.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-num.accent { color: var(--accent); }
.stat-lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* About */
.about-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.about-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-line;
}
.about-text strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

/* About toggle */
.about-full.hidden { display: none; }
.about-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  margin-top: 2px;
  text-align: left;
  transition: opacity 0.2s;
}
.about-toggle:hover { opacity: 0.75; }

/* Contact */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 8px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}
.contact-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
  margin-top: 2px;
}

.social-icon {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 80px;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.results-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 0;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sidebar-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
}
.sidebar-overlay.open { display: block; }

/* Header right group */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- App Grid --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* --- App Card --- */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.25s, transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  animation: fadeIn 0.35s ease both;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

[data-theme="dark"] .app-card {
  border-color: rgba(61,142,248,0.45) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 14px rgba(61,142,248,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Top edge glow accent line */
.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--glow-blue);
  border-color: var(--accent);
}

[data-theme="dark"] .app-card:hover {
  border-color: rgba(61,142,248,0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(61,142,248,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}

.app-card:hover::before {
  opacity: 1;
}


.header-text-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.version-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
  gap: 8px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--border);
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
}

.app-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.app-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.app-description {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Card Meta --- */

.meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}




.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-A { background: var(--badge-internal); color: var(--badge-internal-text); }
.badge-B { background: var(--badge-beta);     color: var(--badge-beta-text);     }
.badge-C { background: var(--badge-live);     color: var(--badge-live-text);     }

/* Pulse dot on Live badge */
.badge-C::before {
  animation: pulse 2s ease-in-out infinite;
}

.release-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  flex: 0 0 auto;
}

/* --- Action Buttons --- */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apk-note {
  display: block;
  font-size: 0.68rem;
  color: #f5a623;
  margin-top: -2px;
  padding-left: 3px;
  font-weight: 500;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.1px;
}

.action-btn:hover  { opacity: 0.85; transform: scale(0.982); }
.action-btn:active { transform: scale(0.972); }

.btn-download { background: var(--btn-download-bg); color: var(--btn-download-text); border-color: var(--border-bright); }
.btn-beta     { background: var(--btn-beta-bg);     color: var(--btn-beta-text);     border-color: rgba(61,142,248,0.2); }
.btn-store    { background: var(--btn-store-bg);    color: var(--btn-store-text);    border-color: rgba(52,211,153,0.2); }
.btn-web      { background: var(--btn-web-bg);      color: var(--btn-web-text);      border-color: rgba(139,92,246,0.3); }

/* Ghost (secondary) variants */
.btn-ghost { background: transparent; font-size: 0.8rem; }
.btn-ghost.btn-download { border-color: rgba(61,142,248,0.5);         color: #3d8ef8;    }
.btn-ghost.btn-beta     { border-color: rgba(61,142,248,0.35);        color: var(--btn-beta-text); background: transparent; }
.btn-ghost.btn-store    { border-color: rgba(52,211,153,0.35);        color: var(--btn-store-text); background: transparent; }
.btn-ghost.btn-web      { border-color: rgba(139,92,246,0.4);         color: var(--btn-web-text); background: transparent; }

/* --- Empty State --- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-2);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  opacity: 0.7;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-brand {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 300;
    border-radius: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-bright);
    padding: 20px 14px;
    transition: left 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    gap: 8px;
    margin-right: 0;
  }
  .sidebar.open { left: 0; }

  .page-body {
    padding-top: 16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero { height: auto; padding: 48px 0; }
  .hero-title { font-size: 1.55rem; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
}

@media (max-width: 540px) {
  .container { padding: 0 12px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-name { font-size: 1rem; }
  .brand-tagline { font-size: 0.62rem; }
  .hero { height: auto; padding: 40px 0; }
  .hero-title { font-size: 1.25rem; }
  .hero-sub { font-size: 0.78rem; }
  .app-grid { grid-template-columns: 1fr; gap: 12px; }
  .app-card { padding: 18px; gap: 12px; }
  .app-icon { width: 48px; height: 48px; border-radius: 10px; }
  .app-title { font-size: 0.92rem; }
  .action-btn { padding: 9px 14px; font-size: 0.82rem; }
  .footer-logo { width: 26px; height: 26px; }
  .footer-brand { font-size: 0.75rem; }
  .footer-copy { font-size: 0.68rem; }
  
  .theme-toggle, .sidebar-toggle, .lang-wrapper {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    aspect-ratio: 1 / 1 !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .theme-toggle svg, .sidebar-toggle svg {
    width: 16px;
    height: 16px;
  }
  .lang-wrapper {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hero { height: auto; padding: 32px 0; }
  .hero-title { font-size: 1.05rem; }
  .hero-sub { font-size: 0.74rem; }
  .brand-name { font-size: 0.92rem; }
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.22s ease both;
}




.modal-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  animation: sheetFade 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

@media (min-width: 600px) {
  .modal-overlay {
    padding: 24px;
  }
  
  .modal-sheet {
    padding: 28px 24px 32px;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(61,142,248,0.4);
  background: rgba(61,142,248,0.12);
  color: var(--accent);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 10px rgba(61,142,248,0.2);
}

.modal-close:hover {
  background: rgba(61,142,248,0.25);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(61,142,248,0.45);
  transform: scale(1.1) rotate(90deg);
}

.modal-close:active {
  transform: scale(0.95) rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 40px;
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.modal-version {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  margin-top: 0;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-description {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes sheetFade {
  0%   { opacity: 0; transform: perspective(1000px) rotateY(-180deg) scale(0.9); }
  70%  { opacity: 1; transform: perspective(1000px) rotateY(6deg)    scale(1.01); }
  100% { opacity: 1; transform: perspective(1000px) rotateY(0deg)    scale(1); }
}

/* Clickable card cursor hint */
.app-card { cursor: pointer; }

/* ============================================================
   Language Switcher
   ============================================================ */
.lang-wrapper {
  position: relative;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  aspect-ratio: 1 / 1 !important;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

@media (max-width: 540px) {
  .lang-wrapper {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    font-size: 11px;
  }
}

@media (hover: hover) {
  .lang-wrapper:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: scale(1.08); /* changed to 1.08 to match theme-toggle exactly */
  }
}

.lang-wrapper:focus-within {
  border-color: var(--accent);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s cubic-bezier(0.3, 0.7, 0.2, 1);
  z-index: 100;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang-wrapper.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}

.lang-option:hover {
  background: rgba(61,142,248,0.08);
  color: var(--accent);
}

.lang-option.active {
  background: rgba(61,142,248,0.15);
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   RTL (Urdu) overrides
   ============================================================ */
[dir="rtl"] .lang-option { text-align: right; }
[dir="rtl"] .brand-text { text-align: right; }
[dir="rtl"] .about-text { text-align: right; }
[dir="rtl"] .about-full { white-space: pre-line; }
[dir="rtl"] .about-short { display: block; }
[dir="rtl"] .app-description { text-align: right; direction: rtl; }
[dir="rtl"] .card-meta { flex-direction: row-reverse; }
[dir="rtl"] .card-header { flex-direction: row; }
[dir="rtl"] .card-actions { direction: rtl; }
[dir="rtl"] .action-btn { flex-direction: row-reverse; }
[dir="rtl"] .modal-header { direction: rtl; }
[dir="rtl"] .modal-meta { flex-direction: row-reverse; }
[dir="rtl"] .modal-description { text-align: right; direction: rtl; }
[dir="rtl"] .modal-actions { direction: rtl; }
[dir="rtl"] .sidebar-label { text-align: right; }
[dir="rtl"] .nav-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .contact-item { flex-direction: row-reverse; }
[dir="rtl"] .stats-grid { direction: rtl; }
[dir="rtl"] .stat-box { direction: rtl; }
[dir="rtl"] .hero-title,
[dir="rtl"] .hero-sub { text-align: right; }
[dir="rtl"] .results-count { text-align: right; }
[dir="rtl"] .sidebar-search { direction: rtl; }
[dir="rtl"] .search-input { text-align: right; }
[dir="rtl"] .footer-inner { flex-direction: row-reverse; }
[dir="rtl"] .footer-text { text-align: right; }
[dir="rtl"] .apk-note { text-align: right; display: block; }

/* about-full text in all languages */
.about-full { white-space: pre-line; }

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .app-card,
  .action-btn,
  .filter-btn,
  .theme-toggle,
  body { transition: none; }

  .badge-C::before { animation: none; }

  @keyframes fadeIn { from { opacity: 1; transform: none; } }
}


/* --- Sidebar Search Results (Mobile Only) --- */
.sidebar-search-results {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .sidebar-search-results.active {
    display: flex;
  }
}

.sidebar-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg-2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-search-item:hover {
  background: var(--bg-card-hover);
}

.sidebar-search-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.sidebar-search-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-search-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-search-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sidebar-search-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}

/* Highlight animation for selected card */
@keyframes highlight-card {
  0% { box-shadow: 0 0 0 2px var(--accent), 0 0 20px var(--accent-glow); transform: scale(1.02); }
  100% { box-shadow: none; transform: scale(1); }
}

.app-card.highlighted {
  animation: highlight-card 1.5s ease-out;
}


/* ============================================================
   RASHID TOOLS PAGE  (rashid-tools.html / private-tools page)
   ============================================================ */

.tools-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ---- Hero / top section ---- */
.tools-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  width: 100%;
}

.tools-hero {
  text-align: center;
  margin-bottom: 40px;
}

.tools-hero .hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.tools-hero .hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ---- Search bar ---- */
.tools-search-wrapper {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.tools-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.tools-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tools-search-input::placeholder {
  color: var(--text-muted);
}

.tools-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ---- Grid ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* ---- Tool card ---- */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glow-blue);
}

/* ---- Icon wrapper ---- */
.tool-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
}

.tool-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.tool-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 14px;
  text-transform: uppercase;
}

/* ---- Tool title ---- */
.tool-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

/* ---- No results ---- */
.no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 32px 0;
}

/* ---- Back button ---- */
.back-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
  }

  .tool-icon-wrapper {
    width: 54px;
    height: 54px;
  }

  .tools-container {
    padding: 32px 16px 60px;
  }
}

/* Added for CSP compatibility */
.fallback-hidden { display: none !important; }




.type-badge { display: inline-flex; align-items: center; font-size: 0.65rem; font-weight: 700; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.8px; background: var(--bg-hover); color: var(--text-color); border: 1px solid var(--border-color); }

