/* Import Modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: #090D16;
  --bg-panel: rgba(17, 24, 39, 0.7);
  --bg-sidebar: rgba(10, 15, 30, 0.85);
  --bg-card-inner: rgba(255, 255, 255, 0.02);
  --bg-toggle: #1F2937;
  --bg-input: rgba(0, 0, 0, 0.3);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.3);
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --accent-glow: 0 0 20px rgba(59, 130, 246, 0.4);
  
  --success: #10B981;
}

body.light-mode {
  --bg-main: #F3F4F6;
  --bg-panel: rgba(255, 255, 255, 0.75);
  --bg-sidebar: rgba(255, 255, 255, 0.85);
  --bg-card-inner: rgba(0, 0, 0, 0.02);
  --bg-toggle: #E5E7EB;
  --bg-input: rgba(255, 255, 255, 0.8);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(37, 99, 235, 0.15);
  
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  
  --accent-blue: #2563EB;
  --accent-purple: #7C3AED;
  --accent-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --accent-glow: 0 0 15px rgba(37, 99, 235, 0.2);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
}

/* Header Styles */
header {
  height: 70px;
  background-color: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  position: relative;
  transition: background-color 0.3s ease, border-bottom-color 0.3s ease;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  outline: none;
  flex: 1;
  max-width: 300px;
}

.header-middle {
  display: flex;
  justify-content: center;
  flex: 1;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  max-width: 300px;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: var(--accent-glow);
}

.logo-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.logo-text .mobile-subtitle {
  display: none;
}

/* Device Switcher */
.device-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 30px;
}

body.light-mode .device-switcher {
  background: rgba(0, 0, 0, 0.03);
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.device-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.device-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .device-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.device-btn.active {
  color: #FFFFFF;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Day/Night Theme Switcher Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 12px;
  outline: none;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

body.light-mode .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.light-mode .sun-icon {
  display: none;
}

body.light-mode .moon-icon {
  display: block !important;
  color: var(--text-primary);
}

/* App Main Layout */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebars Base Styling */
.sidebar-left, .sidebar-right {
  width: 300px;
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  z-index: 10;
  overflow: visible; /* Keep button visible outside sidebar */
  
  /* Hide Scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-left::-webkit-scrollbar, .sidebar-right::-webkit-scrollbar {
  display: none;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 252px; /* Fixed inside width to prevent content reflow wrapping */
  height: 100%;
  overflow-y: auto;
  transition: opacity 0.25s ease;
  
  /* Hide inner scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-content::-webkit-scrollbar {
  display: none;
}

.sidebar-left {
  border-right: 1px solid var(--border-color);
}

.sidebar-right {
  border-left: 1px solid var(--border-color);
}

.sidebar-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 4px;
}

/* Toggle Buttons for minimizing */
.toggle-btn {
  position: absolute;
  top: 20px;
  width: 28px;
  height: 28px;
  background: var(--bg-toggle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 20;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  background: var(--accent-blue);
  color: #fff;
}

#btn-toggle-left {
  right: -14px;
}

#btn-toggle-right {
  left: -14px;
}

/* Collapse States */
.sidebar-left.collapsed {
  width: 0;
  padding: 24px 0;
  border-right: none;
}

.sidebar-right.collapsed {
  width: 0;
  padding: 24px 0;
  border-left: none;
}

.sidebar-left.collapsed .sidebar-content,
.sidebar-right.collapsed .sidebar-content {
  opacity: 0;
  pointer-events: none;
}

.sidebar-left.collapsed #btn-toggle-left {
  right: -28px;
}

.sidebar-right.collapsed #btn-toggle-right {
  left: -28px;
}

/* Template Cards Grid */
.template-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: background 0.3s ease;
}

.template-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

body.light-mode .template-card:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Agency Active Style (Glassmorphism & Neon Glow) */
#card-agency.active {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
  transform: translateY(-2px);
}
#card-agency.active::before {
  background: linear-gradient(to bottom, #3B82F6, #8B5CF6);
  width: 4px;
}
#card-agency.active .card-title {
  color: #FFFFFF !important;
}
#card-agency.active .card-desc {
  color: #A78BFA !important;
}
#card-agency.active .card-meta {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #8B5CF6 !important;
}
#card-agency.active .card-style {
  color: #A78BFA !important;
}

