/* ============================================================
   DESIGN SCHOOL — STYLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Google+Sans+Display:wght@400;500;600;700&family=DM+Mono:wght@400;500;600&display=swap');

/* ── DARK ── */
:root {
  --accent: #FF6F2C;
  --accent-hover: #e85e1e;
  --bg: #0f0f0f;
  --bg-2: #1a1a1a;
  --bg-3: #242424;
  --bg-4: #303030;
  --border: #2a2a2a;
  --text: #f1f1f1;
  --text-2: #999999;
  --text-3: #777777;
  --banner-bg: linear-gradient(160deg, #1c0e06 0%, #2a1308 55%, #0f0f0f 100%);
  --banner-glow: rgba(255, 111, 44, 0.13);
  --accent-tint: rgba(255, 111, 44, 0.08);
  --font: 'Google Sans', sans-serif;
  --font-display: 'Google Sans Display', 'Google Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --nav-h: 58px;
  --page-w: 960px;
  /* single shared max-width for all sections */
  --read-w: 680px;
  /* article body text width */
  --radius: 22px;
  /* more rounded */
  --radius-sm: 14px;
  --transition: 0.16s ease;
}

/* ── LIGHT ── */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --bg-3: #f2f2f2;
    --bg-4: #e6e6e6;
    --border: #e8e8e8;
    --text: #111111;
    --text-2: #717171;
    --text-3: #aaaaaa;
    --accent-tint: rgba(255, 111, 44, 0.05);
    --banner-bg: linear-gradient(160deg, #fff4ef 0%, #ffe6d8 55%, #fafafa 100%);
    --banner-glow: rgba(255, 111, 44, 0.07);
  }
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

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

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

button {
  cursor: pointer;
  font-family: var(--font);
}

ul,
ol {
  list-style: none;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 99px;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent);
}

.nav-logo-text {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

@media (hover: hover) {
  .nav-link:hover {
    color: var(--text);
    background: var(--bg-3);
  }
}

.nav-link.active {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 821px) {
  .nav-links {
    overflow: visible;
  }
}

/* ── NAV DROPDOWNS ─────────────────────────────────────────── */

.nav-item-wrapper {
  position: relative;
  display: inline-block;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-chevron {
  width: 12px;
  height: 12px;
  stroke-width: 3.5;
  transition: transform var(--transition);
  opacity: 0.6;
}

.nav-item-wrapper:hover .nav-chevron,
.nav-item-wrapper.dropdown-active .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-item-wrapper.dropdown-active .nav-link {
  color: var(--text);
  background: var(--bg-3);
}

/* Dropdown Menu Container */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  padding-top: 12px; /* Invisible hover bridge */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
  
  /* Default positioning: Centered */
  left: 50%;
  transform: translateX(-50%);
}

/* Position adjustments for layout stability and edge safety */
/* First item (UI Design) - align left */
.nav-item-wrapper[data-cat-id="ui-design"] .nav-dropdown-menu {
  left: 0;
  transform: none;
}

/* Last item (Tools & Resources) - align right */
.nav-item-wrapper[data-cat-id="tools"] .nav-dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
}

/* Dropdown Inner Content Box */
.nav-dropdown-inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  border-radius: 18px;
  padding: 22px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(8px);
}

.nav-item-wrapper.dropdown-active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-item-wrapper.dropdown-active .nav-dropdown-inner {
  transform: translateY(0);
}

/* Dropdown widths based on column layout */
.nav-dropdown-menu.cols-1 {
  width: 280px;
}

.nav-dropdown-menu.cols-2 {
  width: 480px;
}

.nav-dropdown-menu.cols-3 {
  width: 660px;
}

.nav-dropdown-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.nav-dropdown-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-dropdown-header-count {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-dropdown-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.4;
}

.nav-dropdown-grid {
  display: grid;
  gap: 6px;
}

.nav-dropdown-menu.cols-2 .nav-dropdown-grid {
  grid-template-columns: repeat(2, 1fr);
}

.nav-dropdown-menu.cols-3 .nav-dropdown-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive Column Layout on Medium Viewports */
@media (max-width: 1000px) {
  .nav-dropdown-menu.cols-3 {
    width: 460px;
  }
  .nav-dropdown-menu.cols-3 .nav-dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Individual Dropdown Item Card */
.nav-dropdown-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  text-align: left;
}

@media (hover: hover) {
  .nav-dropdown-item:hover {
    background: var(--accent);
    transform: translateY(-1px);
  }
}

.nav-dropdown-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2.5px;
  transition: color var(--transition);
}

.nav-dropdown-item:hover .nav-dropdown-item-title {
  color: #ffffff;
}

.nav-dropdown-item-desc {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.nav-dropdown-item:hover .nav-dropdown-item-desc {
  color: rgba(255, 255, 255, 0.85);
}

.nav-dropdown-item-count {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
  transition: color var(--transition);
}

.nav-dropdown-item:hover .nav-dropdown-item-count {
  color: rgba(255, 255, 255, 0.9);
}

.btn-dashboard-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 38px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (hover: hover) {
  .btn-dashboard-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }
}

.btn-dashboard-nav svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* single centered column used everywhere */
.page-wide {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 18px 64px;
}

/* ============================================================
   CHANNEL BANNER
   ============================================================ */

.channel-banner {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 52px 24px 44px;
  position: relative;
  overflow: hidden;
}

.channel-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  /* background: radial-gradient(ellipse at 15% 60%, var(--banner-glow) 0%, transparent 60%); */
  pointer-events: none;
}

.channel-inner {
  max-width: var(--page-w);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  padding: 0 18px;
}

.channel-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  flex-shrink: 0;
  background: var(--accent);
}

.channel-info {
  flex: 1;
}

.channel-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.channel-sub {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.55;
}

.channel-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.channel-stat {
  font-size: 13px;
  color: var(--text-3);
}

.channel-stat strong {
  color: var(--text);
}

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

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: #FF0000;
  color: #fff;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.18s, transform 0.18s;
}

@media (hover: hover) {
  .btn-subscribe:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }
}

.btn-visit-channel {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s, border-color 0.18s;
}

@media (hover: hover) {
  .btn-visit-channel:hover {
    background: var(--bg-3);
    border-color: var(--text-3);
  }
}

/* ============================================================
   SECTION LABELS
   ============================================================ */

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  padding-top: 44px;
  padding-bottom: 14px;
}

.section-title-article {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding-top: 44px;
  padding-bottom: 14px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 4px;
}

/* ── SUBCATEGORY BANNER ── */
.subcategory-banner {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #ffffff;
  padding: 32px 36px;
  border-radius: var(--radius);
  margin-top: 18px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(255, 111, 44, 0.14);
}

.subcategory-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.subcategory-banner::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 120px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.sub-banner-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.sub-banner-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.sub-banner-desc {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  max-width: 580px;
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

@media (hover: hover) {
  .category-card:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    transform: translateY(-2px);
  }
}

.category-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.category-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.5;
}

.category-count {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
}

/* ============================================================
   SUBCATEGORY GRID
   ============================================================ */

.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding-bottom: 8px;
}

.sub-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

@media (hover: hover) {
  .sub-card:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
  }
}

.sub-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.sub-card-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============================================================
   BREADCRUMB & BACK NAVIGATION ROW
   ============================================================ */
.header-navigation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin-top: 28px;
  margin-bottom: 8px;
  min-width: 0;
}

.header-navigation-row .section-title {
  padding-top: 0;
  padding-bottom: 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  margin-top: 0;
  margin-bottom: 0;
  text-decoration: none;
}

.btn-back:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--text-3);
}

.btn-back svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  transition: transform var(--transition);
}

.btn-back:hover svg {
  transform: translateX(-3px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  flex: 1;
  min-width: 0;
}

.breadcrumb>span {
  color: var(--text-3);
  flex-shrink: 0;
}

.breadcrumb a {
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition);
}

@media (hover: hover) {
  .breadcrumb a:hover {
    color: var(--accent);
  }
}

.breadcrumb-current {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ============================================================
   ARTICLE LIST — Medium style
   ============================================================ */

.article-list {
  display: flex;
  flex-direction: column;
}

.article-item {
  display: flex;
  gap: 24px;
  padding: 26px 16px;
  margin: 0 -16px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: flex-start;
  transition: background var(--transition);
}

@media (hover: hover) {
  .article-item:hover {
    background: var(--bg-3);
  }
}

.article-item:last-child {
  border-bottom: none;
}

.article-info {
  flex: 1;
  min-width: 0;
}

.article-tag-sm {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 8px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.1px;
  margin-bottom: 6px;
}

.article-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
}

.article-thumb {
  width: 180px;
  height: 101px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-3);
}

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

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  color: var(--text-3);
  font-size: 20px;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-shell {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-reading {
  max-width: var(--page-w);
}

/* Related Articles Widget */
.related-articles-section {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}

.related-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  margin-top: 0;
}

.related-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-card,
.best-read-card {
  display: flex;
  gap: 12px;
  cursor: pointer;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.related-card:hover,
.best-read-card:hover {
  background: var(--bg-3);
}

.related-card-thumb,
.best-read-thumb {
  width: 70px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.related-card-content,
.best-read-content {
  flex: 1;
  min-width: 0;
}

.related-card-title,
.best-read-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
}

.related-card-date,
.best-read-date {
  font-size: 10px;
  color: var(--text-3);
}

.article-header {
  margin-bottom: 28px;
  margin-top: 8px;
}

.article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.article-date-meta {
  font-size: 13px;
  color: var(--text-3);
}

/* Reading body */
.article-body {
  padding-top: 28px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
  letter-spacing: -0.2px;
  line-height: 1.28;
}

.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 10px;
}

.article-body p {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 20px;
  font-weight: 400;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 20px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 6px;
  font-weight: 400;
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body code {
  font-family: var(--font-mono);
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--accent);
}

