/* ============================================================
   NEEDBEFORE — CORE STYLESHEET
   Main Brand Color: Electric Blue (#0052FF / #0045D8 / #00F0FF)
   Zero Emojis — Font Awesome & Vector Icons Only
   ============================================================ */

:root {
  --primary: #0052FF;
  --primary-hover: #003ECC;
  --primary-light: #EBF2FF;
  --primary-glow: #00D2FF;
  --accent-cyan: #06B6D4;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --bg-main: #F8FAFC;
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 82, 255, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 82, 255, 0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[data-theme="dark"] {
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --bg-main: #0B0F19;
  --card-bg: #131B2E;
  --border: #1E293B;
  --primary-light: rgba(0, 82, 255, 0.15);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER & NAVBAR
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

[data-theme="dark"] .header {
  background: rgba(19, 27, 46, 0.92);
}

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

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

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0, 82, 255, 0.3);
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.logo-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.logo-title span {
  color: var(--primary);
}

.logo-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: -3px;
}

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

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.header .nav-links {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--card-bg);
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   ADSENSE UNITS & LAZY LOADING
   ============================================================ */
.ad-slot-container {
  width: 100%;
  margin: 24px auto;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 82, 255, 0.25);
  background: rgba(0, 82, 255, 0.02);
  padding: 14px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.ad-label {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ad-placeholder-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ad-sidebar {
  min-height: 300px;
  position: sticky;
  top: 90px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 60px 0 35px;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(0, 82, 255, 0.08), transparent 70%);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 82, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.15;
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 14px auto 30px;
}

/* SEARCH BAR */
.search-wrapper {
  max-width: 580px;
  margin: 0 auto 30px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.15);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 12px;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

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

.search-clear {
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  max-width: 640px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

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

/* ============================================================
   CATEGORIES TABS
   ============================================================ */
.categories-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 20px;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.categories-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.cat-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.25);
}

/* ============================================================
   GUIDES GRID & CARD
   ============================================================ */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.guide-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  animation: guide-card-enter 0.3s ease both;
}

@keyframes guide-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 82, 255, 0.4);
  box-shadow: var(--shadow-lg);
}

.guide-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #E2E8F0;
}

.guide-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.guide-card:hover .guide-card-img {
  transform: scale(1.04);
}

.guide-card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 82, 255, 0.9);
  backdrop-filter: blur(8px);
  color: white;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.guide-card-verified-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(8px);
  color: white;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.guide-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.guide-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.guide-card:hover .guide-card-title {
  color: var(--primary);
}

.guide-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.meta-cost {
  font-weight: 700;
  color: var(--text-main);
}

.guide-card-footer {
  padding: 10px 20px;
  background: rgba(0, 82, 255, 0.03);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

/* ============================================================
   GUIDE DETAIL VIEW (DYNAMIC TEMPLATE)
   ============================================================ */
.guide-detail-view {
  display: none;
  padding: 30px 0 60px;
}

.guide-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
}

@media (max-width: 960px) {
  .guide-detail-layout {
    grid-template-columns: 1fr;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.guide-header-box {
  margin-bottom: 30px;
}

.guide-main-title {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 12px 0 10px;
}

.guide-main-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.guide-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.fact-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.fact-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

/* 30-SEC SUMMARY CALLOUT */
.summary-box {
  background: linear-gradient(135deg, rgba(0, 82, 255, 0.08), rgba(0, 240, 255, 0.04));
  border-left: 4px solid var(--primary);
  padding: 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 30px 0;
}

.summary-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.summary-text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-main);
}

/* INTERACTIVE CHECKLIST COMPONENT */
.checklist-container {
  margin: 35px 0;
}

.progress-banner {
  position: sticky;
  top: 85px;
  z-index: 50;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

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

.progress-title {
  font-size: 0.88rem;
  font-weight: 800;
}

.progress-stats {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  width: 0%;
  transition: width 0.3s ease;
}

.check-item-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.check-item-row:hover {
  border-color: var(--primary);
}

.check-item-row.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.check-item-row.completed .custom-checkbox {
  background: var(--success);
  border-color: var(--success);
}

.check-item-content {
  flex: 1;
}

.check-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.check-item-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.check-item-row.completed .check-item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.check-item-cost {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}

.check-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.check-item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 6px;
}