/* Cafe Active Style (Warm Terracotta & Cozy Cream) */
#card-cafe.active {
  background: #FAF6F0 !important;
  border-color: #C96F53;
  border-width: 2px;
  box-shadow: 4px 4px 0px rgba(201, 111, 83, 0.15);
  transform: translateY(-2px);
}
#card-cafe.active::before {
  display: none;
}
#card-cafe.active .card-title {
  color: #2C2A29 !important;
}
#card-cafe.active .card-desc {
  color: #7E7873 !important;
}
#card-cafe.active .card-meta {
  border-top-color: rgba(44, 42, 41, 0.08);
  color: #C96F53 !important;
}
#card-cafe.active .card-style {
  color: #C96F53 !important;
  font-weight: 600;
}
#card-cafe.active .tag-cafe {
  background: #C96F53;
  color: #FFFFFF;
  border-color: #C96F53;
}

/* Consulting Active Style (Luxury Obsidian & Gold) */
#card-consulting.active {
  background: #0D0D0D !important;
  border-color: #C5A880;
  box-shadow: 0 6px 24px rgba(197, 168, 128, 0.2);
  transform: translateY(-2px);
}
#card-consulting.active::before {
  background: #C5A880;
  width: 4px;
}
#card-consulting.active .card-title {
  color: #FFFFFF !important;
}
#card-consulting.active .card-desc {
  color: #A68A62 !important;
}
#card-consulting.active .card-meta {
  border-top-color: rgba(255, 255, 255, 0.05);
  color: #C5A880 !important;
}
#card-consulting.active .card-style {
  color: #C5A880 !important;
}
#card-consulting.active .tag-consulting {
  background: #C5A880;
  color: #0D0D0D;
  border-color: #C5A880;
}

/* Creative Active Style (Neobrutalism Morphing) */
#card-creative.active {
  background: #FDC800;
  border-color: #1C293C;
  border-width: 2px;
  box-shadow: 4px 4px 0px #1C293C;
  transform: translate(-2px, -2px);
}
#card-creative.active::before {
  display: none;
}
#card-creative.active .card-title {
  color: #1C293C;
}
#card-creative.active .card-desc {
  color: #3E4E68;
}
#card-creative.active .card-meta {
  border-top: 1px solid rgba(28, 41, 60, 0.15);
  color: #3E4E68;
}
#card-creative.active .card-style {
  color: #1C293C;
  font-weight: 700;
}
#card-creative.active .tag-creative {
  background: #1C293C;
  color: #FDC800;
  border: 1px solid #1C293C;
}

/* LMS Active Style (Bright Indigo / Modern Academic) */
#card-lms.active {
  background: #F5F7FF !important;
  border-color: #4F46E5;
  border-width: 2px;
  box-shadow: 4px 4px 0px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}
#card-lms.active::before {
  display: none;
}
#card-lms.active .card-title {
  color: #1F2937 !important;
}
#card-lms.active .card-desc {
  color: #4B5563 !important;
}
#card-lms.active .card-meta {
  border-top-color: rgba(79, 70, 229, 0.1);
  color: #4F46E5 !important;
}
#card-lms.active .card-style {
  color: #4F46E5 !important;
  font-weight: 600;
}
#card-lms.active .tag-lms {
  background: #4F46E5;
  color: #FFFFFF;
  border-color: #4F46E5;
}