.article-body a[style*="background-color"] {
  border-radius: 99px !important;
  transition: background var(--transition), transform var(--transition) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (hover: hover) {
  .article-body a[style*="background-color"]:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-2px) !important;
  }
}

/* YouTube embed */
.yt-embed-section {
  margin-top: 22px;
}

.yt-embed-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}


.yt-embed-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.yt-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   TRAINING CARD
   ============================================================ */

.training-inline {
  margin-top: 48px;
}

.training-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 28px;
}

.training-card-badge {
  display: inline-block;
  background: rgba(255, 111, 44, 0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.training-card-inner {
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

.training-card-text {
  flex: 1;
}

.training-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.training-card p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}

.training-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.training-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.training-card-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
}

.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
  width: 100%;
}

@media (hover: hover) {
  .btn-wa:hover {
    opacity: 0.88;
  }
}

.training-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.training-form input,
.training-form textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
  resize: none;
}

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

.training-form input::placeholder,
.training-form textarea::placeholder {
  color: var(--text-3);
}

.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

@media (hover: hover) {
  .btn-submit:hover {
    background: var(--accent-hover);
  }
}

/* ============================================================
   EMPTY
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
  animation: emptyFadeIn 0.4s ease;
}

.empty-state-lottie {
  width: 240px;
  height: 240px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
}

@keyframes emptyFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   ARTICLE MEDIA & INLINE IMAGES
   ============================================================ */

.article-hero-image {
  margin: 16px 0 32px 0;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 32px auto;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.article-image-figure {
  margin: 36px 0;
  text-align: center;
}

.article-image-figure img {
  margin: 0 auto 12px;
}

.article-image-figure figcaption {
  font-size: 14px;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.5;
}

.thumb-placeholder svg {
  stroke: var(--text-3);
  opacity: 0.6;
}

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

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .channel-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .channel-meta {
    justify-content: center;
  }

  .channel-actions {
    justify-content: center;
  }

  .channel-name {
    font-size: 21px;
  }

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

  .article-reading {
    max-width: 100%;
  }

  .training-card-inner {
    flex-direction: column;
  }

  .training-card-action {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 560px) {

  .page-wide,
  .article-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .channel-banner {
    padding: 36px 16px 30px;
  }

  /* Category Grid Cards Optimization */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-card {
    padding: 14px 16px;
  }

  .category-title {
    font-size: 14.5px;
  }

  .category-desc {
    font-size: 12.5px;
  }

  /* Subcategory Grid Cards Optimization */
  .sub-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sub-card {
    padding: 12px 14px;
  }

  .sub-card-title {
    font-size: 14px;
  }

  .sub-card-desc {
    font-size: 12px;
  }

  /* Heading/Banner Cards Optimization */
  .subcategory-banner {
    padding: 18px 20px;
    margin-top: 12px;
    margin-bottom: 20px;
  }

  .sub-banner-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .sub-banner-desc {
    font-size: 13px;
    margin-bottom: 8px;
  }

  /* Breadcrumb & Navigation Row Optimization */
  .header-navigation-row {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }

  .breadcrumb {
    white-space: normal;
    flex-wrap: wrap;
    line-height: 1.4;
    font-size: 12.5px;
  }

  /* Quiz Card Mobile Optimization */
  .quiz-card {
    margin-top: 24px;
    margin-bottom: 24px;
  }

  .quiz-question {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .quiz-option {
    padding: 10px 14px;
    gap: 10px;
    font-size: 13.5px;
  }

  /* Mark as Completed Card Mobile Optimization */
  .completion-card {
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
  }

  .completion-title {
    font-size: 15px;
  }

  .completion-desc {
    display: none; /* Hide redundant description on mobile to save vertical space */
  }

  .btn-completion-toggle {
    padding: 10px 20px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }

  .article-item {
    padding: 16px 0;
    margin: 0;
    border-radius: 0;
    gap: 16px;
  }

  .article-thumb {
    width: 160px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
  }

  .article-title {
    font-size: 16px;
  }

  .article-desc {
    display: none;
  }

  .article-header h1 {
    font-size: 26px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .sub-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   STAGGERED APPEARING ANIMATION
   ============================================================ */

.stagger-item {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInstagger 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--stagger, 0) * 0.1s);
}

@keyframes fadeInstagger {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   SKELETON LOADERS & SHIMMER EFFECT
   ============================================================ */

.shimmer {
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.08) 20%,
      rgba(255, 255, 255, 0.16) 60%,
      transparent);
  animation: shimmer-animation 1.6s infinite;
}

@media (prefers-color-scheme: light) {
  .shimmer::after {
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.5) 20%,
        rgba(255, 255, 255, 0.7) 60%,
        transparent);
  }
}

@keyframes shimmer-animation {
  100% {
    transform: translateX(100%);
  }
}

/* Shimmer layouts */
.shimmer-article-item {
  display: flex;
  gap: 24px;
  padding: 26px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.shimmer-article-info {
  flex: 1;
  min-width: 0;
}

.shimmer-thumb {
  width: 180px;
  height: 101px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.shimmer-category-card {
  height: 140px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.shimmer-sub-card {
  height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.shimmer-breadcrumb {
  height: 20px;
  width: 150px;
  margin: 28px 0 4px;
  border-radius: 4px;
}

/* Make shimmer layout responsive */
@media (max-width: 560px) {
  .shimmer-article-item {
    padding: 16px 0;
    margin: 0;
    border-radius: 0;
    gap: 16px;
  }

  .shimmer-thumb {
    width: 160px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
  }
}

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

.footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: auto;
  background: var(--bg);
}

.footer-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-2);
  font-weight: 500;
  transition: color var(--transition);
}

@media (hover: hover) {
  .footer-links a:hover {
    color: var(--accent);
  }
}

.footer-copy {
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-copy a {
  color: var(--text-2);
  font-weight: 600;
  transition: color var(--transition);
}

@media (hover: hover) {
  .footer-copy a:hover {
    color: var(--accent);
  }
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* Footer Visitor Counter */
.footer-visitors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-3);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 600;
  vertical-align: middle;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #25d366;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot::after {
  content: '';
  width: 100%;
  height: 100%;
  background-color: #25d366;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: pulse 2s infinite;
  opacity: 0.8;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ============================================================
   SEARCH BAR & LIVE SUGGESTIONS
   ============================================================ */

.nav-search-wrapper {
  position: relative;
  width: 240px;
  transition: width var(--transition);
}

.nav-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 14px;
  height: 38px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.nav-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  background: var(--bg-2);
}

.nav-search-box .search-icon {
  width: 14px;
  height: 14px;
  stroke: var(--text-3);
  margin-right: 8px;
  flex-shrink: 0;
  transition: stroke var(--transition);
}

.nav-search-box:focus-within .search-icon {
  stroke: var(--accent);
}

.nav-search-box input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  padding: 0;
  font-family: var(--font);
}

.nav-search-box input::placeholder {
  color: var(--text-3);
  font-weight: 600;
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-4);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  pointer-events: none;
  user-select: none;
  font-weight: 500;
}

.nav-search-box:focus-within .search-shortcut {
  opacity: 0;
  pointer-events: none;
}

/* Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 110;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item.highlighted {
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.suggestion-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 4px;
}

.suggestion-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-desc {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-special {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  background: var(--bg-3);
  transition: color var(--transition), background var(--transition);
  border-top: 1px solid var(--border);
  text-align: left;
}

.suggestion-special svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-3);
  fill: none;
}

.suggestion-special.highlighted,
.suggestion-special:hover {
  background: var(--accent-tint);
  color: var(--accent);
}

.suggestion-special.highlighted svg {
  stroke: var(--accent);
}

.suggestion-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

.search-highlight {
  color: var(--accent);
  font-weight: 700;
}

/* Responsive Overrides */
@media (max-width: 820px) {
  .nav-search-wrapper {
    width: 190px;
  }

  .search-suggestions {
    width: 290px;
  }
}

