/* ==========================================================================
   DEVELOPER PREP ARENA & CODING HUB CORE STYLING
   ========================================================================== */

:root {
  --primary-red: #ff2d2d;
  --accent-red-hover: #ff4d4d;
  --accent-red-glow: rgba(255, 45, 45, 0.4);
  --border-red-glow: rgba(255, 45, 45, 0.15);
  
  --bg-dark: #000000;
  --bg-darker: #050508;
  --bg-card: rgba(5, 5, 8, 0.6);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'VT323', monospace;
  --card-radius: 24px;
  --btn-radius: 50px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background: var(--bg-color, #000000);
  color: var(--text-main);
  font-family: var(--font-body);
}

/* Section Height Bug Fix */
.coding-hub-main section {
  min-height: auto !important;
  height: auto !important;
  display: block !important;
}

.gradient-text-red {
  background: linear-gradient(135deg, var(--primary-red) 0%, #ff4d4d 50%, #bd0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 45, 45, 0.2);
}

/* ==========================================================================
   TABS NAVIGATION
   ========================================================================== */
.hub-controls-section {
  padding-top: 75px;
  padding-bottom: 5px;
  position: relative;
  z-index: 10;
}

.hub-tabs-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  background: rgba(5, 5, 8, 0.85);
  border: 1px solid var(--border-card);
  padding: 8px;
  border-radius: 100px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.hub-tab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.hub-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 45, 45, 0.3);
  box-shadow: 0 0 15px rgba(255, 45, 45, 0.15);
}

.hub-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 45, 45, 0.2) 0%, rgba(255, 45, 45, 0.05) 100%);
  border-color: var(--primary-red);
  color: var(--primary-red);
  box-shadow: 0 0 20px rgba(255, 45, 45, 0.2), inset 0 0 10px rgba(255, 45, 45, 0.1);
}

/* ==========================================================================
   HERO STYLE SECTORS
   ========================================================================== */
.hub-hero {
  padding-top: 90px; /* spacing below floating navbar */
  padding-bottom: 15px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.neon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(255, 45, 45, 0.06);
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  box-shadow: 0 0 12px rgba(255, 45, 45, 0.15);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-top: 15px;
  margin-bottom: 15px;
}

.typewriter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.cursor {
  display: inline-block;
  color: var(--primary-red);
  font-weight: 300;
  margin-left: 5px;
  animation: blink 0.9s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 35px auto;
  line-height: 1.6;
}

/* Search Dashboard HUD */
.search-dashboard-hud {
  max-width: 750px;
  margin: 0 auto 30px auto;
}

.search-field-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.search-field-wrapper:focus-within {
  border-color: var(--primary-red);
  box-shadow: 0 0 20px rgba(255, 45, 45, 0.25), inset 0 0 5px rgba(255, 45, 45, 0.1);
}

.search-icon {
  font-size: 1.2rem;
  color: var(--primary-red);
  filter: drop-shadow(0 0 3px rgba(255, 45, 45, 0.4));
}

.search-field-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #fff;
  outline: none;
}

.search-field-wrapper input::placeholder {
  color: #555566;
}

.clear-search-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-search-btn:hover {
  background: rgba(255, 45, 45, 0.15);
  color: var(--primary-red);
}

/* Quick Filter Chips */
.quick-filters-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
}

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

.filter-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.filter-chip:hover {
  color: #fff;
  border-color: var(--primary-red);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 45, 45, 0.15);
}

/* ==========================================================================
   SECTIONS GENERAL
   ========================================================================== */
.dashboard-section {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-header {
  margin-bottom: 24px;
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Glass card defaults */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 16px; /* reduced */
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: -100%; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: 0.5s;
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover::before {
  top: 100%;
  transition: 0.8s;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-red);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 45, 45, 0.15);
}

/* ==========================================================================
   SECTION 2: LANGUAGES CARDS
   ========================================================================== */
.languages-grid, .companies-grid, .roadmaps-grid, .quiz-tracks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px; /* compact */
}

