:root {
  --bg: #0b0f19;
  --bg-elevated: rgba(17, 24, 39, 0.72);
  --bg-solid: #111827;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.45);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --accent: #8b5cf6;
  --accent-strong: #7c3aed;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --accent-soft: rgba(139, 92, 246, 0.14);
  --yt: #ef4444;
  --danger: #f43f5e;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.ltr-inline {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.muted {
  color: var(--text-muted);
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* Background Glow */
.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  background: var(--accent);
  top: -180px;
  right: -120px;
}

.bg-glow-2 {
  background: var(--emerald);
  bottom: -200px;
  left: -140px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--emerald));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.btn-admin-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #ddd6fe !important;
  font-size: 0.88rem !important;
}

.btn-admin-pill:hover {
  background: rgba(139, 92, 246, 0.28);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Glass Card & Buttons */
.glass-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.87rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.45);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.26);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text);
}

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

.btn-youtube {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.42);
  color: #fecaca;
}

.btn-youtube:hover {
  background: rgba(239, 68, 68, 0.28);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* Hero */
.hero {
  padding: 72px 0 42px;
}

.hero-inner {
  text-align: center;
  max-width: 860px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #6ee7b7;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.28;
  background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 75%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 1.12rem;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 38px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 680px;
  margin-inline: auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 46px 0;
}

.section-compact {
  padding-bottom: 64px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-head-wrap {
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-block;
  color: var(--emerald);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.section-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.loading-box {
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* Android Apps */
.apps-grid {
  display: grid;
  gap: 24px;
}

.app-card {
  padding: 26px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: center;
  transition: border-color 0.25s ease;
}

.app-card:hover {
  border-color: var(--border-hover);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.app-icon-fallback {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--emerald-soft));
  border: 1px solid var(--border);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.app-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.app-name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--emerald-soft);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  direction: ltr;
}

.app-tagline {
  margin: 2px 0 0;
  color: #c4b5fd;
  font-size: 0.94rem;
  font-weight: 600;
}

.app-desc {
  margin: 12px 0 16px;
  color: var(--text-muted);
}

.features-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.94rem;
  color: #e5e7eb;
}

.features-list li::before {
  content: "✓";
  color: var(--emerald);
  font-weight: 800;
  flex-shrink: 0;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.apk-meta {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Screenshots Gallery */
.app-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shot-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #080b12;
  cursor: pointer;
  padding: 0;
  aspect-ratio: 9 / 19;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.shot-thumb:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

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

.shot-zoom-hint {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 18px 6px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-size: 0.74rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shot-thumb:hover .shot-zoom-hint {
  opacity: 1;
}

/* Filter Bar & Tools Grid */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(139, 92, 246, 0.45);
  color: #fff;
}

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

.tool-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-emoji {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 1.35rem;
  flex-shrink: 0;
  overflow: hidden;
}

.tool-emoji-img {
  padding: 5px;
}

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

/* YouTube playlist chips */
.yt-playlist-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.yt-playlist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yt-vid-chip {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.yt-vid-chip.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

/* Atlas Page & Help Center */
.atlas-hero {
  padding: 48px 0 24px;
}

.atlas-hero-card {
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.atlas-hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.atlas-hero-content {
  flex: 1;
}

.atlas-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.atlas-title-wrap h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
}

.atlas-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

.help-search-wrap {
  min-width: min(340px, 100%);
}

.help-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
}

.help-sidebar {
  padding: 14px;
  display: grid;
  gap: 8px;
  position: sticky;
  top: 86px;
}

.help-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.help-nav-btn.active {
  background: var(--accent-soft);
  border-color: rgba(139, 92, 246, 0.45);
  color: #fff;
}

.help-content-area {
  display: grid;
  gap: 16px;
}

.help-article {
  padding: 26px;
}

.help-article-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.help-article-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-size: 1.45rem;
  flex-shrink: 0;
}

.help-article-head h3 {
  margin: 0 0 2px;
  font-size: 1.3rem;
}

.help-article-head p {
  margin: 0;
  font-size: 0.94rem;
}

.help-steps-list {
  margin: 0;
  padding-inline-start: 22px;
  display: grid;
  gap: 12px;
  color: #e5e7eb;
}

.help-steps-list li {
  line-height: 1.85;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 16px 20px;
}

.faq-q {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.04rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-q::after {
  content: "+";
  color: var(--emerald);
  font-size: 1.35rem;
  line-height: 1;
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Color Picker & Order Controls in Admin */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 52px;
  height: 42px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.85);
  cursor: pointer;
}

.admin-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.user-pill img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

@media (max-width: 920px) {
  .atlas-hero-card {
    flex-direction: column;
    text-align: center;
  }

  .atlas-showcase-grid,
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.tool-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  direction: ltr;
  text-align: right;
}

.tool-category {
  font-size: 0.8rem;
  color: #c4b5fd;
  font-weight: 600;
}

.tool-desc {
  margin: 10px 0 12px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: #d1d5db;
}

.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* YouTube Section */
.youtube-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 20px;
  align-items: stretch;
}

.youtube-player-wrap {
  overflow: hidden;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-aspect {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #060911;
}

.yt-aspect iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.16), transparent 55%),
              linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px dashed rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  gap: 12px;
}

