/* ==========================================================================
   THEMECRAFT 3D — ULTRA-PREMIUM MODERN 3D STYLING SYSTEM
   Built with Glassmorphism, 3D CSS Perspectives, Dynamic Glows & Responsive Grids
   ========================================================================== */

:root {
  --bg-space: #06080f;
  --bg-surface: #0c101d;
  --bg-card: rgba(15, 21, 38, 0.72);
  --bg-card-hover: rgba(22, 30, 54, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.035);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.45);
  --border-cyan: rgba(0, 242, 254, 0.4);
  
  --color-primary: #6366f1;       /* Electric Indigo */
  --color-secondary: #00f2fe;     /* Neon Cyan */
  --color-accent: #ec4899;        /* Vivid Pink */
  --color-emerald: #10b981;       /* Success Green */
  --color-gold: #f59e0b;          /* Luxury Gold */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --gradient-neon: linear-gradient(135deg, #6366f1 0%, #00f2fe 50%, #ec4899 100%);
  --gradient-cyan: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-indigo: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-dark: linear-gradient(180deg, rgba(12, 16, 29, 0) 0%, rgba(6, 8, 15, 0.95) 100%);
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'Space Grotesk', monospace;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.25);
  --shadow-cyan: 0 0 30px rgba(0, 242, 254, 0.3);
  --shadow-3d: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 50px;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-space);
  color: var(--text-main);
  font-family: var(--font-heading);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 3D BACKGROUND CANVAS */
#canvas-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* AMBIENT LIGHT BLOBS */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.glow-1 {
  top: -150px;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
}
.glow-2 {
  top: 35%;
  right: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #00f2fe, transparent 70%);
}
.glow-3 {
  bottom: 10%;
  left: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
}

.site-wrap {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 14px;
  z-index: 900;
  padding: 0 20px;
  margin-bottom: 24px;
}
.nav-glass {
  background: rgba(11, 15, 27, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav-glass:hover {
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.15);
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
  margin-right: 18px;
}
.brand-icon-3d {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
  transform: rotate(-6deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.brand-wrap:hover .brand-icon-3d {
  transform: rotate(0deg) scale(1.08);
}
.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.brand-text span {
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.badge-version {
  font-size: 9px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 20px;
  font-family: var(--font-code);
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-width: 0;
  flex-wrap: nowrap;
}
.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
}
.nav-links a i {
  font-size: 13px;
  color: var(--color-secondary);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-links a:hover i {
  opacity: 1;
}
.nav-links a.active {
  color: #fff;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  font-weight: 600;
}
.nav-links .nav-secondary {
  display: none !important; /* Keep desktop header uncluttered — accessible via mobile drawer & footer */
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-cta .btn-nav-desktop {
  display: none !important; /* Hide redundant duplicate button to ensure sleek, uncluttered top bar */
}

/* BUTTONS */
.btn-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-indigo);
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.55);
}
.btn-cyan {
  background: var(--gradient-cyan);
  color: #06080f;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 242, 254, 0.6);
}
.btn-outline {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: rgba(0, 242, 254, 0.06);
}
.btn-large {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 12px;
}

/* ==========================================================================
   3D HERO BANNER
   ========================================================================== */
.hero-section {
  padding: 70px 0 90px;
  position: relative;
  perspective: 1000px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--color-secondary);
  font-weight: 500;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}
.hero-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  box-shadow: 0 0 10px var(--color-emerald);
}