@media (max-width: 1200px) {
  .languages-grid, .companies-grid, .roadmaps-grid, .quiz-tracks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 992px) {
  .languages-grid, .companies-grid, .roadmaps-grid, .quiz-tracks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .languages-grid, .companies-grid, .roadmaps-grid, .quiz-tracks-grid {
    grid-template-columns: 1fr;
  }
}

.lang-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  height: 100%;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.card-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  color: var(--primary-red);
  transition: var(--transition-smooth);
}

.lang-card:hover .card-logo {
  color: #fff;
  background: var(--primary-red);
  box-shadow: 0 0 15px rgba(255, 45, 45, 0.4);
}

.bookmark-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 5;
}

.bookmark-icon-btn:hover {
  color: var(--primary-red);
  transform: scale(1.15);
}

.bookmark-icon-btn.active {
  color: var(--primary-red);
  font-weight: 900;
}

.card-content h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: #fff;
}

.card-content p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6px 0;
}

.card-stats-item i {
  color: var(--primary-red);
  margin-right: 4px;
}

.card-progress-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.68rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-red);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--primary-red);
}

.btn-card-action {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 8px 0;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-card:hover .btn-card-action {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #000;
  font-weight: 800;
}

/* ==========================================================================
   SECTION 3: COMPANIES CARDS
   ========================================================================== */
/* Grid settings moved to combined section */

.company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  min-height: 180px;
  height: 100%;
  justify-content: space-between;
}

.company-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  color: var(--primary-red);
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.company-card:hover .company-logo {
  background: var(--primary-red);
  color: #000;
  box-shadow: 0 0 15px rgba(255, 45, 45, 0.4);
}

.company-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.company-q-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.company-card-tabs {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 8px;
  gap: 4px;
}

.company-tab-link {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.company-tab-link:hover {
  background: rgba(255, 45, 45, 0.08);
  color: var(--primary-red);
}

/* ==========================================================================
   SECTION 4: TRENDING QUESTIONS
   ========================================================================== */
.trending-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.trending-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.trending-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.trending-tab-btn.active {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #000;
  font-weight: 800;
  box-shadow: 0 5px 15px rgba(255, 45, 45, 0.3);
}

.trending-questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.trending-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.trending-item:hover {
  border-color: var(--primary-red);
  box-shadow: 0 5px 15px rgba(255, 45, 45, 0.1);
  transform: translateX(5px);
}

.trending-item-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.trending-item-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 45, 45, 0.1);
  border: 1px solid rgba(255, 45, 45, 0.3);
  color: var(--primary-red);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.trending-item-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #f3f3f5;
}

.trending-item-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trending-item-diff.easy { color: #00e676; }
.trending-item-diff.medium { color: #ffd700; }
.trending-item-diff.hard { color: #ff2d2d; }

/* ==========================================================================
   SECTION 5: PREPARATION ROADMAPS
   ========================================================================== */
/* Grid settings moved to combined section */

.roadmap-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  height: 100%;
  justify-content: space-between;
}

.roadmap-icon {
  font-size: 1.3rem;
  color: var(--primary-red);
}

.roadmap-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.roadmap-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  flex: 1;
}

.roadmap-btn-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-red);
  margin-top: 6px;
}

.roadmap-btn-container i {
  transition: transform 0.3s;
}

.roadmap-card:hover .roadmap-btn-container i {
  transform: translateX(4px);
}

/* ==========================================================================
   SECTION 6: CODING PRACTICE
   ========================================================================== */
.practice-cards-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.practice-level-card {
  text-align: center;
  cursor: pointer;
}

.practice-level-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.6rem;
  margin: 0 auto 15px auto;
  transition: var(--transition-smooth);
}