.yt-play-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.55);
  color: #fecaca;
  font-size: 1.7rem;
  display: grid;
  place-items: center;
}

.youtube-info-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.yt-channel-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.yt-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
}

.yt-channel-badge h3 {
  margin: 0;
  font-size: 1.22rem;
}

.yt-bio {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.yt-actions {
  display: grid;
  gap: 10px;
}

/* About Banner */
.about-banner {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.about-banner h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.about-banner p {
  margin: 0;
  color: var(--text-muted);
  max-width: 680px;
}

.about-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: rgba(8, 11, 18, 0.6);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 13, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  text-align: center;
}

.lightbox-content img {
  max-height: 78vh;
  margin-inline: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lightbox-content p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox-close {
  top: 20px;
  left: 20px;
}

.lightbox-prev {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

/* Admin Panel Styles */
.admin-main {
  padding: 32px 0 72px;
}

.admin-header-card {
  padding: 22px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-header-card h1 {
  margin: 0 0 4px;
  font-size: 1.55rem;
}

.admin-header-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.admin-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-panel-card {
  padding: 24px;
  margin-bottom: 22px;
}

.admin-panel-card h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e5e7eb;
}

.form-field small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.85);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
}

.input-ltr {
  direction: ltr;
  text-align: left;
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.token-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.token-row .input {
  flex: 1;
  min-width: 240px;
}

.admin-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-item-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.section-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 120;
  padding: 12px 18px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid var(--emerald);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

/* Responsive */
@media (max-width: 920px) {
  .app-card {
    grid-template-columns: 1fr;
  }

  .youtube-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    inset-inline: 0;
    background: rgba(11, 15, 25, 0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 18px;
    gap: 14px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding-top: 46px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

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

  .app-gallery {
    gap: 8px;
  }
}

/* Announcement Bar & Preview Banner */
.announcement-bar {
  position: relative;
  z-index: 65;
  background: var(--announcement-bg, #7c3aed);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.92rem;
}

.announcement-bar[hidden] {
  display: none;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 36px;
  text-align: center;
}

.announcement-text {
  font-weight: 700;
}

.announcement-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.84rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease;
}

.announcement-link:hover {
  background: rgba(255, 255, 255, 0.3);
}

.announcement-close {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.preview-banner {
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
  padding: 8px 16px;
  text-align: center;
  font-size: 0.9rem;
}

/* Contact Card & Form */
.contact-card {
  padding: 26px 28px;
}

.contact-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.contact-fallback p {
  margin: 0;
  color: var(--text-muted);
  max-width: 620px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  display: none;
}

.contact-status.ok {
  display: block;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.contact-status.err {
  display: block;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
}

/* Ultimate Admin Command Center Extensions */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
}

.kpi-sub {
  font-size: 0.78rem;
  color: #6ee7b7;
}

.dashboard-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.55);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
}

.switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.status-badge.visible {
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.status-badge.hidden {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.hidden-item-card {
  opacity: 0.68;
  border-style: dashed;
}

.mini-announcement-preview {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seo-snippet-preview {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #0d1322;
  border: 1px solid var(--border);
}

.seo-snippet-url {
  font-size: 0.82rem;
  color: #9ca3af;
  direction: ltr;
  text-align: right;
}

.seo-snippet-title {
  margin: 4px 0;
  color: #93c5fd;
  font-size: 1.08rem;
  font-weight: 700;
}

.seo-snippet-desc {
  margin: 0;
  color: #d1d5db;
  font-size: 0.88rem;
}

.dropzone {
  border: 2px dashed rgba(139, 92, 246, 0.45);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: center;
  background: rgba(139, 92, 246, 0.06);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dropzone.dragover {
  background: rgba(139, 92, 246, 0.16);
  border-color: var(--emerald);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.media-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.media-name {
  font-size: 0.8rem;
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.upload-progress-wrap {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  transition: width 0.2s ease;
}

.commit-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.commit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.commit-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.commit-sha {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: #a7f3d0;
}

.info-guide-box {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-size: 0.86rem;
  color: #e5e7eb;
  margin-top: 8px;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(4, 7, 14, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.preview-modal.open {
  display: flex;
}

.preview-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: #111827;
  border: 1px solid var(--border);
}

.preview-frame-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #0b0f19;
  transition: width 0.25s ease;
}

.preview-frame.mobile {
  width: 390px;
  max-width: 100%;
}