.card-tag {
  display: inline-block;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.tag-agency {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.tag-cafe {
  background: rgba(232, 149, 88, 0.15);
  color: #FDBA74;
  border: 1px solid rgba(232, 149, 88, 0.3);
}

.tag-consulting {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-creative {
  background: rgba(253, 200, 0, 0.15);
  color: #FDC800;
  border: 1px solid rgba(253, 200, 0, 0.3);
}

.tag-lms {
  background: rgba(79, 70, 229, 0.15);
  color: #6366F1;
  border: 1px solid rgba(79, 70, 229, 0.3);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

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

.card-style {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Brand Customizer Section */
.customizer-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.customizer-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 32px 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all 0.3s ease;
}

.customizer-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  background: var(--bg-input);
}

body.light-mode .customizer-input:focus {
  background: #FFFFFF;
}

.btn-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.btn-clear:hover {
  color: var(--text-primary);
}

.customizer-help {
  font-size: 10px;
  color: var(--accent-blue);
  font-weight: 500;
}

/* Accent Color Customizer */
.color-picker-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.color-dot:hover {
  transform: scale(1.1);
}

.color-dot.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.light-mode .color-dot.active {
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* Rainbow Custom Picker Trigger */
.color-dot.custom-picker-btn {
  background: linear-gradient(135deg, red, orange, yellow, green, blue, purple);
  position: relative;
}

/* Hidden native color picker */
.hidden-color-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Details and Info Box */
.details-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
}

.details-box h4 {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.details-box ul {
  padding-left: 16px;
  color: var(--text-secondary);
}

/* Floating contact Button */
.sidebar-cta-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--accent-glow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sidebar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

/* Pulse CTA Keyframes & Class */
@keyframes ctaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulse-cta {
  animation: ctaPulse 2s infinite;
}

/* Urgency & Trust Subtext */
.cta-urgency-tag {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Secondary CTA: Brochure Button */
.sidebar-secondary-cta-btn {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px dashed var(--border-color);
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-secondary-cta-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* SEO FAQ Accordion Styling */
.seo-faq-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-bottom: 8px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-input);
  transition: border-color 0.3s ease;
}

.faq-item.active {
  border-color: var(--accent-blue);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
  outline: none;
}

.faq-question::after {
  content: '+';
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question {
  color: var(--accent-blue);
}

.faq-item.active .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  padding: 0 12px;
}

.faq-item.active .faq-answer {
  max-height: 120px; /* Safe maximum height */
  padding: 0 12px 10px 12px;
  border-top: 1px solid var(--border-color);
}

.faq-answer p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 8px 0 0 0;
}


/* Preview Screen Area */
.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme background styles */
.preview-area.theme-agency {
  background-color: #060911;
  background-image: radial-gradient(circle at 50% 50%, #0e172a 0%, #060911 100%);
}

.preview-area.theme-cafe {
  background-color: #ECE3D4;
  background-image: radial-gradient(circle at 50% 50%, #FAF6F0 0%, #ECE3D4 100%);
}

.preview-area.theme-consulting {
  background-color: #080808;
  background-image: radial-gradient(circle at 50% 50%, #1A1A1A 0%, #080808 100%);
}

.preview-area.theme-creative {
  background-color: #E2E1D9;
  background-image: radial-gradient(circle at 50% 50%, #FAF9F6 0%, #E2E1D9 100%);
}

.preview-area.theme-lms {
  background-color: #EEF2FF;
  background-image: radial-gradient(circle at 50% 50%, #FFFFFF 0%, #E0E7FF 100%);
}

/* Device Wrapper with dynamic width transition */
.device-container {
  width: 100%;
  height: 100%;
  background: #111827;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px var(--border-glow, rgba(59, 130, 246, 0));
  border: 4px solid var(--border-color-custom, #1F2937);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

/* Device mock address bar */
.device-top-bar {
  height: 32px;
  background: var(--border-color-custom, #1F2937);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.4s ease;
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mock-dot:nth-child(1) { background: #EF4444; }
.mock-dot:nth-child(2) { background: #F59E0B; }
.mock-dot:nth-child(3) { background: #10B981; }

.mock-address {
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  height: 18px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  position: relative;
}

/* Address bar tooltip */
.address-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(59, 130, 246, 0.15);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

/* Tiny arrow pointing up */
.address-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent rgba(15, 23, 42, 0.95) transparent;
}

/* Show tooltip on address bar hover or focus */
.mock-address-input:hover + .address-tooltip,
.mock-address-input:focus + .address-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Editable Mock Address Input */
.mock-address-input {
  width: 100%;
  height: 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  text-align: center;
  outline: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.mock-address-input:focus {
  color: #FFFFFF;
}

/* IFrame style */
.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #FFFFFF;
}

/* Size indicators */
.device-container.desktop {
  width: 100%;
  height: 100%;
}

.device-container.tablet {
  width: 768px;
  height: 95%;
}

.device-container.mobile {
  width: 375px;
  height: 85%;
  border-radius: 36px;
  border-width: 10px;
  border-color: #1F2937;
}

.device-container.mobile .device-top-bar {
  height: 40px;
  justify-content: center;
}

.device-container.mobile .mock-address {
  display: none;
}

.device-container.mobile .mock-dot-container {
  display: none;
}

/* Mobile home bar mock */
.device-container.mobile::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  pointer-events: none;
}

.device-container.mobile .preview-iframe {
  height: calc(100% - 12px);
}

/* Info footer */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: border-color 0.3s ease;
}

.sidebar-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.sidebar-footer a:hover {
  text-decoration: underline;
}

/* Customizer Textarea Styles */
.customizer-textarea {
  width: 100%;
  height: 80px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
  transition: all 0.3s ease;
}

.customizer-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  background: var(--bg-input);
}

body.light-mode .customizer-textarea:focus {
  background: #FFFFFF;
}

/* Responsive adjustments for Hub UI itself */
@media (max-width: 992px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar-left, .sidebar-right {
    width: 100%;
    height: auto;
    border: none;
    backdrop-filter: none;
  }
  .sidebar-left {
    border-bottom: 1px solid var(--border-color);
  }
  .sidebar-right {
    border-top: 1px solid var(--border-color);
  }
  .toggle-btn {
    display: none; /* Hide toggle buttons on tablet/mobile layout */
  }
  .preview-area {
    padding: 16px;
    height: 500px;
  }
  .device-container.tablet {
    width: 100%;
  }
}

/* Mobile-First Bottom Sheet Layout (< 768px) */
.mobile-bar {
  display: none;
}
.sheet-overlay {
  display: none;
}

@media (max-width: 768px) {
  /* Logo Mobile Optimization */
  .logo-link {
    max-width: 200px;
  }

  .logo-text .brand-suffix {
    display: none;
  }

  .logo-text .desktop-subtitle {
    display: none;
  }

  .logo-text .mobile-subtitle {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    letter-spacing: 0.3px;
    width: max-content;
  }

  body.light-mode .logo-text .mobile-subtitle {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
    color: var(--accent-blue);
  }

  /* Hide desktop parts */
  .device-switcher {
    display: none !important;
  }
  
  .header-right-placeholder {
    display: none !important;
  }

  .app-container {
    position: relative;
    height: calc(100vh - 70px);
    overflow: hidden;
  }

  .preview-area {
    padding: 0 !important;
    height: 100% !important;
    width: 100% !important;
  }

  .device-container {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .device-top-bar {
    display: none !important; /* Hide address bar on mobile screen */
  }

  /* Style Sidebars as Bottom Sheets */
  .sidebar-left, .sidebar-right {
    position: fixed;
    bottom: -100% !important; /* Start offscreen */
    left: 0;
    width: 100% !important;
    height: 65vh !important;
    z-index: 150 !important;
    border: none !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6) !important;
    transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: none !important;
    padding: 24px 20px 80px 20px !important;
  }

  .sidebar-left.sheet-open, .sidebar-right.sheet-open {
    bottom: 60px !important; /* Open just above bottom nav bar */
  }

  .sidebar-content {
    width: 100% !important;
    height: 100%;
    overflow-y: auto;
  }

  .toggle-btn {
    display: none !important; /* Hide desktop minimize buttons */
  }

  /* Bottom Bar Styling */
  .mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 160;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 10px;
    transition: background-color 0.3s ease;
  }

  .mobile-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
  }

  .mobile-tab-btn svg {
    color: var(--text-secondary);
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .mobile-tab-btn:hover svg {
    transform: translateY(-2px);
  }

  .mobile-tab-btn.active {
    color: var(--accent-blue);
  }

  .mobile-tab-btn.active svg {
    color: var(--accent-blue);
  }

  .mobile-cta-fab {
    background: var(--accent-gradient);
    color: #fff !important;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--accent-glow);
    transition: all 0.2s ease;
  }

  .mobile-cta-fab:active {
    transform: scale(0.95);
  }

  .sheet-overlay {
    position: fixed;
    top: 70px; /* Below header */
    left: 0;
    width: 100vw;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: block;
  }

  .sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Add drag handle decoration for bottom sheets */
  .sidebar-left::after, .sidebar-right::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
  }
}

/* Share link secondary button */
.sidebar-secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  width: 100%;
  outline: none;
}

.sidebar-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

body.light-mode .sidebar-secondary-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar-secondary-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Exit Intent Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-box {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
  outline: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-badge {
  font-size: 9px;
  font-weight: 800;
  background: var(--accent-gradient);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  box-shadow: var(--accent-glow);
}

.modal-box h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.modal-box p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-cta-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--accent-glow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.modal-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

.modal-decline-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
  outline: none;
  transition: color 0.2s;
}

.modal-decline-btn:hover {
  color: var(--text-secondary);
}

/* Mock Browser Actions Header */
.mock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* Push to the right end */
}

.mock-action-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.mock-action-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Reset Customizer Button */
.reset-link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  outline: none;
}

.reset-link-btn:hover {
  color: var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.1);
}

/* Fullscreen Simulator Active States */
body.fullscreen-active header {
  display: none !important;
}

body.fullscreen-active .sidebar-left,
body.fullscreen-active .sidebar-right {
  display: none !important;
}

body.fullscreen-active .mobile-bar {
  display: none !important;
}

body.fullscreen-active .preview-area {
  padding: 0 !important;
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  background: #000000 !important;
}

body.fullscreen-active .device-container {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body.fullscreen-active .device-top-bar {
  display: none !important; /* Hide simulator address bar for real-world feel */
}

body.fullscreen-active .preview-iframe {
  height: 100% !important;
}

/* Floating Exit Button for Fullscreen */
.exit-fullscreen-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  outline: none;
}

.exit-fullscreen-float-btn:hover {
  transform: scale(1.05);
  background: var(--accent-gradient);
  border-color: transparent;
}

/* Guided Tour Hotspot & Stepper Tooltip Styling */
.tour-hotspot {
  position: absolute;
  width: 14px;
  height: 14px;
  display: none; /* Hidden by default */
  z-index: 25;
}

body.tour-active .tour-hotspot.step-active {
  display: block;
}

.hotspot-dot {
  width: 14px;
  height: 14px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-blue);
  cursor: help;
  position: relative;
}

.hotspot-dot::before {
  content: '';
  position: absolute;
  top: -9px;
  left: -9px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: hotspotPulse 1.8s infinite ease-out;
  pointer-events: none;
  box-sizing: border-box;
}

#btn-tour-toggle.active {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

@keyframes hotspotPulse {
  0% {
    transform: scale(0.4);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Tooltip container */
.tour-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: var(--bg-sidebar);
  border: 1px solid var(--accent-blue);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  opacity: 1;
  transform: none;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-transform: none;
  letter-spacing: normal;
}

/* Align downwards for specific steps to prevent clipping */
.hotspot-templates .tour-tooltip,
.hotspot-brand .tour-tooltip,
.hotspot-color .tour-tooltip {
  bottom: auto;
  top: calc(100% + 8px);
  right: 0;
}

.tour-tooltip p {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.tour-tooltip-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.tour-next-btn {
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  outline: none;
}

.tour-next-btn:hover {
  opacity: 0.9;
}

.tour-skip-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
  outline: none;
}

.tour-skip-btn:hover {
  color: var(--text-secondary);
}

/* Placement configurations */
.hotspot-templates {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.hotspot-brand {
  top: 8px;
  right: 8px;
}

.hotspot-color {
  top: 8px;
  right: 8px;
}

.hotspot-cta {
  top: -4px;
  right: -4px;
}

/* Floating Promo Toast */
.promo-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-toast-container.show {
  transform: translateY(0);
  opacity: 1;
}

.promo-toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  outline: none;
  transition: color 0.2s;
}

.promo-toast-close:hover {
  color: var(--text-primary);
}

.promo-toast-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
}

.promo-toast-container h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 0 0;
}

.promo-toast-container p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.promo-toast-container strong {
  color: var(--text-primary);
}

.promo-toast-actions {
  margin-top: 8px;
}

.promo-toast-btn {
  display: block;
  width: 100%;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--accent-glow);
  transition: all 0.3s ease;
}

.promo-toast-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Hide when fullscreen presentation active */
body.fullscreen-active .promo-toast-container {
  display: none !important;
}

@media (max-width: 768px) {
  .promo-toast-container {
    left: 16px;
    right: 16px;
    bottom: 80px; /* Above mobile navigation bar */
    width: auto;
  }
}