.practice-level-card.difficulty-easy .practice-level-icon { color: #00e676; border-color: rgba(0, 230, 118, 0.2); }
.practice-level-card.difficulty-medium .practice-level-icon { color: #ffd700; border-color: rgba(255, 215, 0, 0.2); }
.practice-level-card.difficulty-hard .practice-level-icon { color: #ff2d2d; border-color: rgba(255, 45, 45, 0.2); }

.practice-level-card.difficulty-easy:hover .practice-level-icon { background: #00e676; color: #000; box-shadow: 0 0 15px rgba(0, 230, 118, 0.4); }
.practice-level-card.difficulty-medium:hover .practice-level-icon { background: #ffd700; color: #000; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
.practice-level-card.difficulty-hard:hover .practice-level-icon { background: #ff2d2d; color: #000; box-shadow: 0 0 15px rgba(255, 45, 45, 0.4); }

.practice-level-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.practice-level-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 15px;
}

.practice-btn {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-red);
}

.practice-filter-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .practice-filter-box {
    grid-template-columns: 1fr;
  }
}

.practice-filter-column h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 8px;
}

.practice-chips-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.practice-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.practice-chip:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* ==========================================================================
   VIEW 2: TOPIC LISTING PAGE & ACCORDION LIST
   ========================================================================== */
.topic-container {
  padding-top: 130px;
  padding-bottom: 80px;
}

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

.breadcrumb-link {
  transition: var(--transition-smooth);
}

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

.breadcrumb-separator {
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: #fff;
  font-weight: 500;
}

.topic-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
}

@media (max-width: 992px) {
  .topic-layout-wrapper {
    grid-template-columns: 1fr;
  }
}

.topic-header {
  margin-bottom: 30px;
}

.topic-header-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.topic-badge {
  background: var(--primary-red);
  color: #000;
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.topic-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.topic-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Table of Contents */
.toc-container h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list li a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.toc-list li a:hover {
  color: var(--primary-red);
  padding-left: 5px;
}

#mobile-toc-container {
  display: none;
  margin-bottom: 25px;
}

@media (max-width: 992px) {
  #mobile-toc-container {
    display: block;
  }
  .topic-sidebar {
    display: none;
  }
}

/* AdSense Banners */
.adsense-container {
  margin: 25px 0;
  text-align: center;
  padding: 15px;
  background: rgba(255,255,255,0.01) !important;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.adsense-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.adsense-placeholder i {
  font-size: 1.5rem;
  color: var(--primary-red);
  opacity: 0.6;
}

/* Sidebar Styling */
.topic-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 8px;
}

.sidebar-widget ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-widget ul li a {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.sidebar-widget ul li a:hover {
  color: var(--primary-red);
}

/* Dynamic FAQ accordions */
.section-title-sub {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 45px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
}

.faq-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 600;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.3s;
}

.faq-accordion-item.expanded {
  border-color: var(--primary-red);
}

.faq-accordion-item.expanded .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-red);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.15);
}