@media (max-width: 560px) {
  .nav-logo-text {
    display: none;
  }

  .btn-dashboard-nav span {
    display: none;
  }

  .btn-dashboard-nav {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .btn-tools-nav span {
    display: none;
  }

  .btn-tools-nav {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  /* Override circular layout for the Sign In state on mobile to show text only */
  .btn-dashboard-nav.auth-signed-out span {
    display: inline !important;
  }

  .btn-dashboard-nav.auth-signed-out {
    padding: 0 16px !important;
    border-radius: 20px !important;
    width: auto !important;
    height: 38px !important;
  }

  .nav-search-wrapper {
    flex: 1;
    max-width: 220px;
  }

  .search-shortcut {
    display: none;
  }

  .search-suggestions {
    width: 290px;
  }
}

/* ============================================================
   3-COLUMN LAYOUT SYSTEM (DESKTOP ONLY)
   ============================================================ */

.layout-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 18px 64px;
}

.layout-left,
.layout-right {
  display: none;
}

.layout-center {
  width: 100%;
}

/* Desktop 3-Column Layout */
@media (min-width: 1024px) {
  .layout-container {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 40px;
    max-width: 1280px;
    padding: 32px 24px 80px;
    align-items: flex-start;
  }

  .layout-container.two-column {
    grid-template-columns: 240px 1fr;
  }

  .layout-left {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 32px);
    max-height: calc(100vh - var(--nav-h) - 64px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .layout-left::-webkit-scrollbar {
    display: none;
  }

  .layout-right {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 32px);
    max-height: calc(100vh - var(--nav-h) - 64px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .layout-right::-webkit-scrollbar {
    display: none;
  }

  .layout-center {
    min-width: 0;
  }

  /* Desktop layout hide/show overrides */
  .home-categories-mobile-only,
  .category-subgrid-mobile-only {
    display: none;
  }
}

/* Widgets Styling */
.sidebar-widget {
  margin-bottom: 36px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 16px;
}

/* Sidebar Menu & Table of Contents */
.sidebar-menu,
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 0;
}

.toc-item {
  list-style: none;
}

.sidebar-menu-item,
.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-menu-item:hover,
.toc-link:hover {
  background: var(--bg-3);
  color: var(--text);
}

.sidebar-menu-item.active,
.toc-link.active {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}

.toc-level-2 {
  padding-left: 0;
}

.toc-level-3 {
  padding-left: 12px;
}

/* Trending List (Medium style) */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trending-item {
  display: flex;
  gap: 16px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.trending-item:hover {
  opacity: 0.85;
}

.trending-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.8;
  line-height: 1;
  min-width: 32px;
}

.trending-content {
  flex: 1;
  min-width: 0;
}

.trending-category {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 4px;
}

.trending-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-date {
  font-size: 11px;
  color: var(--text-3);
}

/* Best Reads List */
.best-reads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Table of Contents (TOC) Widget consolidated under Sidebar Menu section */

/* Related articles on desktop right sidebar override */
@media (min-width: 1024px) {
  .layout-right .related-articles-section {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
  }
}

/* ============================================================
   QUIZ CARD STYLING & ANIMATIONS
   ============================================================ */

.quiz-card {
  margin-top: 40px;
  margin-bottom: 40px;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.quiz-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
  box-shadow: 0 0 6px #ffffff;
}

.quiz-question {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover:not(:disabled) {
  background: var(--bg-4);
  border-color: var(--text-3);
  transform: translateX(4px);
}

.quiz-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-4);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.quiz-option:hover:not(:disabled) .quiz-option-letter {
  background: var(--text-2);
  color: var(--bg);
}

/* Correct/Incorrect Option States */

.quiz-option.correct {
  background: rgba(46, 125, 50, 0.15) !important;
  border-color: #2e7d32 !important;
  color: #81c784 !important;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-option.correct .quiz-option-letter {
  background: #2e7d32 !important;
  color: #ffffff !important;
}

.quiz-option.incorrect {
  background: rgba(198, 40, 40, 0.15) !important;
  border-color: #c62828 !important;
  color: #e57373 !important;
  animation: shake 0.4s ease-in-out;
}

.quiz-option.incorrect .quiz-option-letter {
  background: #c62828 !important;
  color: #ffffff !important;
}

.quiz-option:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

/* Feedback Section */

.quiz-feedback {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-feedback-status {
  font-size: 16px;
  margin-bottom: 8px;
}

.correct-text {
  color: #81c784;
}

.incorrect-text {
  color: #e57373;
}

.quiz-explanation {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Animations */

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   SEARCH TERM BODY HIGHLIGHTS
   ============================================================ */

mark.body-highlight {
  background: rgba(255, 111, 44, 0.24);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 700;
  text-shadow: 0 0 1px rgba(255, 111, 44, 0.2);
}

@media (prefers-color-scheme: light) {
  mark.body-highlight {
    background: rgba(255, 111, 44, 0.14);
    color: #cc4f14;
    border-bottom-color: #cc4f14;
  }
}

/* Floating Clear Highlights Banner */
.highlight-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.25);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(255, 111, 44, 0.05);
}

.btn-clear-highlights {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: background var(--transition);
  cursor: pointer;
}

.btn-clear-highlights:hover {
  background: var(--accent-hover);
}

/* ============================================================
   PHASE 1: LEARNING PATH & PROGRESS TRACKING STYLES
   ============================================================ */

/* 1. Learning Dashboard Home Widget */
.learning-dashboard {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all var(--transition);
}

.learning-dashboard.empty {
  padding: 20px 24px;
  border: 1px solid var(--border);
  background-color: var(--bg-1);
  box-shadow: none;
}

.dashboard-header-simple h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.dashboard-header-simple p {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}

.dashboard-inner-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.dashboard-title-row h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.dashboard-overall-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 4px 12px;
  border-radius: 99px;
}

.dashboard-content-layout {
  display: flex;
  gap: 32px;
}

.dashboard-tracks {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-cat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-cat-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-cat-title {
  color: var(--text);
}

.dashboard-cat-meta {
  color: var(--text-2);
  font-size: 12.5px;
}

.dashboard-progress-bar-container {
  height: 8px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.dashboard-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-vertical-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

.dashboard-badges-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-badges-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Badge Showcase Styling */
.badge-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: help;
}

.badge-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: var(--bg-3);
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.badge-icon {
  font-size: 24px;
  transition: transform var(--transition);
}

/* Locked badge state */
.badge-item.locked .badge-icon-wrapper {
  filter: grayscale(1) opacity(0.35);
  background: var(--bg-2);
  border-style: dashed;
}

/* Unlocked badge gradients and glows */
.badge-item.unlocked:hover .badge-icon-wrapper {
  transform: translateY(-3px) scale(1.05);
}

.badge-item.unlocked:hover .badge-icon {
  transform: rotate(6deg) scale(1.1);
}

.badge-icon-wrapper.gradient-orange,
.badge-icon-wrapper.gradient-green,
.badge-icon-wrapper.gradient-blue,
.badge-icon-wrapper.gradient-purple {
  background: var(--bg-3);
}

.badge-item.unlocked .gradient-orange {
  border: 2px solid #FF6F2C !important;
  background: transparent !important;
  color: #FF6F2C !important;
  box-shadow: 0 8px 24px rgba(255, 111, 44, 0.15) !important;
}

.badge-item.unlocked .gradient-green {
  border: 2px solid #10B981 !important;
  background: transparent !important;
  color: #10B981 !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15) !important;
}

.badge-item.unlocked .gradient-blue {
  border: 2px solid #3B82F6 !important;
  background: transparent !important;
  color: #3B82F6 !important;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15) !important;
}

.badge-item.unlocked .gradient-purple {
  border: 2px solid #8B5CF6 !important;
  background: transparent !important;
  color: #8B5CF6 !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15) !important;
}

/* Tooltip on Hover */
.badge-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 180px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  text-align: center;
}

.badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-2);
}

.badge-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--border);
  z-index: -1;
}

.badge-item:hover .badge-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.badge-tooltip-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.badge-tooltip-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 6px;
}

.badge-tooltip-status {
  font-size: 10.5px;
  font-weight: 600;
}

/* 2. Banner Progress inside Hero Banners */
.banner-progress-container {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  max-width: 580px;
}

.banner-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}

.banner-progress-info strong {
  color: #ffffff;
}

.banner-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  overflow: hidden;
}

.banner-progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* 3. Article Completion Toggle Card styling */
.completion-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 36px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.completion-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.completion-info {
  flex: 1;
  min-width: 260px;
}

.completion-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.completion-desc {
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 500;
  line-height: 1.4;
}

.btn-completion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  outline: none;
}

.btn-completion-toggle:hover:not(.completed) {
  color: var(--text);
  border-color: var(--text-3);
  background: var(--bg-3);
  transform: translateY(-1px);
}

/* Completed Active State */
.btn-completion-toggle.completed {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 111, 44, 0.25);
}

.btn-completion-toggle.completed:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(255, 111, 44, 0.35);
  transform: translateY(-1px);
}

.completion-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5px;
  transition: stroke var(--transition);
}

.circle-check {
  fill: none;
  stroke: transparent;
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition);
}

/* Completed check animations */
.btn-completion-toggle.completed .circle-bg {
  stroke: rgba(255, 255, 255, 0.3);
}

.btn-completion-toggle.completed .circle-check {
  stroke: #ffffff;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: drawCheck 0.35s ease forwards 0.15s;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Responsive Dashboard & Completion Card Adjustments */
@media (max-width: 820px) {
  .dashboard-content-layout {
    flex-direction: column;
    gap: 24px;
  }
  .dashboard-vertical-divider {
    display: none;
  }
  .dashboard-badges-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .dashboard-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .completion-card-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-completion-toggle {
    justify-content: center;
  }
}

/* ============================================================
   REFACTOR: COMPACT DASHBOARD & DEDICATED DASHBOARD PAGE
   ============================================================ */

/* Compact Dashboard Row on Homepage */
.learning-dashboard.compact {
  cursor: pointer;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.learning-dashboard.compact:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: translateY(-1px);
}

.dashboard-compact-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-compact-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-compact-text {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-compact-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.dashboard-compact-stats {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.dashboard-compact-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  transition: transform var(--transition);
}

.learning-dashboard.compact:hover .dashboard-compact-link {
  transform: translateX(3px);
}

.dashboard-compact-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  height: 6px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: visible;
}

.dashboard-compact-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-compact-percent {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  position: absolute;
  right: 0;
  top: -24px;
}

/* Dedicated Dashboard Page Completed List */
.completed-articles-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 40px;
}

.completed-article-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.completed-article-row:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: translateY(-1px);
}

.completed-article-title-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

.completed-checkmark-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.completed-article-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.completed-article-date {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.completed-articles-empty {
  padding: 24px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

/* ============================================================
   UI/UX QUIZ ARENA (GAMIFIED HUB) STYLING
   ============================================================ */

.quiz-arena-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 32px;
}

.quiz-track-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  min-height: 250px;
}

@media (hover: hover) {
  .quiz-track-card {
    cursor: pointer;
  }
  .quiz-track-card:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    transform: translateY(-2px);
  }
}

.quiz-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.quiz-track-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
}

