/* =========================================
   GLOBAL THEME — DARK BLUE VARIANT
   Layout supports:
   - index.php (home, cards)
   - tutorial.php (detail page)
   - admin area
========================================= */

:root {
  --primary: #2563eb;
  --primary-soft: rgba(37,99,235,0.12);
  --primary-strong: #1d4ed8;
  --accent: #0ea5e9;
  --bg: #020617;
  --bg-soft: #020817;
  --bg-elevated: rgba(15,23,42,0.9);
  --bg-card: rgba(15,23,42,0.98);
  --border-subtle: rgba(148,163,184,0.35);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --container-width: 1400px;
}

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

/* Sticky footer layout */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.35), transparent 60%),
    radial-gradient(circle at bottom right, rgba(14,165,233,0.35), transparent 55%),
    #020617;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  flex: 1;
}

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

/* Reusable container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================================
   HEADER / NAV
========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15,23,42,0.98);
  border-bottom: 1px solid rgba(148,163,184,0.3);
  backdrop-filter: blur(16px);
  color: #e5e7eb;
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

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

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: radial-gradient(circle at 10% 0, #38bdf8, #2563eb 55%, #020617 100%);
  color: #f9fafb;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37,99,235,0.7);
}

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

.logo-text strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.logo-text span {
  font-size: 12px;
  color: #cbd5f5;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a {
  font-size: 14px;
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.main-nav a:hover {
  border-color: rgba(148,163,184,0.5);
  color: #bfdbfe;
}

/* mobile menu button */
.mobile-menu-toggle {
  display: none;
  border: 1px solid #ffffff40;
  background: #020617cc;
  color: #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 20px;
  cursor: pointer;
}

/* =========================================
   HERO + PARTICLES
========================================= */

.hero {
  padding: 34px 0 18px;
}

.hero-gradient-shell {
  position: relative;
  border-radius: 28px;
  padding: 24px 22px 26px;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.4), transparent 60%),
    radial-gradient(circle at bottom right, rgba(14,165,233,0.5), transparent 60%),
    rgba(15,23,42,0.96);
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow:
    0 20px 60px rgba(15,23,42,0.95),
    0 0 0 1px rgba(15,23,42,0.7);
  overflow: hidden;
}

/* floating particle blobs */
.hero-gradient-shell::before,
.hero-gradient-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(56,189,248,0.5), transparent 65%);
  opacity: 0.45;
  filter: blur(1px);
  animation: floatParticle 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-gradient-shell::before {
  width: 160px;
  height: 160px;
  top: -40px;
  right: 6%;
}

.hero-gradient-shell::after {
  width: 120px;
  height: 120px;
  bottom: -30px;
  left: 3%;
  animation-delay: -4s;
}

@keyframes floatParticle {
  0% {
    transform: translate3d(0,0,0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(10px,-10px,0) scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: translate3d(-10px,8px,0) scale(0.95);
    opacity: 0.4;
  }
}

.home-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 2.2fr);
  gap: 24px;
  align-items: center;
}

.home-main-title h1 {
  margin: 0 0 6px;
  font-size: 38px;
  line-height: 1.1;
  background: linear-gradient(135deg,#38bdf8,#2563eb,#1d4ed8);
  -webkit-background-clip: text;
  color: transparent;
}

.home-main-title p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
}

.hero-badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.9);
  color: var(--muted);
}

.hero-right-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================
   SEARCH BAR
========================================= */

.search-bar {
  position: relative;
  display: flex;
  align-items: stretch;
  background: rgba(15,23,42,0.98);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow: 0 14px 32px rgba(15,23,42,0.9);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.1s ease;
}

.search-bar input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #e5e7eb;
  padding: 10px 16px;
  font-size: 14px;
}

.search-bar input::placeholder {
  color: rgba(148,163,184,0.9);
}

.search-bar button {
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  background: linear-gradient(135deg,#38bdf8,#2563eb);
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37,99,235,0.75);
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    filter 0.12s ease;
}

.search-bar button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 40px rgba(37,99,235,0.85);
}

.search-bar:focus-within {
  border-color: #38bdf8;
  box-shadow:
    0 18px 46px rgba(15,23,42,0.95),
    0 0 0 1px rgba(56,189,248,0.6);
  transform: translateY(-1px);
}

/* Live Search Suggestions */
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: rgba(15,23,42,0.98);
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow: 0 16px 40px rgba(15,23,42,0.95);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 0;
  display: none;
  z-index: 40;
}