.check-item-link:hover {
  text-decoration: underline;
}

/* STEP BY STEP TIMELINE */
.step-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item.completed .step-num {
  background: var(--success);
}

/* PITFALLS BOX */
.pitfalls-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 30px 0;
}

.pitfall-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #B45309;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

[data-theme="dark"] .pitfall-header {
  color: #FBBF24;
}

.pitfalls-list {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* ============================================================
   MODALS (LEGAL, DMCA, RULES, CREATE, BAN)
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  padding: 20px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 700px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
}

.modal-body h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 18px 0 6px;
  color: var(--primary);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-main);
}

/* DESKTOP-ONLY WARNING */
.desktop-only-notice {
  display: none;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .desktop-only-notice {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

/* FORM STYLES */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-hint {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============================================================
   COMMUNITY CALLOUT & FOOTER
   ============================================================ */
.community-banner {
  background: linear-gradient(135deg, #0A0F1D, #111C38);
  color: white;
  border-radius: var(--radius-lg);
  padding: 45px;
  margin: 40px 0;
  box-shadow: 0 15px 30px rgba(0, 82, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  padding: 40px 0 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-column h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

/* ============================================================
   MULTILINGUAL LEGAL TABS (EN, FR, ES)
   ============================================================ */
.modal-lang-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.lang-tab {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.25);
}

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   AUTHENTICATION UI (SIGN IN / REGISTER & HEADER USER PILL)
   ============================================================ */
.user-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 10px 4px 4px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.user-logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.user-logout-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.88rem;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
}

.auth-notice-box {
  background: rgba(0, 82, 255, 0.05);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  margin-bottom: 20px;
  color: var(--text-main);
}

.ban-alert-box {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: #B91C1C;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

[data-theme="dark"] .ban-alert-box {
  color: #F87171;
}

/* ============================================================
   SIMPLIFIED GUIDE CREATOR UI (INTERACTIVE PRESETS & SLIDERS)
   ============================================================ */
.topic-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.topic-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 82, 255, 0.15);
}

.topic-prefix, .topic-suffix {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.topic-input {
  border: none !important;
  box-shadow: none !important;
  padding: 8px 4px !important;
  font-size: 0.9rem !important;
  font-weight: 600;
}

/* REAL-TIME DUPLICATE WARNING */
.duplicate-alert {
  margin-top: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #B45309;
}

[data-theme="dark"] .duplicate-alert {
  color: #FBBF24;
}

.duplicate-alert-text {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-duplicate-view {
  background: var(--warning);
  color: black;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
  cursor: pointer;
}

/* CATEGORY SELECTOR CARDS */
.cat-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .cat-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cat-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  gap: 6px;
  text-align: center;
}

.cat-select-card i {
  font-size: 1.1rem;
}

.cat-select-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.15);
}

/* LEVEL SEGMENTED BUTTONS */
.level-pills {
  display: flex;
  gap: 8px;
}

.level-pill {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.level-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* TIME SLIDER & UNITS */
.time-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.time-display-badge {
  background: var(--primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 82, 255, 0.3);
}

.time-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-slider {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
}

.time-units {
  display: flex;
  gap: 6px;
}

.time-unit-btn {
  flex: 1;
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
}

.time-unit-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* COST PRESET PILLS */
.cost-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cost-pill {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cost-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* QUICK REQUIREMENTS TAGS & CHIPS */
.quick-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-pill {
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bg-main);
  border: 1px dashed var(--border);
  border-radius: 9999px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.selected-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.selected-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 82, 255, 0.2);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.selected-item-chip button {
  color: var(--primary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 2px;
}

.custom-item-adder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 100px auto;
  gap: 8px;
}

.custom-item-adder > input {
  min-width: 0;
}

/* ============================================================
   CONTRIBUTOR PROFILE VIEW
   ============================================================ */
.profile-view {
  padding: 30px 0 60px;
}

.profile-header-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.profile-user-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 16px rgba(0, 82, 255, 0.25);
  overflow: hidden;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-badge-verified {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-badge-verified[hidden] {
  display: none;
}

.profile-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.profile-categories,
.contributor-dashboard {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.profile-categories h3,
.contributor-dashboard h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-heading p,
.dashboard-post-count {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-action,
.guide-delete-button {
  color: var(--danger);
}

.guide-delete-button {
  font: inherit;
  font-weight: 700;
}

.dashboard-post-count {
  margin-top: 12px;
}

.assigned-guide-list,
.moderation-notices {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.assigned-guide-list h4,
.moderation-notices h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.assigned-guide-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.assigned-guide-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.assigned-guide-list a {
  color: var(--primary);
  font-weight: 700;
}

.moderation-notice {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
}

.moderation-notice p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.user-notification.is-read {
  opacity: 0.75;
}

.notification-read-button {
  margin-top: 10px;
}

.restriction-notice {
  border-color: var(--danger);
}

.account-status-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 650;
  line-height: 1.5;
}

.account-status-notice.info {
  border-color: var(--primary);
}

.account-status-notice.danger {
  border-color: var(--danger);
}

[data-create-guide-trigger]:disabled,
#submitGuideBtn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.notification-toast {
  position: fixed;
  z-index: 500;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.notification-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.guide-report-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.guide-report-action button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.report-guide-name {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-weight: 700;
}

.report-form-message {
  min-height: 1.3em;
  color: var(--danger);
  font-size: 0.85rem;
}

.profile-stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.profile-stat-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.profile-stat-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 150;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 16px;
  display: flex;
  justify-content: space-around;
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.2);
}

body {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.mobile-nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.mobile-nav-item i {
  font-size: 1rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus-visible,
.mobile-nav-item[aria-current="page"] {
  background: var(--primary-light);
  color: var(--primary);
  outline: none;
}

.install-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
}

.install-banner[hidden] {
  display: none;
}

.install-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
}

.install-dismiss:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

.cover-upload-preview {
  width: 100%;
  max-height: 220px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
}

.cover-upload-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.upload-status {
  min-height: 1.2em;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.upload-status.error {
  color: var(--danger);
}

.avatar-preview-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

/* ============================================================
   MOBILE RESPONSIVENESS OVERRIDES
   ============================================================ */
@media (max-width: 850px) {
  .nav-links {
    display: none !important;
  }
  .header-inner {
    height: 60px;
  }
  .logo-title {
    font-size: 1.1rem;
  }
  .logo-subtitle {
    display: none;
  }
  .guide-detail-header {
    flex-direction: column;
  }
  .guide-detail-layout {
    grid-template-columns: 1fr !important;
  }

  .install-banner {
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .guide-detail-layout > *,
  .guide-detail-main {
    min-width: 0;
  }

  .breadcrumb {
    flex-wrap: wrap;
  }

  .breadcrumb > :last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .guide-main-title {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
    overflow-wrap: anywhere;
  }

  .guide-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
    padding: 14px;
  }

  .guide-facts-grid > :last-child {
    grid-column: 1 / -1;
  }

  .fact-card {
    min-width: 0;
    gap: 8px;
  }

  .fact-card > div:last-child {
    min-width: 0;
  }

  .fact-value,
  .step-item h4 {
    overflow-wrap: anywhere;
  }

  .progress-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .progress-header > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }

  .progress-header .btn-outline {
    flex: 1 1 120px;
    justify-content: center;
  }

  .check-item-content,
  .step-item > div:last-child {
    min-width: 0;
  }

  .check-item-header {
    flex-wrap: wrap;
  }

  .create-form-dual-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .dashboard-heading {
    flex-direction: column;
  }

  .dashboard-actions {
    width: 100%;
  }

  .dashboard-actions button {
    flex: 1;
  }

  .header-actions {
    gap: 6px;
  }
  .header-actions .btn-primary span {
    display: none;
  }
  .header-actions .btn-primary {
    padding: 8px 12px;
  }
  .user-badge-header span {
    display: none;
  }
  .hero-title {
    font-size: 1.8rem !important;
  }
  .hero-description {
    font-size: 0.88rem !important;
  }
  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .categories-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .categories-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .categories-pills::-webkit-scrollbar {
    display: none;
  }
  .guides-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .community-banner {
    padding: 24px !important;
    text-align: center;
    justify-content: center;
  }
  .profile-header-card {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .profile-user-left {
    flex-direction: column;
  }
  .profile-stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .modal-overlay {
    padding: 10px;
  }
  .modal-card {
    max-height: 94vh;
  }
  .modal-body {
    padding: 16px;
  }
}

/* ============================================================
   GLOBAL SKELETON PREVIEWS & SHIMMER ANIMATION
   ============================================================ */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-box {
  background: linear-gradient(
    90deg,
    rgba(226, 232, 240, 0.6) 25%,
    rgba(241, 245, 249, 0.9) 50%,
    rgba(226, 232, 240, 0.6) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton-box {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.6) 25%,
    rgba(51, 65, 85, 0.9) 50%,
    rgba(30, 41, 59, 0.6) 75%
  );
  background-size: 200% 100%;
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-img {
  width: 100%;
  height: 190px;
  border-radius: 0;
}

.search-view {
  margin: 20px 0 44px;
  animation: view-enter 0.24s ease both;
}

.search-view-heading {
  margin-bottom: 20px;
}

.search-view-heading h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.search-view-heading > p:last-child {
  color: var(--text-muted);
}

.search-view-box {
  max-width: 760px;
  margin-bottom: 16px;
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.search-filters label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.search-result-count {
  margin: 18px 0 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

.profile-navigation {
  display: grid;
  gap: 18px;
  margin: 16px 0 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  animation: view-enter 0.24s ease both;
}

.profile-navigation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-navigation-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-navigation-heading h1 {
  font-size: 1.2rem;
}

.profile-navigation-heading p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

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

.profile-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-main);
}

.profile-setting-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-navigation-categories {
  display: grid;
  gap: 10px;
}

.profile-navigation-categories h2 {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.profile-category-nav > * {
  flex: 0 0 auto;
}

.profile-signin-card {
  max-width: 620px;
  margin: 32px auto;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: view-enter 0.24s ease both;
}

.profile-signin-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.25rem;
}

.profile-signin-card h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.profile-signin-card p {
  color: var(--text-muted);
}

.profile-signin-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .search-view {
    margin-top: 12px;
  }

  .search-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .search-filters > button {
    grid-column: 1 / -1;
  }

  .profile-navigation {
    gap: 14px;
    padding: 14px;
  }

  .profile-navigation-heading {
    align-items: flex-start;
  }

  .profile-navigation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .profile-setting {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .profile-account-setting {
    grid-column: 1 / -1;
  }

  .profile-setting #userHeaderArea {
    width: 100%;
  }

  #submitGuideProfileBtn {
    width: 100%;
    justify-content: center;
  }

  .profile-navigation-categories {
    gap: 8px;
  }

  .profile-category-nav {
    margin: 0 -14px;
    padding: 0 14px 4px;
  }

  .profile-category-nav {
    display: flex;
  }

  .profile-navigation-header .profile-navigation-heading {
    min-width: 0;
  }

  .profile-navigation-heading > div:last-child {
    min-width: 0;
  }

  .profile-navigation-heading p {
    max-width: 30ch;
  }

  .profile-settings-grid .lang-selector {
    flex-wrap: wrap;
  }

  .profile-account-setting #userHeaderArea > * {
    max-width: 100%;
  }
}

.skeleton-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ============================================================
   GLOBAL LANGUAGE SELECTOR (EN / FR / ES)
   ============================================================ */
.lang-selector {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.lang-selector-btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 9999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

.lang-selector-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 4px rgba(0, 82, 255, 0.3);
}

/* ============================================================
   PROFILE EDITING & AVATAR UPLOAD
   ============================================================ */
.avatar-upload-zone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  margin-bottom: 16px;
}

.avatar-preview-box {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* ============================================================
   STRICT MOBILE HORIZONTAL OVERFLOW PREVENTION
   ============================================================ */
html, body {
  max-width: 100%;
  overflow-x: hidden !important;
}