.gradient-orange {
  background: linear-gradient(135deg, #FF6F2C, #FF9E67);
}

.gradient-blue {
  background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.gradient-green {
  background: linear-gradient(135deg, #10B981, #34D399);
}

.gradient-purple {
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
}

.quiz-track-score-pill {
  font-size: 11px;
  background: var(--bg-3);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 500;
}

.quiz-track-body {
  margin-bottom: 20px;
  flex-grow: 1;
}

.quiz-track-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.quiz-track-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.quiz-track-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.quiz-track-qcount {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

.btn-start-quiz {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-start-quiz:hover {
  background: var(--accent-hover);
}

.btn-start-quiz:active {
  transform: scale(0.96);
}

/* --- ACTIVE PLAY BOX --- */

.quiz-play-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.quiz-play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.quiz-play-track-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quiz-play-progress-text {
  font-size: 13px;
  color: var(--text-3);
}

.quiz-play-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-3);
  border-radius: 99px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-play-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #FF9E67);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.quiz-play-question-container {
  margin-bottom: 24px;
}

.quiz-play-question {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.quiz-play-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-play-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-play-option:hover:not(:disabled) {
  background: var(--bg-4);
  border-color: var(--text-3);
  transform: translateX(6px);
}

.quiz-play-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-4);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.quiz-play-option:hover:not(:disabled) .quiz-play-letter {
  background: var(--text-2);
  color: var(--bg);
}

/* Correct / Incorrect states */
.quiz-play-option.correct {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (prefers-color-scheme: dark) {
  .quiz-play-option.correct {
    color: #34d399 !important;
  }
}

.quiz-play-option.correct .quiz-play-letter {
  background: #10b981 !important;
  color: #ffffff !important;
}

.quiz-play-option.incorrect {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: shake 0.4s ease-in-out;
}

@media (prefers-color-scheme: dark) {
  .quiz-play-option.incorrect {
    color: #f87171 !important;
  }
}

.quiz-play-option.incorrect .quiz-play-letter {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.quiz-play-option:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.quiz-play-feedback {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-play-feedback-status {
  font-size: 15px;
  margin-bottom: 12px;
}

.quiz-play-explanation {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 20px;
}

.btn-quiz-next {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-quiz-next:hover {
  background: var(--accent-hover);
}

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

/* --- RESULTS SCREEN --- */

.quiz-results-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.results-header-section {
  margin-bottom: 24px;
}

.results-main-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.results-subtitle {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 600;
}

.results-score-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
}

.results-score-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.results-circle-bg {
  fill: none;
  stroke: var(--bg-3);
  stroke-width: 8px;
}

.results-circle-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8px;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.results-score-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-percent {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.score-fraction {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-top: 2px;
}

.results-badge-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  text-align: left;
  max-width: 480px;
  width: 100%;
  margin-bottom: 32px;
  transition: transform 0.2s;
}

.results-badge-callout:hover {
  transform: scale(1.01);
}



.callout-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.callout-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
}

.callout-text strong {
  color: var(--text);
  font-weight: 700;
}

.new-highscore-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.3);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 99px;
  display: inline-block;
  align-self: flex-start;
}

.results-action-row {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  width: 100%;
  max-width: 360px;
}

.btn-results-action {
  flex: 1;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-results-action.primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
}

.btn-results-action.primary:hover {
  background: var(--accent-hover);
}

.btn-results-action.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-results-action.secondary:hover {
  background: var(--bg-3);
  border-color: var(--text-3);
  color: var(--text);
}

.results-breakdown-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
  margin-top: 32px;
  margin-bottom: 12px;
  align-self: flex-start;
  text-align: left;
}

.results-summary-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-summary-row {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
}

.quiz-summary-row.correct {
  border-left: 3px solid #10b981;
}

.quiz-summary-row.incorrect {
  border-left: 3px solid #ef4444;
}

.summary-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.quiz-summary-row.correct .summary-status-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.quiz-summary-row.incorrect .summary-status-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.summary-details {
  flex: 1;
}

.summary-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.summary-explanation {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

/* --- FOCUSED QUIZ PAGE MODE --- */

.dashboard-page-layout.quiz-active-mode .layout-left,
.dashboard-page-layout.quiz-active-mode .header-navigation-row,
.dashboard-page-layout.quiz-active-mode .subcategory-banner,
.dashboard-page-layout.quiz-active-mode .learning-dashboard,
.dashboard-page-layout.quiz-active-mode .section-title-article,
.dashboard-page-layout.quiz-active-mode .section-divider,
.dashboard-page-layout.quiz-active-mode .completed-articles-list-container {
  display: none !important;
}

@media (min-width: 1024px) {
  .dashboard-page-layout.quiz-active-mode {
    grid-template-columns: 1fr !important;
    max-width: 720px !important;
    margin: 0 auto;
    padding-top: 40px;
  }
}

/* Exit button inside play box */
.btn-quiz-exit-icon {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-quiz-exit-icon:hover {
  background: var(--bg-3);
  color: var(--text-2);
}

.btn-quiz-exit-icon svg {
  width: 20px;
  height: 20px;
}

.quiz-play-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Chevron icon inside next button */
.btn-quiz-next .chevron-icon {
  width: 16px;
  height: 16px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s;
}

.btn-quiz-next:hover .chevron-icon {
  transform: translateX(3px);
}

/* --- CONFETTI ANIMATION --- */

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  top: -10px;
  opacity: 0.8;
  animation: flyConfetti 3s ease-in-out infinite;
}

@keyframes flyConfetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(450px) rotate(720deg);
    opacity: 0;
  }
}

/* --- DESIGN BADGES UPGRADED ICONS --- */

.badge-svg-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  transition: transform var(--transition);
  display: block;
}

.badge-item.unlocked .gradient-orange {
  color: #FF6F2C !important;
}

.badge-item.unlocked .gradient-green {
  color: #10B981 !important;
}

.badge-item.unlocked .gradient-blue {
  color: #3B82F6 !important;
}

.badge-item.unlocked .gradient-purple {
  color: #8B5CF6 !important;
}

/* Figma logo fill styling */
.badge-svg-icon.figma-svg {
  width: 15px;
  height: 22.5px;
  stroke: currentColor;
  stroke-width: 3.5px;
  fill: none;
}

/* --- HOME PAGE COMPACT PROGRESS CARD BADGES --- */

.dashboard-compact-badges-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.compact-badges-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.compact-badges-list {
  display: flex;
  gap: 8px;
  align-items: center;
}

.compact-badge-item {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

@media (hover: hover) {
  .compact-badge-item:hover {
    transform: scale(1.1);
  }
}

.compact-badge-item.gradient-orange {
  border: 2.2px solid #FF6F2C !important;
  background: transparent !important;
  color: #FF6F2C !important;
  box-shadow: 0 4px 14px rgba(255, 111, 44, 0.15) !important;
}

.compact-badge-item.gradient-green {
  border: 2.2px solid #10B981 !important;
  background: transparent !important;
  color: #10B981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15) !important;
}

.compact-badge-item.gradient-blue {
  border: 2.2px solid #3B82F6 !important;
  background: transparent !important;
  color: #3B82F6 !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15) !important;
}

.compact-badge-item.gradient-purple {
  border: 2.2px solid #8B5CF6 !important;
  background: transparent !important;
  color: #8B5CF6 !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.15) !important;
}

.compact-badge-item svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2.2px !important;
}

.compact-badge-item .figma-svg {
  width: 11px !important;
  height: 16.5px !important;
}

/* ============================================================
   FIREBASE AUTH BANNER
   ============================================================ */

.auth-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 24px;
  margin-bottom: 24px;
  gap: 16px;
}

.auth-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-banner-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-banner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.auth-banner-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
}

.auth-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(255, 111, 44, 0.2);
  flex-shrink: 0;
}

.auth-avatar-letter {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255, 111, 44, 0.2);
  flex-shrink: 0;
}

.auth-user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.auth-user-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.btn-auth-action {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.btn-auth-action:hover {
  transform: translateY(-2px);
  background: var(--bg-3);
  border-color: var(--text-3);
}

.btn-auth-action:active {
  transform: translateY(0);
}

.btn-auth-action.sign-in-google {
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
}

.btn-auth-action.sign-in-google:hover {
  background: #f8f9fa;
  border-color: #d2d4d7;
}

.google-icon {
  flex-shrink: 0;
}

.btn-auth-action.sign-out {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-auth-action.sign-out:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  color: #ef4444;
}

@media (max-width: 680px) {
  .auth-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
  }
  .btn-auth-action {
    width: 100%;
    justify-content: center;
  }
}

/* Visibility Rules for Desktop / Mobile Auth Banner Positions */
.auth-banner-desktop {
  display: none !important;
}
.auth-banner-mobile {
  display: block !important;
}

@media (min-width: 1024px) {
  .auth-banner-desktop {
    display: block !important;
  }
  .auth-banner-mobile {
    display: none !important;
  }
  
  /* Desktop layout styling adjustments for auth widget inside sidebar */
  .auth-banner-desktop .auth-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
    margin-top: 0;
  }

  .auth-banner-desktop .btn-auth-action {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   PODCAST PLAYER STYLING
   ============================================================ */

.podcast-player-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 12px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
}

.podcast-player-card .player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.podcast-player-card .podcast-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 99px;
}

.podcast-player-card .podcast-badge svg {
  width: 13px;
  height: 13px;
  stroke: var(--accent);
}

.podcast-player-card .podcast-credit {
  font-size: 12px;
  color: var(--text-2);
}

.podcast-player-card .podcast-credit a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

.podcast-player-card .player-body {
  display: flex;
  align-items: center;
  gap: 20px;
}

.podcast-player-card .player-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 111, 44, 0.3);
}

.podcast-player-card .player-play-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(255, 111, 44, 0.4);
}

.podcast-player-card .player-play-btn svg {
  width: 22px;
  height: 22px;
}

.podcast-player-card .player-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.podcast-player-card .player-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.podcast-player-card .player-meta {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.podcast-player-card .player-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.podcast-player-card .player-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  min-width: 32px;
}

.podcast-player-card .player-progress-container {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.podcast-player-card .player-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width 0.1s linear;
}

.podcast-player-card .player-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.15s ease, left 0.1s linear;
}