.suggest-item {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: #e5e7eb;
}

.suggest-item:hover {
  background: rgba(37,99,235,0.25);
}

.suggest-title {
  font-size: 14px;
  font-weight: 500;
}

.suggest-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.suggest-empty {
  padding: 8px 14px;
  font-size: 13px;
  color: #9ca3af;
}

/* =========================================
   CATEGORY PILLS
========================================= */

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 130px;
  overflow-y: auto;
}

.category-pill {
  position: relative;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.96);
  font-size: 12px;
  color: #e5e7eb;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.16s ease;
}

.category-pill::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 0;
  height: 0;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(56,189,248,0.4), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.category-pill:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15,23,42,0.9);
}

.category-pill:hover::after {
  width: 220%;
  height: 220%;
  opacity: 1;
}

.category-pill.active {
  background: linear-gradient(135deg,#2563eb,#0ea5e9);
  border-color: transparent;
  color: #ffffff;
}

/* =========================================
   CONTENT GRID (HOME)
========================================= */

.content-layout {
  padding: 16px 0 42px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 18px;
  color: #e5e7eb;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

/* Card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15,23,42,1), rgba(15,23,42,0.96));
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 20px 55px rgba(15,23,42,0.95);
  min-height: 220px;
  transition:
    transform 0.14s ease-out,
    box-shadow 0.16s ease-out,
    border-color 0.14s ease-out,
    background 0.16s ease-out;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(56,189,248,0.7);
  background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(15,23,42,1));
  box-shadow:
    0 28px 80px rgba(15,23,42,1),
    0 0 0 1px rgba(37,99,235,0.55);
}

.card-image {
  position: relative;
  height: 150px;
  background: #020617;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-image-placeholder {
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#dbeafe,#bfdbfe);
    color:#2563eb;
    font-size:48px;
    font-weight:700;
}
.card-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to top,rgba(15,23,42,0.98),transparent);
}

.card-body {
  padding: 12px 16px 14px;
  color: #e5e7eb;
}

.card-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  margin-bottom: 3px;
}

.card-title {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.card-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.empty-state {
  margin-top: 20px;
  color: var(--muted);
}

/* pagination */
.pagination {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination a {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  font-size: 12px;
  background: rgba(15,23,42,0.96);
  color: #e5e7eb;
}

.pagination a:hover {
  border-color: #38bdf8;
}

.pagination .active {
  background: linear-gradient(135deg,#2563eb,#0ea5e9);
  border-color: transparent;
  color: #ffffff;
}

/* =========================================
   HOME CONTENT GRID (TUTORIALS + UPDATES)
========================================= */

.home-content-grid {
  display: grid;
  grid-template-columns:3fr 1fr;
  gap: 30px;
  align-items: flex-start;
}

/* Updates sidebar */
.home-sidebar-updates {
  align-self: flex-start;
  position: sticky;
  top: 120px;
  background: rgba(15,23,42,0.8);
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.3);
  height: fit-content;
  box-shadow: 0 14px 40px rgba(15,23,42,0.9);
}

.update-box {
  background: rgba(15,23,42,0.97);
  border-radius: 18px;
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: 0 18px 40px rgba(15,23,42,0.9);
}

.update-box h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #60a5fa;
}

.update-box p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #9ca3af;
}

.update-date {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

.youtube-box {
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15,23,42,0.9);
}

.youtube-box iframe {
  border-radius: 10px;
  margin-bottom: 10px;
}

/* =========================================
   NEWS SIDEBAR
========================================= */

.updates-box {
  background: #2a3243;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  width: 100%;
}

.updates-box h3 {
  font-size: 18px;
  margin-bottom: 14px;
  font-weight: 700;
  color: #fff;
}

.news-item {
  background: #1d2532;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-thumb {
  width: 100%;
  border-radius: 10px;
}

.news-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.no-news {
  color: #ccc;
  font-size: 14px;
}

/* =========================================
   FOOTER
========================================= */

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148,163,184,0.35);
  background: #020617;
  font-size: 12px;
  color: #9ca3af;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #e5e7eb;
}

/* =========================================
   TUTORIAL DETAIL PAGE
========================================= */

.article-page {
  padding: 40px 0 60px;
}

.breadcrumb {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  color: #cbd5fe;
}

.breadcrumb a:hover {
  color: #e5e7eb;
}