.faq-content {
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Related topics links */
.related-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.related-card {
  padding: 20px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.related-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   VIEW 3: QUESTION DETAIL PAGE
   ========================================================================== */
.question-container {
  padding-top: 130px;
  padding-bottom: 80px;
  max-width: 1000px;
}

.question-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.question-meta-badges {
  display: flex;
  gap: 8px;
}

.meta-badge-lang {
  background: rgba(255, 45, 45, 0.1);
  border: 1px solid rgba(255, 45, 45, 0.3);
  color: var(--primary-red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
}

.meta-badge-diff {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
}

.meta-badge-diff.easy { background: rgba(0, 230, 118, 0.1); border: 1px solid rgba(0, 230, 118, 0.3); color: #00e676; }
.meta-badge-diff.medium { background: rgba(255, 215, 0, 0.1); border: 1px solid rgba(255, 215, 0, 0.3); color: #ffd700; }
.meta-badge-diff.hard { background: rgba(255, 45, 45, 0.1); border: 1px solid rgba(255, 45, 45, 0.3); color: #ff2d2d; }

.question-action-buttons {
  display: flex;
  gap: 8px;
}

.action-btn-hub {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.action-btn-hub:hover {
  color: #fff;
  border-color: var(--primary-red);
  box-shadow: 0 0 10px rgba(255, 45, 45, 0.15);
}

.action-btn-hub.btn-bookmark.active {
  background: var(--primary-red);
  color: #000;
  border-color: var(--primary-red);
  font-weight: 800;
}

#q-detail-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 25px;
  line-height: 1.25;
}

.question-content-block {
  margin-bottom: 30px;
}

.question-content-block h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detailed-answer-text, .easy-explanation-text, .example-text {
  font-size: 1rem;
  line-height: 1.65;
  color: #d1d1d6;
}

.detailed-answer-text p, .easy-explanation-text p, .example-text p {
  margin-bottom: 12px;
}

.detailed-answer-text ul, .easy-explanation-text ul {
  padding-left: 20px;
  margin-bottom: 12px;
  list-style-type: square;
}

.detailed-answer-text li, .easy-explanation-text li {
  margin-bottom: 6px;
}

.question-content-block h2 i {
  color: var(--primary-red);
}

/* Alert/Special Blocks */
.explanation-block {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--primary-red);
  padding: 20px;
  border-radius: 0 12px 12px 0;
}

.alert-block {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.mistakes-block {
  background: rgba(255, 45, 45, 0.03);
  border: 1px solid rgba(255, 45, 45, 0.12);
  border-left: 4px solid #ff2d2d;
}

.mistakes-block h2 i {
  color: #ff2d2d !important;
}

.practices-block {
  background: rgba(0, 230, 118, 0.03);
  border: 1px solid rgba(0, 230, 118, 0.12);
  border-left: 4px solid #00e676;
}

.practices-block h2 i {
  color: #00e676 !important;
}

.tip-block {
  background: rgba(255, 215, 0, 0.03);
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-left: 4px solid #ffd700;
  padding: 20px;
  border-radius: 12px;
}

.tip-block h2 i {
  color: #ffd700 !important;
}

/* Code Syntax Wrapper */
.code-syntax-wrapper {
  background: rgba(5, 5, 8, 0.95);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  margin: 25px 0;
}

.code-header-bar {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.btn-copy-code {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-copy-code:hover {
  color: var(--primary-red);
}

.code-syntax-wrapper pre {
  margin: 0;
  padding: 18px 22px;
  overflow-x: auto;
}

.code-syntax-wrapper code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e4e4e7;
  display: block;
}

/* Code Output block */
.code-output-wrapper {
  background: #020204;
  border: 1px solid var(--border-card);
  border-top: none;
  border-radius: 0 0 12px 12px;
  margin-top: -26px;
  margin-bottom: 25px;
  overflow: hidden;
}

.output-header-bar {
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-output-wrapper pre {
  margin: 0;
  padding: 14px 22px;
}

.code-output-wrapper code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  color: #a0a0a5;
}

/* Complexity Grid */
.complexity-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 25px 0;
}

.complexity-metric-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-red);
}

.metric-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Related Questions Links */
.related-q-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-q-links li a {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.related-q-links li a:hover {
  color: var(--primary-red);
  padding-left: 4px;
}

/* Nav Footer */
.question-navigation-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 25px;
  margin-top: 40px;
}

.nav-arrow-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.nav-arrow-btn:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* Print Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .navbar, footer, .breadcrumb-nav, .question-navigation-row, .adsense-container, .question-action-buttons {
    display: none !important;
  }
  .question-container {
    padding-top: 0 !important;
  }
  .question-main-card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  code, pre {
    border: 1px solid #ccc !important;
    background: #f8f8f8 !important;
    color: #000 !important;
  }
}

/* ==========================================================================
   VIEW 4: QUIZ PLAYGROUND
   ========================================================================== */
#quiz-view {
  padding-bottom: 20px;
}

.quiz-sub-panel {
  display: none;
  animation: fadeInPanel 0.4s forwards;
}

.quiz-sub-panel.active {
  display: block;
}

.quiz-selector-header {
  text-align: center;
  margin-bottom: 35px;
}

.selector-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 50px;
  background: rgba(255, 45, 45, 0.06);
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  box-shadow: 0 0 10px rgba(255, 45, 45, 0.12);
  margin-bottom: 18px;
}

.selector-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: #fff;
}

.selector-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

.quiz-tracks-grid {
  max-width: 1000px;
  margin: 0 auto;
}

.quiz-track-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 18px 16px 16px 16px;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 180px;
  justify-content: space-between;
}

.quiz-track-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: 18px 18px 0 0;
  background: var(--card-accent, var(--primary-red));
  opacity: 0.6;
}

.quiz-track-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-accent, var(--primary-red));
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 45, 45, 0.1);
}

.track-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.track-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  color: var(--card-accent, var(--primary-red));
}

.track-q-count {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 20px;
}