.podcast-player-card .player-progress-container:hover .player-progress-thumb {
  opacity: 1;
}

.podcast-player-card .player-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  gap: 16px;
}

.podcast-player-card .player-speed-control {
  display: flex;
  align-items: center;
}

.podcast-player-card .btn-speed {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.podcast-player-card .btn-speed:hover {
  background: var(--bg-4);
  border-color: var(--text-2);
}

.podcast-player-card .player-volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.podcast-player-card .btn-mute {
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
  cursor: pointer;
}

.podcast-player-card .btn-mute:hover {
  color: var(--text);
}

.podcast-player-card .btn-mute svg {
  width: 18px;
  height: 18px;
}

.podcast-player-card .volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: var(--bg-3);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}

.podcast-player-card .volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
}

.podcast-player-card .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  margin-top: -3px;
  transition: transform 0.1s ease;
}

.podcast-player-card .volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

@media (max-width: 580px) {
  .podcast-player-card {
    padding: 14px 16px;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 20px;
  }
  
  .podcast-player-card .player-top {
    padding-bottom: 8px;
    gap: 8px;
  }
  
  .podcast-player-card .podcast-badge {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  .podcast-player-card .podcast-credit {
    font-size: 11px;
  }
  
  .podcast-player-card .player-body {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  
  .podcast-player-card .player-play-btn {
    width: 44px;
    height: 44px;
    align-self: center;
    box-shadow: 0 3px 10px rgba(255, 111, 44, 0.25);
  }
  
  .podcast-player-card .player-play-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .podcast-player-card .player-details {
    gap: 4px;
  }
  
  .podcast-player-card .player-title {
    font-size: 14px;
  }
  
  .podcast-player-card .player-meta {
    font-size: 11px;
    line-height: 1.3;
  }
  
  .podcast-player-card .player-controls-row {
    gap: 8px;
    margin-top: 2px;
  }
  
  .podcast-player-card .player-time {
    font-size: 10px;
    min-width: 28px;
  }
  
  .podcast-player-card .player-footer {
    padding-top: 8px;
    gap: 12px;
  }
  
  .podcast-player-card .btn-speed {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .podcast-player-card .player-volume-control {
    display: none; /* Hide volume slider on mobile, control via device buttons */
  }
}

/* ============================================================
   GLOBAL NAVIGATION MINI PLAYER & FLOATING PLAYER WIDGET
   ============================================================ */

.nav-mini-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 16px 4px 6px;
  height: 38px;
  max-width: 200px;
  flex: 1;
  min-width: 0;
  margin: 0 12px;
  position: relative;
  transition: opacity 0.3s ease;
  z-index: 105;
}

.nav-mini-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 2px 6px rgba(255, 111, 44, 0.2);
}

.nav-mini-play-btn:hover {
  transform: scale(1.05);
  background: var(--accent-hover);
}

.nav-mini-play-btn svg {
  width: 12px;
  height: 12px;
}

.nav-mini-details {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.nav-mini-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.nav-mini-meta {
  font-size: 9.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.nav-mini-progress-container {
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.nav-mini-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
}

.nav-mini-close-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color var(--transition);
}

.nav-mini-close-btn:hover {
  color: var(--text-2);
}

/* Floating bottom bar player (mobile and fallback) */
.floating-player-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
}

.floating-player-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.floating-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 2px 8px rgba(255, 111, 44, 0.3);
}

.floating-play-btn:hover {
  transform: scale(1.05);
  background: var(--accent-hover);
}

.floating-play-btn svg {
  width: 16px;
  height: 16px;
}

.floating-details {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.floating-details-text {
  flex: 1;
  min-width: 0;
}

.floating-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.floating-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.floating-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.floating-close-btn:hover {
  color: #ffffff;
}

.floating-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.floating-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
}

/* Hide floating player widget on desktop screens since nav mini player is used */
@media (min-width: 821px) {
  .floating-player-widget {
    display: none !important;
  }
}

/* Mobile responsive adjustments for bottom player */
@media (max-width: 820px) {
  .nav-mini-player {
    display: none !important;
  }
  
  .floating-player-widget {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    padding: 12px 16px 16px !important;
    background: rgba(20, 20, 20, 0.95) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
  }
}

/* ============================================================
   SOUND WAVE VISUALIZER FOR PODCAST PLAYER
   ============================================================ */

.sound-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 14px;
  flex-shrink: 0;
}

.sound-wave .bar {
  width: 2px;
  height: 100%;
  background-color: var(--accent);
  border-radius: 1px;
  animation: bounce 0.8s ease-in-out infinite alternate;
  transform-origin: bottom;
}

.sound-wave .bar:nth-child(1) { animation-delay: 0.1s; height: 30%; }
.sound-wave .bar:nth-child(2) { animation-delay: 0.4s; height: 60%; }
.sound-wave .bar:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.sound-wave .bar:nth-child(4) { animation-delay: 0.6s; height: 40%; }

@keyframes bounce {
  0% {
    transform: scaleY(0.3);
  }
  100% {
    transform: scaleY(1);
  }
}

.sound-wave.paused .bar {
  animation-play-state: paused;
  transform: scaleY(0.3);
}

.floating-player-widget .sound-wave .bar {
  background-color: #ffffff;
}

/* ============================================================
   TOOLS & PLAYGROUND
   ============================================================ */

.btn-tools-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 38px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (hover: hover) {
  .btn-tools-nav:hover {
    background: var(--bg-3);
    border-color: var(--text-3);
    transform: translateY(-1px);
  }
}

.btn-tools-nav.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-tools-nav svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.tools-page-layout {
  margin-top: 24px;
}

.tools-focus-page {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 24px;
}

.tools-workbench-focused {
  max-width: 860px;
  margin: 0 auto 72px;
}

.tools-workbench-focused .tools-workbench-inner {
  margin-top: 24px;
}

.simple-tool-content,
.tints-shades-tool-content,
.contrast-checker-tool-content,
.bg-remover-tool-content,
.img-compressor-tool-content {
  background: var(--bg);
}

.tool-hero {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tool-hero .tools-overview-badge {
  margin-bottom: 12px;
}

.tool-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0;
  margin-bottom: 8px;
}

.tool-subtitle {
  max-width: 680px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
}

/* Mobile horizontal tool picker */
.tools-mobile-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
  margin-bottom: 4px;
}

.tools-mobile-nav::-webkit-scrollbar {
  display: none;
}

.tools-mobile-nav-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.tools-mobile-nav-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Hide on desktop — left sidebar is already visible */
@media (min-width: 1024px) {
  .tools-mobile-nav {
    display: none;
  }
}

/* Mobile tools workbench tweaks */
@media (max-width: 640px) {
  /* Tighter dropzone on phone */
  .bg-remover-dropzone {
    padding: 32px 20px;
  }

  .bg-remover-dropzone-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
  }

  .bg-remover-dropzone-title {
    font-size: 15px;
  }

  /* Tool title heading */
  .tool-title {
    font-size: 20px !important;
  }

  /* Compressor: stack stats vertically */
  .ic-stats-row {
    flex-direction: column;
    gap: 8px;
  }

  .ic-stat-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .ic-stat-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-align: left;
  }

  .ic-stat-label {
    margin-bottom: 0;
  }

  .ic-stat-size {
    font-size: 14px;
  }

  /* Compressor settings panel */
  .ic-settings-header {
    padding: 14px 16px;
  }

  .ic-controls {
    padding: 16px;
    gap: 16px;
  }

  .ic-filename {
    max-width: 180px;
  }

  /* Single column previews on phone */
  .ic-preview-grid,
  .bg-remover-result-grid {
    grid-template-columns: 1fr;
  }

  /* Contrast checker inputs stack on phone */
  .contrast-inputs-row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .utility-panel {
    padding: 16px;
  }

  .utility-preview-row,
  .font-pair-toolbar {
    flex-direction: column;
  }

  .utility-preview-img,
  .utility-preview-img.small {
    width: 100%;
    max-height: 260px;
  }

  .utility-grid-two,
  .utility-grid-two.compact {
    grid-template-columns: 1fr;
  }

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

  .font-pair-preview {
    padding: 20px;
  }

  .font-pair-preview h3 {
    font-size: 32px;
  }

  .unicode-output {
    font-size: 20px;
  }

  .lottie-color-row {
    grid-template-columns: auto 1fr auto;
  }

  .lottie-color-row small {
    grid-column: 2 / -1;
  }
}


.tools-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tools-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
}

@media (hover: hover) {
  .tools-sidebar-item:hover {
    background: var(--bg-3);
    border-color: var(--text-3);
  }
}

.tools-sidebar-item.active {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.tools-sidebar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.tools-sidebar-item.active .tools-sidebar-icon {
  background: var(--accent);
  color: #ffffff;
}

.tools-sidebar-icon svg {
  width: 16px;
  height: 16px;
}

.tools-sidebar-info {
  flex: 1;
  text-align: left;
}

.tools-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tools-sidebar-desc {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 1px;
}

.tools-workbench-inner {
  margin-top: 18px;
}

.utility-panel {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.04);
}

.utility-preview-row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.utility-preview-img {
  width: 240px;
  max-height: 240px;
  object-fit: contain;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-shrink: 0;
  padding: 8px;
}

.utility-preview-img.small {
  width: 120px;
  max-height: 120px;
}

.utility-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.utility-file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.utility-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.utility-select,
.utility-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.utility-select:focus,
.utility-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.utility-textarea {
  resize: vertical;
  line-height: 1.5;
}

.utility-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.utility-grid-two.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.utility-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 10px;
}

.utility-color-swatch {
  min-height: 110px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  transition: transform var(--transition), box-shadow var(--transition);
}

.utility-color-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.qr-preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.font-pair-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

/* New refined font pairing toolbar */
.fp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.fp-toolbar-main {
  flex: 1;
  min-width: 0;
}