/* Two-column layout */
.tutorial-layout {
  display: grid;
  grid-template-columns: 75% 25%;
  gap: 40px;
  align-items: flex-start;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-top: 20px;
}

.tutorial-main {
  background: rgba(15,23,42,0.96);
  padding: 28px 32px;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  border: 1px solid rgba(148,163,184,0.25);
}

.tutorial-main h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg,#38bdf8,#2563eb);
  -webkit-background-clip: text;
  color: transparent;
}

.tutorial-title {
  font-size: 32px;
  margin-bottom: 10px;
  background: linear-gradient(135deg,#38bdf8,#2563eb);
  -webkit-background-clip: text;
  color: transparent;
}

.meta-info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 18px;
}

.meta-info-line span {
  color: #9ca3af;
}

.meta-info-line span + span::before {
  content: "·";
  margin: 0 6px 0 2px;
}

.tutorial-main-banner img {
  width: 100%;
  display: block;
  border-radius: 14px;
  margin-bottom: 22px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.9);
}

.tutorial-main-body {
  font-size: 16px;
  line-height: 1.8;
  color: #e5e7eb;
}

.tutorial-main-body p {
  margin-bottom: 14px;
}

.tutorial-main-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.tutorial-main-body code {
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  background: #020617;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(148,163,184,0.45);
}

.tutorial-main-body pre {
  overflow: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid rgba(148,163,184,0.45);
}

.tutorial-main-body ul,
.tutorial-main-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.tutorial-main-body li {
  padding: 4px 0;
}

.attachment-box {
  background: rgba(15,23,42,0.96);
  border-left: 4px solid #38bdf8;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 24px;
  font-size: 14px;
  color: #e5e7eb;
}

.nav-links {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: #bfdbfe;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Tutorial sidebar */
.tutorial-sidebar {
  align-self: flex-start;
  position: sticky;
  top: 110px;
  width: 100%;
}

.sidebar-heading {
  font-size: 18px;
  margin: 0 0 12px;
  color: #e5e7eb;
}

.sidebar-empty {
  font-size: 13px;
  color: #9ca3af;
}

/* Sidebar card wrapper */
.sidebar-card {
  width: 100%;
}

.sidebar-card .card {
  width: 100%;
}

/* Related cards */
.related-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.related-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(148,163,184,0.25);
  text-decoration: none;
  box-shadow: 0 12px 35px rgba(0,0,0,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15,23,42,1);
  border-color: #38bdf8;
}

.related-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #020617;
}

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

.related-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top,#38bdf8,#1f2937 60%);
}

.related-card-placeholder span {
  font-size: 34px;
  font-weight: 700;
  color: #e5e7eb;
}

.related-card-body {
  padding: 10px 12px 12px;
}

.related-card-body h4 {
  font-size: 14px;
  margin: 0;
  color: #e5e7eb;
}

/* =========================================
   THEME TOGGLE
========================================= */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  gap: 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: #38bdf8;
}

/* =========================================
   LIGHT THEME OVERRIDES
   (body.light or body.theme-light)
========================================= */

body.light,
body.theme-light {
  background: #f5f5f5;
  color: #111827;
}

body.light .site-header,
body.theme-light .site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  backdrop-filter: blur(16px);
}

body.light .logo-text strong,
body.theme-light .logo-text strong {
  color: #111827;
}

body.light .logo-text span,
body.theme-light .logo-text span {
  color: #6b7280;
}

body.light .main-nav a,
body.theme-light .main-nav a {
  color: #111827;
  border-color: transparent;
}

body.light .main-nav a:hover,
body.theme-light .main-nav a:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #111827;
}

body.light .hero-gradient-shell,
body.theme-light .hero-gradient-shell {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
}

body.light .search-bar,
body.theme-light .search-bar {
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 8px 20px rgba(15,23,42,0.04);
}

body.light .search-bar input[type="search"],
body.theme-light .search-bar input[type="search"] {
  color: #111827;
}

body.light .search-bar input::placeholder,
body.theme-light .search-bar input::placeholder {
  color: #9ca3af;
}

body.light .category-pill,
body.theme-light .category-pill {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #111827;
}

body.light .category-pill.active,
body.theme-light .category-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

body.light .card,
body.theme-light .card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15,23,42,0.04);
}

body.light .card-title,
body.theme-light .card-title,
body.light .section-title,
body.theme-light .section-title {
  color: #111827;
}

body.light .card-category,
body.theme-light .card-category {
  color: #2563eb;
}

body.light .card-meta,
body.theme-light .card-meta {
  color: #6b7280;
}