.hero-title {
  font-size: 58px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hero-feat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-feat-item i {
  color: var(--color-emerald);
  font-size: 14px;
}

/* 3D FLOATING DISPLAY COMPONENT */
.hero-3d-stage {
  position: relative;
  width: 100%;
  height: 480px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-3d-wrapper {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
  position: relative;
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.traffic-lights {
  display: flex;
  gap: 6px;
}
.traffic-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.light-red { background: #ef4444; }
.light-yellow { background: #f59e0b; }
.light-green { background: #10b981; }

.card-title-pill {
  font-size: 12px;
  font-family: var(--font-code);
  color: var(--color-secondary);
  background: rgba(0, 242, 254, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.widget-stack-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.widget-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
}
.widget-tile:hover {
  border-color: var(--color-secondary);
  background: rgba(0, 242, 254, 0.05);
  transform: translateX(4px);
}
.tile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.tile-text h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.tile-text span {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-code);
}
.tile-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  font-weight: 600;
}

/* 3D FLOATING BADGES AROUND CARD */
.floating-badge {
  position: absolute;
  background: rgba(12, 16, 29, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--shadow-cyan);
  animation: floatUpDown 4s ease-in-out infinite alternate;
}
.floating-badge.badge-top-right {
  top: -20px;
  right: -25px;
  animation-delay: 0.5s;
}
.floating-badge.badge-bottom-left {
  bottom: -25px;
  left: -30px;
  animation-delay: 1.5s;
}
.badge-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06080f;
  font-size: 18px;
}
.badge-details h5 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}
.badge-details p {
  font-size: 11px;
  color: var(--color-emerald);
  margin: 0;
}

@keyframes floatUpDown {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-14px) rotate(2deg); }
}

/* ==========================================================================
   STUDIO SECTION: CODE INPUT & CONVERTER
   ========================================================================== */
.studio-section {
  padding: 70px 0 90px;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-badge {
  display: inline-block;
  font-size: 12px;
  font-family: var(--font-code);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-secondary);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 16px;
}

/* STUDIO CONTAINER GRID */
.studio-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 30px;
}

.studio-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

/* PRESET BAR */
.preset-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}
.preset-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.preset-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.preset-btn:hover, .preset-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--color-primary);
  color: #fff;
}

/* CODE TABS */
.code-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tab-buttons {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 8px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.tab-btn:hover {
  color: var(--text-main);
}
.tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-secondary);
}
.tab-status {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-code);
}

.code-editor-wrap {
  position: relative;
  flex: 1;
  min-height: 380px;
  margin-bottom: 20px;
}
.code-textarea {
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: #05070d;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  color: #a5b4fc;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s;
}
.code-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

/* THEME CONFIGURATION FORM */
.config-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.config-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.input-field input, .input-field textarea {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s;
}
.input-field input:focus, .input-field textarea:focus {
  border-color: var(--color-secondary);
}
.color-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}
.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  padding: 2px;
  background: none;
}

/* DETECTED SECTIONS LIST */
.detected-sections-card {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 24px;
  overflow-y: auto;
  max-height: 380px;
}
.detected-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.detected-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detected-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s;
}
.detected-item:hover {
  border-color: var(--color-primary);
}
.detected-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detected-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.detected-info h5 {
  font-size: 13px;
  margin: 0;
}
.detected-info span {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-code);
}
.control-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ctrl-tag {
  font-size: 9px;
  font-family: var(--font-code);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.ctrl-tag.tag-repeater {
  background: rgba(236, 72, 153, 0.2);
  color: var(--color-accent);
}
.ctrl-tag.tag-media {
  background: rgba(0, 242, 254, 0.2);
  color: var(--color-secondary);
}

/* STUDIO ACTION BUTTONS */
.studio-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-generate {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 10px;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.action-secondary-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   LIVE OUTPUT HUB: CODE INSPECTOR & FILE TREE
   ========================================================================== */
.inspector-section {
  padding: 70px 0 90px;
  position: relative;
}
.inspector-card {
  background: #080b14;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3d);
}

.inspector-header {
  background: rgba(15, 21, 38, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.inspector-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inspector-title h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.active-file-badge {
  font-size: 12px;
  font-family: var(--font-code);
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.inspector-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-secondary);
}

/* INSPECTOR SPLIT BODY */
.inspector-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 520px;
}

/* FILE TREE */
.file-tree-sidebar {
  background: rgba(6, 8, 15, 0.6);
  border-right: 1px solid var(--border-subtle);
  padding: 16px 12px;
  overflow-y: auto;
}
.file-tree-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-left: 8px;
}
.file-tree-group {
  margin-bottom: 16px;
}
.tree-folder-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-code);
  cursor: pointer;
  transition: all 0.15s;
}
.tree-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.tree-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-secondary);
  border-left: 3px solid var(--color-secondary);
}
.tree-item i {
  font-size: 12px;
  opacity: 0.8;
}