.fp-toolbar-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.fp-size-control {
  width: 180px;
}

.fp-randomize-btn {
  border-radius: 99px !important;
  padding: 10px 22px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap;
}

.fp-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.font-pair-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
}

.font-pair-preview h3 {
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: 0;
}

.font-pair-preview p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 660px;
}

.unicode-output {
  min-height: 86px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  font-size: 24px;
  line-height: 1.4;
  color: var(--text);
  word-break: break-word;
}

.favicon-size-list {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.duotone-canvas {
  width: 100%;
  max-height: 520px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 18px;
  object-fit: contain;
}

.lottie-color-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.lottie-color-row {
  display: grid;
  grid-template-columns: auto 90px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.lottie-color-row small {
  color: var(--text-3);
  font-weight: 600;
}

.lottie-color-chip {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tool-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}

.color-block {
  border-radius: 12px;
  padding: 16px 12px;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease;
  user-select: none;
}

.color-block:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  z-index: 2;
}

.color-block:active {
  transform: scale(0.98);
}

.color-block-percent {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.color-block-hex {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.clipboard-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clipboard-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.clipboard-toast svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}

.preset-dot:hover {
  transform: scale(1.15);
  border-color: var(--text-2) !important;
}

.custom-color-picker-trigger:hover {
  transform: scale(1.08);
  border-color: var(--accent) !important;
}
.contrast-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  text-align: center;
  min-width: 60px;
}

.contrast-badge.pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.contrast-badge.fail {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

#btnSwapColors:hover {
  transform: rotate(180deg) scale(1.08);
  border-color: var(--accent);
  color: var(--accent);
}

/* Tools Page Sidebar Info Panel Styling */
.tools-info-panel .sidebar-widget {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.info-panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.info-panel-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  margin-bottom: 20px;
}

.info-panel-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.info-panel-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  padding-left: 0;
}

.info-panel-list-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  list-style: none;
}

.info-panel-list-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-top: 2px;
}

.info-panel-list-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-panel-list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.info-panel-list-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-2);
}

.info-panel-tip-card {
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-panel-tip-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-top: 2px;
}

/* Generic Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  font-family: var(--font);
  box-shadow: 0 10px 24px rgba(255, 111, 44, 0.18);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(255, 111, 44, 0.24);
}

/* Background Remover Style Rules */
.bg-remover-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 54px 24px;
  background:
    linear-gradient(180deg, rgba(255, 111, 44, 0.035), transparent 54%),
    var(--bg-2);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.bg-remover-dropzone:hover,
.bg-remover-dropzone.dragover {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 111, 44, 0.08), transparent 58%),
    var(--bg-3);
  transform: translateY(-1px);
}

.bg-remover-dropzone-icon {
  width: 50px;
  height: 50px;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--accent-tint);
}

.bg-remover-dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.bg-remover-dropzone-desc {
  font-size: 13px;
  color: var(--text-2);
}

/* Loading Panel */
.bg-remover-loading {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blurred user image in the background */
.bg-loading-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.35) saturate(0.6);
  transform: scale(1.08);
  z-index: 0;
}

/* Card that floats above the backdrop */
.bg-loading-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* Step indicator row */
.bg-loading-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 8px;
}

.bg-loading-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
}

.bg-loading-step span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-3);
  text-transform: uppercase;
  transition: color 0.3s;
}

.bg-loading-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.25);
  transition: all 0.3s ease;
}

.bg-loading-step-dot svg {
  width: 16px;
  height: 16px;
}

/* Active step */
.bg-loading-step.active .bg-loading-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  animation: step-pulse 1.2s ease-in-out infinite;
}
.bg-loading-step.active span {
  color: #fff;
}

/* Done step */
.bg-loading-step.done .bg-loading-step-dot {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10B981;
  color: #10B981;
}
.bg-loading-step.done span {
  color: #10B981;
}

@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 111, 44, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 111, 44, 0); }
}

/* Connector line between steps */
.bg-loading-step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.12);
  min-width: 32px;
  margin-bottom: 22px;
}

/* Main loading title */
.bg-loading-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  transition: all 0.3s ease;
}

/* Rotating tip */
.bg-loading-tip {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  min-height: 20px;
  transition: opacity 0.4s ease;
}

/* Percentage */
.bg-loading-pct {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  margin-top: -4px;
}

.bg-remover-progress-container {
  width: 100%;
  max-width: 320px;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}

.bg-remover-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.25s ease;
}

/* Results Grid */
.bg-remover-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.bg-remover-preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bg-remover-preview-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.bg-remover-img-wrapper {
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-3);
}

.bg-remover-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Image Compressor Tool */
.ic-settings-panel {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.04);
}

.ic-settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.ic-original-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-4);
  border: 1px solid var(--border);
}

.ic-original-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-filename {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.ic-original-size {
  font-size: 13px;
  color: var(--text-2);
}

.ic-controls {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ic-control-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ic-control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-2);
}

.ic-control-label strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
}

/* Custom range slider */
.ic-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: var(--bg-4);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent);
}

.ic-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Progress line below settings */
.ic-progress {
  padding: 16px 0;
  margin-bottom: 20px;
}

.ic-progress-bar {
  transition: width 0.2s ease;
}

/* Stats row */
.ic-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ic-stat-card {
  flex: 1;
  min-width: 80px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}

.ic-stat-card--result {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}

.ic-stat-card--savings {
  border-color: rgba(255, 111, 44, 0.35);
  background: rgba(255, 111, 44, 0.05);
}

.ic-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.ic-stat-size {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.ic-stat-savings {
  color: var(--accent);
  font-size: 13px;
}

.ic-stat-arrow {
  flex-shrink: 0;
  color: var(--text-3);
  width: 20px;
  height: 20px;
}

.ic-stat-arrow svg {
  width: 20px;
  height: 20px;
}

/* Preview grid */
.ic-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ic-preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ic-preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.ic-preview-img-wrap {
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-preview-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Custom checkerboard background for transparency */
.checkerboard-bg {
  background-color: #ffffff;
  background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

@media (prefers-color-scheme: dark) {
  .checkerboard-bg {
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #242424 25%, transparent 25%),
                      linear-gradient(-45deg, #242424 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #242424 75%),
                      linear-gradient(-45deg, transparent 75%, #242424 75%);
  }
}

@media (prefers-color-scheme: light) {
  .clipboard-toast {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #111111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }
}

/* ── LIGHT MODE FLOATING PLAYER ADAPTATION ── */
@media (prefers-color-scheme: light) {
  .floating-player-widget {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  }
  
  .floating-title {
    color: var(--text);
  }
  
  .floating-meta {
    color: var(--text-2);
  }
  
  .floating-close-btn {
    color: var(--text-3);
  }
  
  .floating-close-btn:hover {
    color: var(--text-2);
  }
  
  .floating-progress-container {
    background: rgba(0, 0, 0, 0.08);
  }
  
  .floating-player-widget .sound-wave .bar {
    background-color: var(--accent);
  }
  
  @media (max-width: 820px) {
    .floating-player-widget {
      background: rgba(255, 255, 255, 0.96) !important;
      border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    }
  }
}

/* ============================================================
   MOBILE BOTTOM NAVBAR (PWA)
   ============================================================ */

:root {
  --bottom-nav-h: 64px;
}

.bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 200;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

  /* Push footer above bottom nav */
  .footer {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  }

  /* Push main content so bottom of page isn't hidden behind nav */
  .main {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px 4px 0;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.18s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Active indicator pill */
.bottom-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background 0.18s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-2px);
}

.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
  transition: stroke 0.18s;
}

.bottom-nav-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color 0.18s;
}

@media (hover: hover) {
  .bottom-nav-item:hover {
    color: var(--text);
  }

  .bottom-nav-item:hover .bottom-nav-icon {
    background: var(--bg-3);
  }
}

/* Light mode adaptation */
@media (prefers-color-scheme: light) {
  .bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    border-top-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  }
}

/* ============================================================
   TOOLS OVERVIEW PAGE
   ============================================================ */

.tools-overview-header {
  padding: 36px 0 28px;
}

.tools-overview-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
}

.tools-overview-title-main {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}

.tools-overview-subtitle {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 540px;
}

.tools-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding-bottom: 48px;
}

.tools-overview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 20px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

@media (hover: hover) {
  .tools-overview-card:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 111, 44, 0.1);
  }

  .tools-overview-card:hover .tools-overview-arrow {
    transform: translateX(4px);
    color: var(--accent);
  }
}

.tools-overview-icon {
  width: 46px;
  height: 46px;
  background: var(--bg-3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  transition: background var(--transition);
}

.tools-overview-card:hover .tools-overview-icon {
  background: rgba(255, 111, 44, 0.15);
}

.tools-overview-icon svg {
  width: 22px;
  height: 22px;
}

.tools-overview-info {
  flex: 1;
  min-width: 0;
}

.tools-overview-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.tools-overview-desc {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.tools-overview-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s;
}

.tools-overview-arrow svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 560px) {
  .tools-overview-title-main {
    font-size: 26px;
  }

  .tools-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DASHBOARD SIGN-IN GATE
   ============================================================ */

.dashboard-signin-gate {
  max-width: 480px;
  margin: 48px auto 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}

.signin-gate-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.18);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 24px;
}

.signin-gate-icon svg {
  width: 34px;
  height: 34px;
}

.signin-gate-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}

.signin-gate-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 32px;
}

.signin-gate-perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 28px;
  text-align: left;
}

.signin-gate-perk {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.signin-gate-perk svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.btn-signin-gate {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
  margin-bottom: 16px;
}

@media (hover: hover) {
  .btn-signin-gate:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }
}

.signin-gate-note {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
}

/* ============================================================
   MINI PLAYER — BOTTOM NAV AWARENESS (MOBILE)
   ============================================================ */