body.light .home-sidebar-updates,
body.theme-light .home-sidebar-updates {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 8px 22px rgba(15,23,42,0.04);
}

body.light .update-box,
body.theme-light .update-box {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 6px 18px rgba(15,23,42,0.03);
}

body.light .update-title,
body.theme-light .update-title {
  color: #111827;
}

body.light .update-text,
body.theme-light .update-text {
  color: #4b5563;
}

body.light .update-date,
body.theme-light .update-date {
  color: #9ca3af;
}

body.light .tutorial-main,
body.theme-light .tutorial-main {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(15,23,42,0.05);
}

body.light .tutorial-main-body,
body.theme-light .tutorial-main-body {
  color: #111827 !important;
}

body.light .tutorial-main-body p,
body.theme-light .tutorial-main-body p {
  color: #111827 !important;
}

body.light .breadcrumb,
body.theme-light .breadcrumb {
  color: #6b7280;
}

body.light .breadcrumb a,
body.theme-light .breadcrumb a {
  color: #2563eb;
}

body.light .tutorial-sidebar,
body.theme-light .tutorial-sidebar {
  background: transparent;
}

body.light .sidebar-heading,
body.theme-light .sidebar-heading {
  color: #111827;
}

body.light .related-card,
body.theme-light .related-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15,23,42,0.04);
}

body.light .related-card-body h4,
body.theme-light .related-card-body h4 {
  color: #111827 !important;
}

body.light .site-footer,
body.theme-light .site-footer {
  background: #f9fafb;
  border-top-color: #e5e7eb;
  color: #6b7280;
}

body.light .theme-toggle,
body.theme-light .theme-toggle {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}

body.light .share-btn,
body.theme-dark .share-btn {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #1e293b;
}

/* =========================================
   LOGIN PAGE
========================================= */

.admin-login-body {
  background: radial-gradient(circle at top,#1d4ed8,#020617 62%);
  color: #e5e7eb;
}

.login-panel {
  max-width: 420px;
  margin: 80px auto;
  padding: 28px 32px;
  background: #020617;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15,23,42,.9);
}

.login-panel h2 {
  text-align: center;
  margin: 0 0 18px;
  letter-spacing: 3px;
}

.login-panel input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
}

/* =========================================
   ADMIN PANEL - MODERN LIGHT THEME
========================================= */

.admin-topbar{
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;
    position:sticky;
    top:0;
    z-index:1000;
}

.admin-topbar-inner{
    max-width:100%;
    padding:14px 25px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.admin-topbar-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.admin-topbar-logo{
    width:42px;
    height:42px;
    border-radius:12px;
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:700;
    font-size:15px;
}

.admin-topbar-title{
    color:#111827;
}

.admin-topbar-title strong{
    display:block;
    font-size:16px;
}

.admin-topbar-title span{
    font-size:12px;
    color:#6b7280;
}

.admin-topbar-nav a{
    margin-left:18px;
    color:#374151;
    text-decoration:none;
    font-size:14px;
    font-weight:500;
}

.admin-topbar-nav a:hover{
    color:#2563eb;
}

.admin-topbar-nav .danger{
    color:#dc2626;
}

/* =========================================
   WRAPPER
========================================= */

.wrapper{
    display:flex;
    min-height:calc(100vh - 72px);
    background:#f8fafc;
}

/* =========================================
   SIDEBAR
========================================= */

.admin-sidebar{
    width:250px;
    background:#ffffff;
    border-right:1px solid #e5e7eb;
    padding:20px 15px;
}

.admin-sidebar-header{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:25px;
}

.admin-logo-badge{
    width:40px;
    height:40px;
    border-radius:12px;
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:700;
}

.admin-logo-title{
    font-size:15px;
    font-weight:700;
    color:#111827;
}

.admin-logo-sub{
    font-size:12px;
    color:#6b7280;
}

.admin-menu{
    list-style:none;
    margin:0;
    padding:0;
}

.admin-menu li{
    margin-bottom:6px;
}

.admin-menu a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 14px;
    border-radius:10px;
    color:#374151;
    text-decoration:none;
    transition:.2s;
}

.admin-menu a:hover,
.admin-menu li.active a{
    background:#eff6ff;
    color:#2563eb;
}

.admin-menu i{
    width:18px;
}

/* =========================================
   CONTENT
========================================= */

.admin-content{
    flex:1;
    padding:30px;
    background:#f8fafc;
    color:#111827;
}