.track-lang-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f3f3f5;
}

.track-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  flex: 1;
}

.track-play-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--card-accent, var(--primary-red));
}

/* Quiz Game Screen */
.quiz-game-hud {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}

.hud-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-indicator {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

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

.hud-item.timer.warning {
  color: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.hud-item.timer.critical {
  color: #ff2d2d;
  border-color: #ff2d2d;
  animation: pulseCrit 0.8s infinite alternate;
}

@keyframes pulseCrit {
  0% { box-shadow: 0 0 5px rgba(255, 45, 45, 0.2); }
  100% { box-shadow: 0 0 15px rgba(255, 45, 45, 0.6); }
}

.quiz-question-wrapper {
  margin-bottom: 25px;
}

.quiz-question-wrapper h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.35;
  color: #fff;
  margin-top: 10px;
}

.quiz-q-meta-row {
  display: flex;
  gap: 10px;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 30px;
}

.option-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 16px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
}

.option-item:hover {
  border-color: var(--primary-red);
  background: rgba(255, 255, 255, 0.03);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.option-item:hover .option-letter {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.option-item.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.option-item.correct {
  border-color: #00e676 !important;
  background: rgba(0, 230, 118, 0.04) !important;
  opacity: 1 !important;
}

.option-item.correct .option-letter {
  border-color: #00e676 !important;
  background: #00e676 !important;
  color: #000 !important;
}

.option-item.wrong {
  border-color: #ff2d2d !important;
  background: rgba(255, 45, 45, 0.04) !important;
  opacity: 1 !important;
}

.option-item.wrong .option-letter {
  border-color: #ff2d2d !important;
  background: #ff2d2d !important;
  color: #fff !important;
}

.result-check-text {
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  display: none;
}

.result-check-text.show {
  display: block;
}

.result-check-text.badge-correct {
  background: rgba(0, 230, 118, 0.04);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-left: 4px solid #00e676;
}

.result-check-text.badge-wrong {
  background: rgba(255, 45, 45, 0.04);
  border: 1px solid rgba(255, 45, 45, 0.15);
  border-left: 4px solid #ff2d2d;
}

.quiz-controls-row {
  display: flex;
  justify-content: space-between;
}

.quiz-action-btn {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.quiz-action-btn:hover:not(:disabled) {
  border-color: #fff;
}

.quiz-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quiz-action-btn.btn-quit:hover {
  background: rgba(255, 45, 45, 0.1);
  border-color: #ff2d2d;
  color: #ff2d2d;
}

.quiz-action-btn.btn-submit {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #000;
  font-weight: 800;
}

.quiz-action-btn.btn-submit:hover {
  box-shadow: 0 0 15px rgba(255, 45, 45, 0.4);
}

/* Quiz Results screen */
.results-layout-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 40px;
  text-align: center;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.results-visual-radial {
  position: relative;
  width: 200px;
  height: 200px;
}

.radial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 12;
}

.radial-bar {
  fill: none;
  stroke: var(--primary-red);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out;
}

.radial-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
}

.results-summary-info h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 15px;
  margin-bottom: 5px;
}

.results-trophy {
  font-size: 3rem;
  color: #ffd700;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

.stats-breakdown {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.breakdown-row.accented-green { color: #00e676; }
.breakdown-row.accented-magenta { color: #ff007f; }
.breakdown-row.accented-cyan { color: #00f0ff; }

.results-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
}

.btn-neon-glow {
  background: var(--primary-red);
  border: 1px solid var(--primary-red);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-neon-glow:hover {
  box-shadow: 0 0 15px rgba(255, 45, 45, 0.5);
}

.btn-neon-glow.outline {
  background: transparent;
  border-color: var(--border-card);
  color: #fff;
}

.btn-neon-glow.outline:hover {
  border-color: #fff;
  box-shadow: none;
}

/* ==========================================================================
   GLOBAL UTILITIES
   ========================================================================== */
.hub-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  max-width: 600px;
  margin: 40px auto;
  backdrop-filter: blur(12px);
}

.hub-empty-state i {
  font-size: 3rem;
  color: var(--primary-red);
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

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

.hub-empty-state h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hub-empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