/* On mobile, float the mini player above the bottom navbar */
@media (max-width: 820px) {
  .floating-player-widget {
    bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3) !important;
  }
}

/* ============================================================
   PREMIUM UTILITY TOOL REDESIGNS
   ============================================================ */

/* Segmented Format / Preset Chips Control */
.tool-segmented-control {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  width: 100%;
}

.tool-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.tool-segment-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tool-segment-btn.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 111, 44, 0.24);
}

/* Custom premium sliders styling */
.premium-range-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

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

.premium-slider-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.premium-slider-badge {
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.premium-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--bg-3);
  outline: none;
  margin: 8px 0;
  transition: background 0.2s;
}

.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transition: transform 0.15s;
}

.premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

/* Card Mockup Frame and Preview Badge */
.preview-card-wrapper {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 18px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  width: 100%;
}

.preview-info-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.preview-card-label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Color Extractor Cards & Layout */
.palette-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 24px;
  margin-top: 18px;
}

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

.palette-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.palette-swatch-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
}

.palette-swatch-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.palette-swatch-color {
  height: 100px;
  width: 100%;
  position: relative;
  transition: height var(--transition);
}

.palette-swatch-card:hover .palette-swatch-color {
  height: 112px;
}

.palette-swatch-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 15, 15, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
}

.palette-swatch-card:hover .palette-swatch-copy-btn {
  opacity: 1;
  transform: scale(1);
}

.palette-swatch-copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.palette-swatch-copy-btn svg {
  width: 13px;
  height: 13px;
}

.palette-swatch-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.palette-swatch-hex {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.palette-swatch-rgb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.palette-contrast-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2.5px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.palette-contrast-badge.pass {
  background: rgba(76, 175, 80, 0.12);
  color: #4CAF50;
}

.palette-contrast-badge.fail {
  background: rgba(244, 67, 54, 0.12);
  color: #F44336;
}

.palette-export-actions {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom picker row for QR code colors */
.custom-picker-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  width: 100%;
}

.custom-picker-trigger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.custom-picker-trigger input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.custom-picker-input {
  background: transparent !important;
  border: none !important;
  color: var(--text) !important;
  font-family: var(--font-mono) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  text-transform: uppercase;
  width: 80px;
}

.custom-picker-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Presets grid */
.color-presets-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-preset-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-preset-btn:hover {
  background: var(--bg-4);
  border-color: var(--text-3);
  color: var(--text);
}

.color-preset-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-tint);
}

.preset-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

/* Typography tester specimen card & code block styles */
.font-pairing-preview-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-2);
  transition: background-color var(--transition);
}

.font-pairing-canvas {
  padding: 44px 36px;
  min-height: 280px;
  transition: background-color 0.2s, color 0.2s;
}

.font-pairing-canvas.light-theme {
  background: #ffffff;
  color: #111111;
}

.font-pairing-canvas.dark-theme {
  background: #111111;
  color: #ffffff;
}

.font-pairing-canvas h3 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}

.font-pairing-canvas p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}

.font-pairing-editor-bar {
  border-top: 1px solid var(--border);
  background: rgba(15, 15, 15, 0.05);
  padding: 16px 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.font-theme-toggle-group {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}

.font-theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.font-theme-toggle-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.font-theme-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.code-embed-container {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  margin-top: 16px;
  font-family: var(--font-mono);
}

.code-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.code-embed-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-copy-code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-code:hover {
  background: var(--bg-4);
  color: var(--text);
  border-color: var(--text-3);
}

.code-embed-pre {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}

/* Device mockup frames */
.mockup-device-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.device-mockup-tab {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  width: 100%;
}

.browser-header-mock {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.browser-tab-mock {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 4px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  margin-bottom: -9px;
  margin-top: 2px;
}

.browser-tab-favicon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.browser-url-mock {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-3);
  text-align: left;
  max-width: 320px;
  margin-left: auto;
}

.browser-body-mock {
  padding: 36px 24px;
  text-align: center;
  background: var(--bg);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Phone iOS home screen mockup */
.device-mockup-phone {
  background: #111111;
  border: 6px solid #242424;
  border-radius: 36px;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 9/18;
  margin: 0 auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.phone-top-island {
  width: 80px;
  height: 18px;
  background: #242424;
  border-radius: 99px;
  margin: -10px auto 20px;
  flex-shrink: 0;
}

.phone-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center;
}

.phone-app-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.phone-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--bg-3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.phone-app-icon.generated {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-app-label {
  font-size: 9.5px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Favicon Package Content Badge Grid */
.favicon-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}

.favicon-package-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.favicon-package-preview-wrapper {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.favicon-package-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.favicon-package-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}

.favicon-package-card-size {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

/* Tool action rows for stacking full-width buttons on mobile */
.tool-action-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

@media (max-width: 560px) {
  .tool-action-row {
    flex-direction: column !important;
  }
  .tool-action-row button,
  .tool-action-row a {
    width: 100% !important;
  }
}

/* Responsive button grid that stacks vertically on mobile */
.tool-action-row-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 560px) {
  .tool-action-row-grid {
    grid-template-columns: 1fr !important;
  }

  /* Hide live mockup panels on mobile to free up space */
  .tool-mobile-hide {
    display: none !important;
  }

  /* When mockup column is hidden, let the other column span full width */
  .utility-grid-two {
    grid-template-columns: 1fr !important;
  }

  /* Remove outer panels/cards completely to get more space */
  .utility-panel,
  .preview-card-wrapper,
  .palette-export-actions,
  .font-pairing-preview-container,
  .device-mockup-tab,
  .device-mockup-phone,
  .code-embed-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    min-height: auto !important;
  }

  /* Strip all shadows to support flat design on mobile */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Layout color palette swatches vertically on mobile with full wide width */
  .palette-swatches-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .palette-swatch-card {
    flex-direction: row !important;
    align-items: center !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-2) !important;
  }

  .palette-swatch-card:hover {
    transform: none !important;
  }

  .palette-swatch-color {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
  }

  .palette-swatch-card:hover .palette-swatch-color {
    height: 60px !important;
  }

  .palette-swatch-info {
    padding: 8px 12px !important;
    flex: 1 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  /* Layout generated favicon package vertically with full wide width */
  .favicon-package-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .favicon-package-card {
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 14px !important;
    text-align: left !important;
    gap: 12px !important;
    background: var(--bg-3) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
  }

  .favicon-package-preview-wrapper {
    flex-shrink: 0 !important;
  }

  /* Ensure QR code canvas wrapper remains clean on a flat white background */
  #qrCanvasWrap {
    background: #FFFFFF !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    display: inline-flex !important;
    width: auto !important;
    margin: 0 auto !important;
  }

  /* Ensure font pairing canvas container remains clean and flat */
  .font-pairing-canvas {
    padding: 24px 0 !important;
  }

  .font-pairing-canvas.light-theme {
    background: #ffffff !important;
    color: #111111 !important;
    padding: 24px 16px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
  }

  .font-pairing-canvas.dark-theme {
    background: #111111 !important;
    color: #ffffff !important;
    padding: 24px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .font-pairing-editor-bar {
    padding: 12px 0 !important;
    background: transparent !important;
    border-top: none !important;
  }

  /* Font pairing toolbar mobile improvements */
  .fp-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .fp-toolbar-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .fp-size-control {
    width: 100% !important;
  }

  .fp-randomize-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .fp-code-grid {
    grid-template-columns: 1fr !important;
    margin-top: 12px !important;
  }

  .code-embed-container {
    margin-top: 0 !important;
  }
}


/* ============================================================
   JOBS PAGE
   ============================================================ */

/* Nav live dot */
.nav-jobs-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  margin-left: 5px;
  position: relative;
  top: -1px;
  flex-shrink: 0;
}

.nav-jobs-live-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.35);
  animation: jobs-dot-pulse 2s ease-in-out infinite;
}

@keyframes jobs-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0; }
}

/* Hero */
.jobs-page-hero {
  padding: 40px 0 32px;
}

.jobs-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.jobs-live-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  position: relative;
  flex-shrink: 0;
}

.jobs-live-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: jobs-dot-pulse 2s ease-in-out infinite;
}

.jobs-page-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 14px;
}

.jobs-title-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #FF9A5C 60%, #FFD0B0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jobs-page-subtitle {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 520px;
}

/* Search */
.jobs-controls-row {
  margin-bottom: 20px;
}

.jobs-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
}

.jobs-search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
}

.jobs-search-input {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 48px 13px 46px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.jobs-search-input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

.jobs-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 111, 44, 0.12);
}

.jobs-search-clear {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  border: none;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.jobs-search-clear:hover {
  background: var(--bg-4);
  color: var(--text);
}

.jobs-search-clear svg {
  width: 14px;
  height: 14px;
}

/* Filter pills */
.jobs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.jobs-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

@media (hover: hover) {
  .jobs-filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-tint);
  }
}

.jobs-filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 111, 44, 0.28);
}

/* Jobs grid */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

/* Job card */
.job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

@media (hover: hover) {
  .job-card:hover {
    border-color: var(--accent);
    background: var(--bg-2);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  }

  .job-card:hover .job-card-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
  }
}

.job-card--featured {
  border-color: rgba(255, 111, 44, 0.3);
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(255, 111, 44, 0.04) 100%);
}

.job-card-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.2);
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.03em;
  width: fit-content;
}

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

.job-card-logo-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.job-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.job-card-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #FF9A5C 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-card-meta {
  flex: 1;
  min-width: 0;
}

.job-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card-company {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  transition: color var(--transition), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.job-card-arrow svg {
  width: 18px;
  height: 18px;
}

.job-card-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags row */
.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.job-tag--type {
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.job-tag--location {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.job-tag--cat {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid rgba(255, 111, 44, 0.15);
}

.job-tag--date {
  background: var(--bg-3);
  color: var(--text-3);
  border: 1px solid var(--border);
  margin-left: auto;
}

/* Loading state */
.jobs-loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}

.jobs-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: jobs-spin 0.8s linear infinite;
}

@keyframes jobs-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.jobs-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 72px 24px 80px;
  text-align: center;
}