.admin-content h1{
    font-size:34px;
    margin-bottom:6px;
    color:#111827;
}

.admin-content h2{
    color:#111827;
}

/* =========================================
   STATS
========================================= */

.stats-box,
.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin:25px 0;
}

.stats-card,
.stat-card{
    background:#ffffff;
    border-radius:16px;
    padding:25px;
    border:1px solid #e5e7eb;
    box-shadow:0 4px 20px rgba(0,0,0,.04);
}

.stats-title,
.stat-label{
    color:#6b7280;
    font-size:13px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.stats-number,
.stat-value{
    font-size:40px;
    font-weight:700;
    margin-top:10px;
    color:#111827;
}

/* =========================================
   TABLE
========================================= */

.table-card{
    background:#ffffff;
    border-radius:16px;
    padding:25px;
    border:1px solid #e5e7eb;
    box-shadow:0 4px 20px rgba(0,0,0,.04);
}

.admin-table{
    width:100%;
    border-collapse:collapse;
    background:#ffffff;
}

.admin-table th{
    background:#f8fafc;
    color:#374151;
    padding:14px;
    text-align:left;
    border-bottom:1px solid #e5e7eb;
}

.admin-table td{
    padding:14px;
    border-bottom:1px solid #f1f5f9;
    color:#111827;
}

.admin-table tr:hover{
    background:#f8fafc;
}

/* =========================================
   BUTTONS
========================================= */

.admin-primary-btn,
.admin-secondary-btn{
    display:inline-block;
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none;
    background:#2563eb;
    color:#fff;
    font-weight:600;
}

.admin-primary-btn:hover,
.admin-secondary-btn:hover{
    background:#1d4ed8;
}

.btn-sm{
    display:inline-block;
    padding:6px 12px;
    border-radius:8px;
    font-size:12px;
    text-decoration:none;
    color:#fff;
    margin-right:4px;
}

.edit-btn{
    background:#2563eb;
}

.delete-btn{
    background:#dc2626;
}

.preview-btn{
    background:#059669;
}

/* =========================================
   FORMS
========================================= */

.field{
    margin-bottom:16px;
}

.field label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
    color:#374151;
}

.field input,
.field select,
.field textarea{
    width:100%;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    background:#fff;
    color:#111827;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
    outline:none;
    border-color:#3b82f6;
}

/* =========================================
   ALERTS
========================================= */

.admin-alert{
    padding:12px;
    border-radius:10px;
    margin-bottom:15px;
}

.admin-alert-error{
    background:#fef2f2;
    color:#dc2626;
    border:1px solid #fecaca;
}

/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:991px){

    .admin-sidebar{
        width:220px;
    }

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

    .admin-content{
        padding:20px;
    }
}

@media(max-width:768px){

    .wrapper{
        flex-direction:column;
    }

    .admin-sidebar{
        width:100%;
        border-right:0;
        border-bottom:1px solid #e5e7eb;
    }

    .admin-topbar-inner{
        flex-direction:column;
        gap:10px;
    }
}
/* =========================================
   COMMENTS SECTION
========================================= */

.tutorial-comments {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
}

.comments-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.comment-form {
  max-width: 650px;
}

.comment-field {
  margin-bottom: 16px;
}

.comment-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.comment-field input,
.comment-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.comment-field input:focus,
.comment-field textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.comment-submit-btn {
  background: #2563eb;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.comment-submit-btn:hover {
  background: #1e40af;
}

.badge {
  background: #ef4444;
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  margin-left: 6px;
}

.comment-success {
  background: #0f172a;
  border-left: 4px solid #22c55e;
  color: #e5e7eb;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.yt-comment {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.yt-avatar {
  width: 36px;
  height: 36px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yt-body {
  flex: 1;
}

.yt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.yt-user { font-weight: 600; }

.yt-time {
  color: #9ca3af;
  font-size: 12px;
}

.yt-text {
  margin: 6px 0 8px;
  line-height: 1.5;
}

.yt-actions {
  display: flex;
  gap: 14px;
}

.yt-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
}

.yt-btn:hover {
  color: #2563eb;
}

.yt-replies-toggle {
  margin-top: 8px;
  font-size: 13px;
  color: #3b82f6;
  cursor: pointer;
}

.yt-admin-reply {
  background: rgba(37,99,235,.08);
  border-left: 3px solid #2563eb;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
}

.toggle-replies {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 0 8px;
}

.toggle-replies:hover {
  text-decoration: underline;
}