/* CODE VIEWER */
.code-viewer-pane {
  background: #04060a;
  overflow: auto;
  position: relative;
  display: flex;
}
.code-line-numbers {
  padding: 20px 14px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
  user-select: none;
  border-right: 1px solid var(--border-subtle);
}
.code-pre {
  margin: 0;
  padding: 20px 24px;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
  flex: 1;
}

/* ==========================================================================
   ELEMENTOR LIVE SIMULATOR MODAL
   ========================================================================== */
.simulator-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.simulator-modal.active {
  display: flex;
}
.simulator-window {
  width: 100%;
  max-width: 1240px;
  height: 90vh;
  background: #141721;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sim-header {
  background: #1e2230;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.sim-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.elementor-badge {
  background: #e2498a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.sim-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}
.sim-close:hover { color: #fff; }

.sim-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}
.sim-elementor-panel {
  background: #1b1f2d;
  border-right: 1px solid var(--border-subtle);
  padding: 18px;
  overflow-y: auto;
}
.sim-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sim-control-group {
  margin-bottom: 18px;
}
.sim-control-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}
.sim-input {
  width: 100%;
  background: #111420;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  font-size: 13px;
}
.sim-preview-pane {
  background: #fff;
  overflow-y: auto;
}
.sim-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   SHOWCASE TEMPLATES GRID
   ========================================================================== */
.templates-section {
  padding: 70px 0 90px;
}
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 30px;
}
.template-card-3d {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s, box-shadow 0.4s;
  cursor: pointer;
  position: relative;
}
.template-card-3d:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-3d);
}
.template-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.template-tag {
  font-size: 11px;
  font-family: var(--font-code);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-secondary);
}
.template-card-3d h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.template-card-3d p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.template-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-dim);
}
.template-meta-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   TECHNICAL ARCHITECTURE / SPECS SECTION
   ========================================================================== */
.specs-section {
  padding: 70px 0 90px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.spec-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.3s;
}
.spec-box:hover {
  transform: translateY(-5px);
  border-color: var(--border-cyan);
}
.spec-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}
.spec-box h4 {
  font-size: 18px;
  margin-bottom: 10px;
}
.spec-box p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-msg {
  background: rgba(15, 21, 38, 0.95);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  padding: 14px 22px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
}
.toast-msg.toast-success {
  border-left: 4px solid var(--color-emerald);
}
.toast-msg.toast-info {
  border-left: 4px solid var(--color-secondary);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px;
  background: rgba(5, 7, 13, 0.95);
  position: relative;
  z-index: 10;
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-copy {
  color: var(--text-dim);
  font-size: 14px;
}

/* ==========================================================================
   ADSENSE POLICY-COMPLIANT AD SLOTS (Hidden until approved & active)
   ========================================================================== */
.ad-slot-container {
  display: none !important;
  margin: 40px auto;
  text-align: center;
  max-width: 970px;
}
.ad-label {
  display: block;
  font-size: 10px;
  font-family: var(--font-code);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
  opacity: 0.8;
}
.ad-slot-box {
  background: rgba(12, 16, 29, 0.4);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: border-color 0.25s;
}
.ad-slot-box:hover {
  border-color: rgba(99, 102, 241, 0.3);
}
.ad-placeholder-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--font-code);
}
.ad-placeholder-text i {
  color: var(--color-secondary);
  font-size: 16px;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & TOGGLE
   ========================================================================== */
.mobile-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s;
}
.mobile-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--color-primary);
  color: var(--color-secondary);
}