.jobs-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  margin-bottom: 8px;
}

.jobs-empty-icon svg {
  width: 34px;
  height: 34px;
}

.jobs-empty-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.jobs-empty-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 340px;
}

.jobs-empty-reset {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.jobs-empty-reset:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Post a job CTA banner */
.jobs-post-cta {
  margin-bottom: 48px;
}

.jobs-post-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(255, 111, 44, 0.08) 0%, rgba(255, 154, 92, 0.05) 100%);
  border: 1.5px solid rgba(255, 111, 44, 0.18);
  border-radius: 20px;
}

.jobs-post-cta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jobs-post-cta-text strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.jobs-post-cta-text span {
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 500;
}

.jobs-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(255, 111, 44, 0.3);
}

.jobs-post-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 111, 44, 0.4);
}

.jobs-post-btn svg {
  width: 16px;
  height: 16px;
}

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

  .jobs-post-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .jobs-post-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .jobs-page-title {
    font-size: 28px;
  }

  .jobs-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .jobs-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .jobs-search-wrapper {
    max-width: 100%;
  }
}

/* Light mode adaptations */
@media (prefers-color-scheme: light) {
  .job-card--featured {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 111, 44, 0.03) 100%);
  }

  .jobs-loading-spinner {
    border-color: #e8e8e8;
    border-top-color: var(--accent);
  }
}

/* ── JOBS ADMIN PANEL ───────────────────────────────────────── */

.jobs-admin-auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--nav-h) - 80px);
  padding: 40px 20px;
}

.jobs-admin-auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.jobs-admin-auth-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.jobs-admin-auth-card h2 {
  font-size: 22px;
  margin-bottom: 12px;
  font-family: var(--font-display);
}

.jobs-admin-auth-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.jobs-admin-back-link {
  display: inline-block;
  color: var(--text-3);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition);
}

.jobs-admin-back-link:hover {
  color: var(--accent);
}

.jobs-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  gap: 20px;
}

.jobs-admin-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(255, 111, 44, 0.2);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.jobs-admin-title {
  font-size: 32px;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}

.jobs-admin-subtitle {
  color: var(--text-2);
  font-size: 14px;
}

.jobs-admin-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-size: 13px;
}

.jobs-admin-header-actions {
  display: flex;
  gap: 10px;
}

.btn-jobs-admin-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-jobs-admin-outline:hover {
  border-color: var(--text-2);
  color: var(--text);
  background: var(--bg-3);
}

.btn-jobs-admin-outline--danger:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.05);
}

.jobs-admin-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 80px;
}

.jobs-admin-form-card,
.jobs-admin-listings-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.jobs-admin-form-card h3,
.jobs-admin-listings-card h3 {
  font-size: 18px;
  font-family: var(--font-display);
  margin-bottom: 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.jobs-admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
}

.form-group label .required {
  color: var(--accent);
}

.form-group label .optional {
  color: var(--text-3);
  font-weight: 400;
  font-size: 11px;
}

.jobs-admin-form input[type="text"],
.jobs-admin-form input[type="url"],
.jobs-admin-form select,
.jobs-admin-form textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: all var(--transition);
  width: 100%;
}

.jobs-admin-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}

.jobs-admin-form input[type="text"]:focus,
.jobs-admin-form input[type="url"]:focus,
.jobs-admin-form select:focus,
.jobs-admin-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label span {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.btn-cancel {
  flex: 1;
  padding: 11px;
  background: var(--bg-4);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-cancel:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--text-3);
}

.admin-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-jobs-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.admin-jobs-error {
  padding: 20px;
  text-align: center;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  font-size: 13px;
}

.admin-job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  gap: 16px;
  transition: all var(--transition);
}

.admin-job-row:hover {
  border-color: var(--bg-4);
  background: rgba(36, 36, 36, 0.8);
}

.admin-job-row--editing {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  background: rgba(255, 111, 44, 0.03);
}

.admin-job-row--inactive {
  opacity: 0.65;
}

.admin-job-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.admin-job-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.admin-job-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-job-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--bg-4);
  font-family: var(--font-display);
}

.admin-job-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-job-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.admin-job-title-wrap strong {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-job-company {
  font-size: 12px;
  color: var(--text-2);
}

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

.admin-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.admin-badge--cat {
  background: var(--bg-4);
  color: var(--text-2);
}

.admin-badge--type {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.admin-badge--loc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-3);
}

.admin-badge--featured {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.admin-badge--status {
  border: 1px solid transparent;
  user-select: none;
  font-weight: 600;
  transition: all var(--transition);
}

.admin-badge--active {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.2);
}

.admin-badge--active:hover {
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.2);
}

.admin-badge--hidden {
  background: var(--bg-4);
  color: var(--text-3);
  border-color: var(--border);
}

.admin-badge--hidden:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
}

.admin-job-actions {
  display: flex;
  gap: 8px;
}

.btn-admin-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-admin-action svg {
  width: 12px;
  height: 12px;
}

.btn-admin-action--edit:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-tint);
}

.btn-admin-action--delete:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.05);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .jobs-admin-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .jobs-admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 24px 0 16px;
  }
  
  .jobs-admin-user-info {
    align-items: flex-start;
  }
  
  .admin-job-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .admin-job-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
}

/* ── JOBS MODAL, VISITOR FORM & USER LISTINGS ───────────────── */

.job-details-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeInModal 0.2s ease forwards;
}

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

.job-details-modal-content {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  max-width: 680px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
  padding: 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  animation: slideInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.job-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.job-modal-close:hover {
  color: var(--text);
  background: var(--bg-4);
  transform: scale(1.05);
}

.job-modal-close svg {
  width: 18px;
  height: 18px;
}

.job-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.job-modal-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.job-modal-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-modal-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #FF9A5C 100%);
  font-family: var(--font-display);
}

.job-modal-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.job-modal-company {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}

.job-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.job-modal-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.job-modal-badge--type {
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.job-modal-badge--location {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.job-modal-badge--cat {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid rgba(255, 111, 44, 0.15);
}

.job-modal-badge--date {
  background: var(--bg-3);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.job-modal-badge--featured {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.job-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.job-modal-grid-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job-modal-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.job-modal-card-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.job-modal-section {
  margin-bottom: 28px;
}

.job-modal-section h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.job-modal-text-block {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  white-space: pre-wrap;
}

.job-detail-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-detail-skill-tag {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition);
}

.job-detail-skill-tag:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.job-modal-footer {
  border-top: 1.5px solid var(--border);
  padding-top: 24px;
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.job-modal-submitted-by {
  font-size: 13px;
  color: var(--text-3);
}

.btn-job-apply-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(255, 111, 44, 0.35);
  margin-left: auto;
}

.btn-job-apply-now:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 111, 44, 0.45);
}

.btn-job-apply-now svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.btn-job-apply-now:hover svg {
  transform: translateX(3px);
}

.jobs-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.jobs-post-btn-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.jobs-post-btn-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-tint);
}

.user-submitted-jobs-section {
  border-top: 1.5px solid var(--border);
  padding-top: 40px;
  margin-top: 48px;
}

.user-submitted-jobs-header {
  margin-bottom: 24px;
}

.user-submitted-jobs-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.user-submitted-jobs-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.user-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  gap: 20px;
  transition: all var(--transition);
}

.user-job-row:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.user-job-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-job-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-job-company-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}

.user-job-dot {
  color: var(--text-3);
  font-size: 10px;
}

.user-job-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-user-action {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
}

.btn-user-action--edit:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-tint);
}

.btn-user-action--delete:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.05);
}

.visitor-form-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.visitor-form-subtitle {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}

@media (max-width: 560px) {
  .jobs-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .job-modal-grid {
    grid-template-columns: 1fr;
  }
  
  .job-modal-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 16px;
  }
  
  .btn-job-apply-now {
    width: 100%;
    justify-content: center;
  }
  
  .user-job-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .user-job-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
}

/* ── FULLSCREEN POST JOB PAGE ───────────────────────────────── */

.post-job-container {
  padding-top: 40px;
  padding-bottom: 80px;
}

.post-job-container .jobs-admin-auth-card {
  margin: 60px auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.post-job-header {
  margin-bottom: 32px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-job-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color var(--transition);
}

.post-job-back-link:hover {
  color: var(--accent);
}

.post-job-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.post-job-subtitle {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============================================================
   INTERNET SPEED TEST TOOL
   ============================================================ */
.speed-test-tool-content {
  background: var(--bg);
}

.speedometer-wrapper {
  margin: 0 auto;
}

.speedometer-svg {
  filter: drop-shadow(0 4px 20px rgba(255, 111, 44, 0.15));
}

#speedGaugeProgress {
  transform-origin: center;
  transition: stroke-dashoffset 0.15s linear;
}

.speed-wave-wrapper canvas {
  display: block;
}

.speed-stat-card {
  transition: border-color var(--transition), box-shadow var(--transition);
}

.speed-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 111, 44, 0.35) !important;
}

.speed-test-btn:active {
  transform: translateY(0);
}

.speed-stat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background var(--transition);
}

.pulse-dot-active {
  animation: statPulse 1.2s infinite ease-in-out;
}

@keyframes statPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 8px currentColor;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
}

/* Responsive fixes */
@media (max-width: 480px) {
  .speed-container {
    padding: 24px 16px !important;
    gap: 24px !important;
  }
  .speed-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .speedometer-wrapper {
    width: 180px !important;
    height: 180px !important;
  }
  #speedLiveVal {
    font-size: 34px !important;
  }
}