.reply-container {
  margin-left: 36px;
}

.yt-reply-box {
  margin-left: 52px;
  max-width: 520px;
}

.yt-input,
.yt-textarea {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

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

.yt-reply-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* =========================================
   SHARE BUTTONS
========================================= */

.share-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
}

.share-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  font-weight: 500;
}

.share-icon-btn svg {
  fill: #2563eb;
}

body.theme-dark .share-icon-btn {
  background: #0f172a;
  border-color: #1e293b;
  color: #e5e7eb;
}

body.theme-dark .share-icon-btn svg {
  fill: #60a5fa;
}

.tutorial-share {
  margin-top: 12px;
}

.tutorial-share-links a {
  margin-right: 10px;
  text-decoration: none;
  font-weight: 500;
  color: #2563eb;
}

.tutorial-share-icons {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.tutorial-share-icons a,
.tutorial-share-icons button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  font-size: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.tutorial-share-icons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

body.theme-dark .tutorial-share-icons a,
body.theme-dark .tutorial-share-icons button {
  background: #0f172a;
  border-color: #1e293b;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1024px) {
  .home-layout {
    display: block;
  }

  .hero-right-block {
    margin-top: 20px;
  }

  .cards-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .tutorial-layout {
    grid-template-columns: 100%;
  }

  .tutorial-sidebar {
    position: static;
    margin: 28px 0 0;
    max-width: none;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-filter {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .home-content-grid {
    display: block;
  }

  .home-sidebar-updates {
    position: static;
    margin-top: 24px;
    width: 100%;
  }

  .update-box {
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
  }

  .news-thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-image img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 10px 14px;
  }

  .header-right {
    gap: 10px;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #020617;
    padding: 10px 18px 12px;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: 0.25s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding-top: 22px;
  }

  .hero-gradient-shell {
    padding: 20px 18px 22px;
  }

  .home-layout {
    grid-template-columns: minmax(0,1fr);
  }

  .home-main-title h1 {
    font-size: 30px;
  }

  .tutorial-layout {
    grid-template-columns: 100%;
    gap: 26px;
  }
}

@media (max-width: 650px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .home-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
  }

  .hero-gradient-shell {
    width: 100%;
    max-width: 100%;
    transform: none;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
  }

  .hero-right-block {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
  }

  .search-bar {
    width: 100%;
  }

  .category-filter {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .content-layout {
    margin-top: 0;
    padding-top: 0;
  }

  .section-title {
    text-align: left;
    margin-left: 10px;
    margin-top: 10px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 20px 0;
  }

  .home-main-title h1 {
    font-size: 28px;
  }

  .search-bar input {
    font-size: 16px;
  }

  .category-pill {
    padding: 6px 10px;
    font-size: 13px;
  }

  .update-title {
    font-size: 16px;
    font-weight: 600;
  }

  .update-text {
    font-size: 14px;
  }

  .cards-grid {
    margin-top: 10px;
  }
}
/* ===================================
   MODERN HEADER
=================================== */

.site-header{
    position:sticky;
    top:0;
    z-index:999;
    backdrop-filter:blur(10px);
    background:rgba(255,255,255,.95);
    border-bottom:1px solid #e5e7eb;
}

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

.logo-badge{
    width:50px;
    height:50px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:20px;
    box-shadow:0 8px 20px rgba(37,99,235,.25);
}

.logo-text strong{
    font-size:22px;
    color:#111827;
    font-weight:800;
}

.logo-text span{
    color:#6b7280;
    font-size:13px;
}

.main-nav a{
    color:#374151;
    font-weight:600;
    transition:.3s;
}

.main-nav a:hover{
    color:#2563eb;
}

.theme-toggle{
    border-radius:50px;
    border:1px solid #d1d5db;
}

.mobile-menu-toggle{
    border-radius:10px;
}
/* ==========================================
   MODERN FOOTER
========================================== */

.site-footer{
    margin-top:40px;
    background:#0f172a;
    color:#cbd5e1;
}

.footer-container{
    max-width:1600px;
    margin:auto;
    padding:35px 30px 15px;
}

.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:50px;
}

.footer-col h4{
    color:#ffffff;
    margin-bottom:18px;
}

.footer-col ul{
    list-style:none;
    padding:0;
    margin:0;
}

.footer-col ul li{
    margin-bottom:10px;
}

.footer-col a{
    color:#cbd5e1;
    text-decoration:none;
}

.footer-col a:hover{
    color:#60a5fa;
}

.footer-logo{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:20px;
}

.footer-logo-icon{
    width:50px;
    height:50px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:20px;
}

.footer-logo h3{
    margin:0;
    color:#fff;
}

.footer-logo p{
    margin:0;
    color:#334155;
}

.footer-description{
    max-width:400px;
    line-height:1.8;
}

.footer-bottom{
    border-top:1px solid rgba(255,255,255,.08);
    margin-top:40px;
    padding-top:20px;
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
}

@media(max-width:992px){

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

}

@media(max-width:768px){

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

    .footer-bottom{
        flex-direction:column;
        text-align:center;
    }

}
.hero-banner{
    background:#fff;
    border-radius:20px;
    padding:40px;
    margin-bottom:40px;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
}

.tutorial-main{
    background:#fff;
    padding:40px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.06);
}