.mobile-menu-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 14px;
  right: 14px;
  background: rgba(12, 16, 29, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), var(--shadow-glow);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-height: calc(100vh - 85px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-drawer.active,
.mobile-menu-drawer.open {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* Slim touch scrollbar for mobile drawer */
.mobile-menu-drawer::-webkit-scrollbar {
  width: 4px;
}
.mobile-menu-drawer::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}

/* ==========================================================================
   MOBILE DRAWER AUTH CARD (SIGN IN & USER ACCOUNT HUB ON MOBILE)
   ========================================================================== */
.mobile-drawer-auth {
  margin-bottom: 16px;
}
.mobile-auth-card {
  background: rgba(18, 24, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.mobile-auth-card.admin-card {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.12));
}
.mobile-auth-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-auth-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-neon);
  color: #0b0f19;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-auth-avatar.guest-avatar {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-primary);
  font-size: 16px;
}
.mobile-auth-avatar.admin-avatar {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #fff;
  font-size: 15px;
}
.mobile-auth-info {
  flex: 1;
  min-width: 0;
}
.mobile-auth-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-auth-email, .mobile-auth-desc {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.mobile-auth-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mobile-auth-badge.free-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.mobile-auth-badge.admin-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.mobile-auth-actions {
  display: flex;
  gap: 8px;
}
.mobile-auth-actions.full-stacked {
  flex-direction: column;
}
.mobile-auth-actions > * {
  flex: 1;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.2s;
}
.mobile-nav-link i {
  color: var(--color-secondary);
  font-size: 14px;
  width: 18px;
  text-align: center;
}
.mobile-nav-link:hover, .mobile-nav-link:active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   NAVIGATION RESPONSIVE BREAKPOINTS (PREVENTS SQUISHING & OVERLAPPING)
   ========================================================================== */
@media (max-width: 1400px) {
  .nav-links .nav-secondary {
    display: none !important; /* Hides secondary links from crowded top bar; always in drawer & footer */
  }
}

@media (max-width: 1140px) {
  .nav-links, .btn-nav-desktop {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .site-nav {
    padding: 0 14px;
    top: 10px;
  }
  .nav-glass {
    padding: 8px 16px;
  }
}

/* ==========================================================================
   TABLET & MOBILE (<= 992px): Sign In & User Badges moved inside Mobile Drawer
   Top navbar keeps only Brand Logo (Left) and Hamburger Menu (Right)
   ========================================================================== */
@media (max-width: 992px) {
  .nav-glass .nav-user-container {
    display: none !important;
  }
  .nav-cta {
    margin-left: auto !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
  }
  .mobile-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    z-index: 100 !important;
  }
  .site-nav {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 14px !important;
  }
  .nav-glass {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  .brand-wrap {
    margin-right: 0 !important;
    max-width: calc(100% - 50px) !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
  }
}

/* ==========================================================================
   CORE WEB VITALS & SPEED OPTIMIZATION (CONTENT VISIBILITY FOR OFFSCREEN SECTIONS)
   ========================================================================== */
.studio-section,
.inspector-section,
.templates-section,
.specs-section,
.editorial-section,
.faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 650px;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE MEDIA QUERIES (MOBILE, TABLET, DESKTOP)
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-features-list { max-width: 520px; margin: 0 auto; }
  .hero-3d-stage { height: auto; min-height: 400px; }
  .studio-grid { grid-template-columns: 1fr; }
  .inspector-body { grid-template-columns: 1fr; }
  .file-tree-sidebar { max-height: 220px; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* GLOBAL MOBILE OVERFLOW PREVENT */
  body, html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
  }

  /* NAVIGATION */
  .site-nav {
    padding: 0 12px !important;
    top: 8px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-glass {
    padding: 8px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-links, .btn-nav-desktop, .nav-glass .nav-user-container {
    display: none !important;
  }
  .brand-wrap {
    margin-right: 0 !important;
    max-width: calc(100% - 48px) !important;
    flex-shrink: 1 !important;
  }
  .brand-text {
    font-size: 17px !important;
  }
  .brand-icon-3d {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }
  .badge-version {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 15px !important;
  }

  /* HERO SECTION */
  .hero-section {
    padding: 30px 0 50px;
  }
  .hero-title {
    font-size: clamp(28px, 7vw, 42px);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
  }
  .hero-desc {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-bottom: 30px;
  }
  .hero-actions .btn-3d {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }
  .hero-features-list {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }

  /* HERO 3D CARD STAGE */
  .hero-3d-stage {
    min-height: auto;
    height: auto;
    padding: 10px 0 20px;
    perspective: none; /* Disable extreme tilt on mobile touch */
  }
  .card-3d-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  /* Keep floating badges within card boundaries on mobile to eliminate overflow */
  .floating-badge {
    position: static;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
    animation: none;
    width: 100%;
    justify-content: flex-start;
  }
  .floating-badge.badge-top-right,
  .floating-badge.badge-bottom-left {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }

  /* STUDIO SECTION */
  .studio-section {
    padding: 40px 0 60px;
  }
  .section-header {
    margin-bottom: 30px;
  }
  .section-header h2 {
    font-size: clamp(24px, 6vw, 32px);
  }
  .section-header p {
    font-size: 14px;
  }
  .studio-panel {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  .preset-selector-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .preset-buttons {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .preset-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }
  .code-tabs-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .tab-buttons {
    width: 100%;
    overflow-x: auto;
    display: flex;
  }
  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  .code-editor-wrap {
    min-height: 260px;
    height: 260px;
  }
  .code-textarea {
    min-height: 260px;
    font-size: 12px;
    padding: 12px;
  }
  .config-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .input-field input, .input-field textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
  .detected-sections-card {
    max-height: 280px;
    padding: 12px 10px;
  }
  .detected-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .control-tags {
    width: 100%;
  }
  .btn-generate {
    padding: 14px;
    font-size: 15px;
  }
  .action-secondary-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* CODE INSPECTOR */
  .inspector-section {
    padding: 40px 0 60px;
  }
  .inspector-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .inspector-title {
    flex-wrap: wrap;
  }
  .inspector-toolbar {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .inspector-toolbar .btn-tool {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 11px;
  }
  .file-tree-sidebar {
    max-height: 180px;
    padding: 12px 8px;
  }
  .code-viewer-pane {
    max-width: 100%;
  }
  .code-line-numbers {
    padding: 14px 6px;
    font-size: 11px;
  }
  .code-pre {
    padding: 14px;
    font-size: 11px;
  }

  /* TEMPLATES & SPECS */
  .templates-section, .specs-section {
    padding: 40px 0 60px;
  }
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .template-card-3d {
    padding: 20px 16px;
  }
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .spec-box {
    padding: 20px 16px;
  }

  /* ELEMENTOR SIMULATOR MODAL ON MOBILE */
  .simulator-modal {
    padding: 0;
  }
  .simulator-window {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
  .sim-body {
    grid-template-columns: 1fr;
  }
  .sim-elementor-panel {
    display: none;
  }

  /* FOOTER */
  .site-footer {
    padding: 35px 0 20px;
  }
  .footer-wrap {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  /* Typography and word wrap protection */
  h1, h2, h3, h4, p, span, a, code {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .brand-text {
    font-size: 16px;
  }
  .badge-version {
    display: none !important;
  }
  .hero-pill {
    font-size: 11px;
    padding: 4px 10px;
  }
  .card-title-pill {
    font-size: 10px;
    padding: 2px 6px;
  }
  .widget-tile {
    padding: 10px 12px;
  }
  .tile-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .tile-text h4 {
    font-size: 12px;
  }
  .tile-badge {
    font-size: 9px;
  }
  .ilc-ad-slot {
    min-height: 50px;
    padding: 8px;
    max-width: 100%;
  }
}

/* ==========================================================================
   ULTRA-COMPACT RESPONSIVE ENGINE (300px - 360px SMARTWATCH & COMPACT SCREENS)
   Guarantees 100% responsiveness, zero horizontal overflow, and legible UI down to 300px
   ========================================================================== */
@media (max-width: 360px) {
  /* CONTAINER & BASE PADDING */
  .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* NAVBAR MICRO-SCALING */
  .site-nav {
    padding: 0 4px !important;
    top: 6px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-glass {
    padding: 5px 8px !important;
    gap: 4px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .nav-glass .nav-user-container {
    display: none !important;
  }
  .brand-wrap {
    gap: 5px !important;
    max-width: calc(100% - 38px) !important;
    margin-right: 0 !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
  }
  .brand-icon-3d {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .brand-text {
    font-size: 13.5px !important;
    letter-spacing: -0.3px !important;
  }
  .badge-version {
    display: none !important;
  }
  .mobile-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .mobile-menu-drawer {
    left: 4px !important;
    right: 4px !important;
    padding: 12px 8px !important;
  }
  .mobile-nav-link {
    padding: 9px 10px !important;
    font-size: 13px !important;
    gap: 8px !important;
  }

  /* HERO TYPOGRAPHY & BUTTONS */
  .hero-section {
    padding: 16px 0 30px !important;
  }
  .hero-title, h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.5px !important;
    margin-bottom: 12px !important;
  }
  .hero-desc {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
  }
  .hero-actions {
    gap: 8px !important;
    margin-bottom: 20px !important;
  }
  .hero-actions .btn-3d {
    padding: 10px 12px !important;
    font-size: 12px !important;
    width: 100% !important;
  }
  .hero-features-list {
    font-size: 12px !important;
    gap: 8px !important;
  }

  /* 3D CARD STAGE & PREVIEW BODY */
  .hero-3d-stage {
    padding: 0 0 16px !important;
  }
  .card-3d-wrapper {
    padding: 12px 8px !important;
    border-radius: 12px !important;
    max-width: 100% !important;
  }
  .card-header-bar {
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
  }
  .card-code-body {
    padding: 8px 6px !important;
    font-size: 10px !important;
  }
  .floating-badge {
    display: none !important;
  }

  /* STUDIO / WORDPRESS BUILDER SECTION */
  .studio-section {
    padding: 24px 0 36px !important;
  }
  .section-header {
    margin-bottom: 18px !important;
  }
  .section-header h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }
  .section-header p {
    font-size: 12px !important;
  }
  .studio-panel {
    padding: 12px 6px !important;
    border-radius: 12px !important;
  }
  .preset-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }
  .preset-btn {
    padding: 6px 4px !important;
    font-size: 10px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  .tab-buttons {
    gap: 3px !important;
  }
  .tab-btn {
    padding: 5px 4px !important;
    font-size: 9px !important;
  }
  .code-editor-wrap {
    min-height: 180px !important;
    height: 180px !important;
  }
  .code-textarea {
    min-height: 180px !important;
    padding: 8px 6px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
  }
  .btn-generate {
    padding: 11px !important;
    font-size: 12px !important;
  }
  .action-secondary-group {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .action-secondary-group .btn-3d {
    padding: 8px !important;
    font-size: 11px !important;
  }

  /* CODE INSPECTOR SECTION */
  .inspector-section {
    padding: 24px 0 36px !important;
  }
  .inspector-header {
    padding: 8px !important;
    gap: 6px !important;
  }
  .inspector-title {
    font-size: 12px !important;
  }
  .inspector-toolbar {
    flex-direction: column !important;
    gap: 4px !important;
  }
  .inspector-toolbar .btn-tool {
    width: 100% !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
  }
  .code-viewer-pane {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .code-line-numbers {
    padding: 8px 4px !important;
    font-size: 10px !important;
  }
  .code-pre {
    padding: 8px 6px !important;
    font-size: 10px !important;
  }

  /* TEMPLATES & SPECS */
  .templates-section, .specs-section {
    padding: 24px 0 36px !important;
  }
  .template-card-3d, .spec-box {
    padding: 14px 8px !important;
  }
  .spec-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    margin-bottom: 12px !important;
  }

  /* FOOTER */
  .site-footer {
    padding: 24px 0 16px !important;
  }
  .footer-wrap {
    gap: 8px !important;
  }
  .footer-copy {
    font-size: 11px !important;
    text-align: center !important;
  }
  .footer-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 11px !important;
  }

  /* AMBIENT GLOWS SCALE DOWN */
  .ambient-glow {
    opacity: 0.1 !important;
    filter: blur(50px) !important;
  }
}

/* ==========================================================================
   ULTRA-NARROW SCREENS (300px - 320px STRICT CLAMPING)
   ========================================================================== */
@media (max-width: 320px) {
  .container {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .site-nav {
    padding: 0 2px !important;
    top: 4px !important;
  }
  .nav-glass {
    padding: 4px 6px !important;
    gap: 3px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .nav-glass .nav-user-container {
    display: none !important;
  }
  .brand-wrap {
    max-width: calc(100% - 34px) !important;
  }
  .brand-text {
    font-size: 12.5px !important;
  }
  .brand-icon-3d {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }
  .mobile-toggle-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
  .hero-title, h1 {
    font-size: 20px !important;
  }
  .btn-3d {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }
  .preset-buttons {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   HOME PAGE LATEST BLOGS 3-4 CARD SLIDER
   ========================================================================== */
.home-blogs-section {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
}

.home-blogs-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), rgba(0, 242, 254, 0.4), transparent);
}

.home-blogs-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.home-blogs-title-group {
  max-width: 680px;
}

.home-blogs-heading {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin: 12px 0 10px;
  letter-spacing: -0.8px;
}

.home-blogs-sub {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.home-blogs-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Status Pill */
.slider-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-family: var(--font-code);
  color: var(--color-secondary);
  user-select: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveDotPulse 1.8s infinite;
}

.live-dot.paused {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: none;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Slider Arrows */
.slider-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.slider-arrow-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.slider-arrow-btn:active {
  transform: translateY(0) scale(0.95);
}

.btn-all-blogs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  font-size: 13px !important;
  text-decoration: none;
}

/* Slider Container & Track */
.blog-slider-container {
  position: relative;
  overflow: hidden;
  padding: 12px 2px 20px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.blog-slider-container:active {
  cursor: grabbing;
}

.blog-slider-track {
  display: flex;
  gap: 24px;
  align-items: stretch;
  will-change: transform;
}

/* Blog Card */
.blog-slider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.blog-slider-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s ease;
}

.blog-slider-card:hover {
  transform: translateY(-7px);
  border-color: var(--border-cyan);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.16);
}

.blog-slider-card:hover::before {
  background: var(--gradient-cyan);
}

.slider-card-top {
  display: flex;
  flex-direction: column;
}

.slider-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.slider-cat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.slider-cat-badge.cat-wordpress {
  background: rgba(0, 242, 254, 0.12);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.slider-cat-badge.cat-frontend {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.slider-cat-badge.cat-security {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.slider-cat-badge.cat-ai {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.slider-cat-badge.cat-cloud {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.slider-cat-badge.cat-default {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider-read-time {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-code);
  white-space: nowrap;
}

.slider-card-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.38;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.slider-card-title a:hover {
  color: var(--color-secondary);
}

.slider-card-excerpt {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-card-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.slider-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.slider-card-tag {
  font-size: 10.5px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-code);
}

.slider-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.slider-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}

.slider-author-meta {
  display: flex;
  flex-direction: column;
}

.slider-author-meta strong {
  font-size: 12.5px;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.slider-author-meta span {
  font-size: 11px;
  color: var(--text-dim);
}

.slider-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-secondary);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.slider-read-btn:hover {
  background: var(--color-secondary);
  color: #06080f;
  border-color: var(--color-secondary);
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

.slider-read-btn i {
  transition: transform 0.2s ease;
}

.slider-read-btn:hover i {
  transform: translateX(3px);
}

/* Slider Footer & Dots */
.blog-slider-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.blog-slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.slider-dot.active {
  width: 26px;
  background: var(--color-secondary);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.45);
}

.blog-slider-hint {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Responsive Breakpoints for Slider */
@media (max-width: 991px) {
  .home-blogs-heading {
    font-size: 28px;
  }
  .blog-slider-card {
    padding: 22px 18px;
  }
}

@media (max-width: 767px) {
  .home-blogs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .home-blogs-heading {
    font-size: 24px;
  }
  .home-blogs-controls {
    width: 100%;
    justify-content: space-between;
  }
  .blog-slider-footer {
    justify-content: center;
  }
  .blog-slider-hint {
    display: none;
  }
}