.tutorial-hero-image{
    margin:25px 0;
}

.tutorial-hero-image img{
    width:100%;
    border-radius:16px;
    display:block;
}

.tutorial-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    gap:40px;
}

.site-footer{
    margin-top:40px;
    background:#ffffff;
    border-top:1px solid #e5e7eb;
}

.footer-top-links{
    max-width:1400px;
    margin:0 auto;
    padding:18px 20px;
    text-align:center;
    border-bottom:1px solid #e5e7eb;
}

.footer-top-links a{
    color:#6b7280;
    text-decoration:none;
    font-size:13px;
    margin:0 12px;
    text-transform:uppercase;
}

.footer-main{
    max-width:1400px;
    margin:0 auto;
    padding:30px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.footer-logo{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:30px;
    font-weight:700;
    color:#111827;
}

.footer-social{
    display:flex;
    gap:20px;
}

.footer-social a{
    color:#374151;
    font-size:22px;
}

.footer-buttons{
    display:flex;
    gap:12px;
}

.store-btn{
    padding:10px 18px;
    background:#111827;
    color:#fff;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}

.footer-bottom{
    text-align:center;
    padding:15px;
    border-top:1px solid #e5e7eb;
    color:#6b7280;
    font-size:13px;
}

.login-logo-icon{
    width:80px;
    height:80px;
    border-radius:20px;
    font-size:30px;
    font-weight:700;
    background:linear-gradient(135deg,#2563eb,#3b82f6);
}

.page-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.page-header h1{
    margin:0;
    font-size:32px;
    font-weight:700;
}

.page-header p{
    color:#6b7280;
    margin-top:6px;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
    margin-bottom:35px;
}

.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    gap:20px;
}

.dashboard-header h1{
    margin:0;
    font-size:32px;
    font-weight:700;
    color:#111827;
}

.dashboard-header p{
    margin-top:6px;
    color:#6b7280;
}

.dashboard-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:30px;
}

.stat-card{
    background:#fff;
    border-radius:16px;
    padding:25px;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
    border:1px solid #e5e7eb;
}

.stat-label{
    color:#6b7280;
    font-size:13px;
    font-weight:600;
    letter-spacing:1px;
}

.stat-value{
    font-size:42px;
    font-weight:700;
    color:#111827;
    margin-top:10px;
}

.table-card{
    background:#fff;
    border-radius:16px;
    padding:25px;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
    border:1px solid #e5e7eb;
}

.table-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.table-top h2{
    margin:0;
}

.modern-table{
    width:100%;
    border-collapse:collapse;
}

.modern-table th{
    background:#f8fafc;
    padding:14px;
    text-align:left;
}

.modern-table td{
    padding:14px;
    border-top:1px solid #eef2f7;
}

.admin-primary-btn,
.admin-secondary-btn{
    display:inline-block;
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none;
    color:#fff;
    background:#2563eb;
}

@media(max-width:991px){
    .dashboard-stats{
        grid-template-columns:1fr;
    }

    .dashboard-header{
        flex-direction:column;
        align-items:flex-start;
    }
}

```css
/* Tutorial Sort Page */

#sort-list{
    margin-top:20px;
}

.sortable-item{
    display:flex;
    align-items:center;
    gap:15px;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:16px;
    margin-bottom:12px;
    cursor:move;
    transition:.2s;
}

.sortable-item:hover{
    border-color:#3b82f6;
    box-shadow:0 4px 12px rgba(59,130,246,.08);
}

.handle{
    font-size:24px;
    color:#6b7280;
    cursor:grab;
    user-select:none;
}

.sortable-content{
    flex:1;
}

.sortable-title{
    font-size:15px;
    font-weight:600;
    color:#111827;
}

.sortable-category{
    font-size:13px;
    color:#6b7280;
    margin-top:4px;
}

.sortable-placeholder{
    height:70px;
    border:2px dashed #60a5fa;
    border-radius:12px;
    margin-bottom:12px;
    background:#eff6ff;
}

.table-top span{
    color:#6b7280;
    font-size:14px;
}

.content-card{
background:#ffffff;
border:1px solid #e5e7eb;
border-radius:16px;
padding:25px;
box-shadow:0 2px 10px rgba(0,0,0,.04);
}

.help-text{
display:block;
margin-top:6px;
color:#64748b;
font-size:12px;
}

.form-actions{
display:flex;
gap:12px;
margin-top:25px;
}

.checkbox-field{
margin-top:15px;
}

.admin-btn-secondary{
display:inline-flex;
align-items:center;
justify-content:center;
padding:10px 18px;
border-radius:8px;
background:#f1f5f9;
border:1px solid #cbd5e1;
color:#0f172a;
text-decoration:none;
font-weight:600;
}

.admin-btn-secondary:hover

/* CKEditor */
.ck-editor__editable,
.ck-editor__editable_inline{
    min-height:500px !important;
}

.cke_contents{
    min-height:500px !important;
}

/* CKEditor */
.ck-editor__editable,
.ck-editor__editable_inline,
.ck-content{
    min-height: 400px !important;
}

.ck.ck-editor{
    width:100%;
}

.ck-content img{
    max-width:100%;
    height:auto;
}

.ck-editor__main{
    background:#fff;
}

.ck-editor__editable{
    padding:20px !important;
}

.btn-sm {
    display:inline-block;
    padding:6px 12px;
    border-radius:4px;
    text-decoration:none;
    font-size:13px;
    font-weight:500;
}

.edit-btn {
    background:#2563eb;
    color:#fff;
    margin-right:6px;
}

.delete-btn {
    background:#dc2626;
    color:#fff;
}

.yt-like {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 14px;
    border:none;
    border-radius:999px;
    background:#f3f4f6;
    color:#374151;
    cursor:pointer;
    transition:all .25s ease;
    font-size:14px;
    font-weight:600;
}

.yt-like:hover {
    background:#dbeafe;
    color:#2563eb;
    transform:translateY(-1px);
}

.yt-like.liked {
    background:#2563eb;
    color:#fff;
}

.yt-like span {
    font-weight:700;
}

/* -----------------------------
   HERO STATISTICS
------------------------------ */

.hero-badge{
    display:inline-block;
    background:#2563eb;
    color:#fff;
    padding:8px 16px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
    margin-bottom:15px;
}

.hero-stats{
    display:flex;
    gap:15px;
    margin-top:20px;
    flex-wrap:wrap;
}

.hero-stat-card{
    background:#fff;
    border-radius:14px;
    padding:14px 20px;
    min-width:120px;
    box-shadow:0 6px 16px rgba(0,0,0,.08);
}

.hero-stat-card strong{
    display:block;
    font-size:24px;
    color:#2563eb;
    font-weight:700;
}

.hero-stat-card span{
    color:#64748b;
    font-size:13px;
}

.latest-update-banner{
    margin-top:18px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
    padding:12px 16px;
    border-radius:10px;
    font-size:14px;
}

.resource-links{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:12px;
}

.resource-link{
    display:block;
    padding:10px 12px;
    border-radius:8px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    text-decoration:none;
    color:#1e293b;
    font-size:14px;
    transition:.2s;
}

.resource-link:hover{
    background:#eff6ff;
    border-color:#3b82f6;
    color:#2563eb;
}
/* -----------------------------
   latest
------------------------------ */

/* Grid container */
.home-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start; /* ? stops sidebar from stretching full height */
}

/* Sidebar */
.home-sidebar-updates {
    position: sticky;
    top: 24px;           /* sticks while scrolling */
    max-height: 90vh;    /* doesn't go taller than viewport */
    overflow-y: auto;    /* scroll inside sidebar if content is long */
}

.home-sidebar-updates {
    align-self: start;   /* belt-and-suspenders alongside align-items:start */
}

@media (max-width: 768px) {

    .home-sidebar-updates {
        display: none;
    }

    /* grid becomes single column — cards fill full width */
    .home-content-grid {
        display: block;
    }

    /* cards go 1 per row on mobile */
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

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