/* Import modern typography from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #0b0f19;
  --bg-sidebar: rgba(15, 23, 42, 0.65);
  --bg-card: rgba(30, 41, 59, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-color: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.25);
  
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, #090d16 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Header bar */
.top-header {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  z-index: 10;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-color), #10b981);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

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

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* Sidebar Config Panel */
.sidebar {
  width: 380px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px;
  gap: 20px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Form Groups & Cards */
.config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s;
}
.config-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

input[type="text"], 
textarea, 
select {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: white;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
input[type="text"]:focus, 
textarea:focus, 
select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Color Presets */
.color-picker-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-color-input {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  outline: none;
}

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

.preset-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}
.preset-dot:hover {
  transform: scale(1.15);
}
.preset-dot.active {
  border-color: white;
  transform: scale(1.1);
}

/* Preset Template Buttons */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.template-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.template-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
.template-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-color);
  color: #a5b4fc;
}

/* Embed Code Card */
.embed-box {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px;
  font-family: monospace;
  font-size: 11px;
  color: #10b981;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
  margin-top: 6px;
  user-select: all;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, #4f46e5 100%);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 10px var(--accent-glow);
}
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px var(--accent-glow);
}
.primary-btn:active {
  transform: translateY(0);
}

/* Main Workspace (Preview Area) */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  overflow: hidden;
}

.preview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.tab-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}
.tab-item.active {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

/* Mock Web Browser Frame */
.browser-mockup {
  flex: 1;
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.6);
  position: relative; /* Crucial for containment */
}

/* Mock Browser Header (Chrome/Safari style) */
.browser-chrome {
  height: 40px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.chrome-dot-red { background-color: #ef4444; }
.chrome-dot-yellow { background-color: #f59e0b; }
.chrome-dot-green { background-color: #10b981; }

.chrome-address-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  color: #94a3b8;
  max-width: 500px;
  margin: 0 auto;
}

/* Mock Web Page Viewport */
.browser-viewport {
  flex: 1;
  background: white;
  color: #334155;
  overflow-y: auto;
  position: relative; /* Restricts our absolute widget container */
}

/* DOCKING: Override widget to dock in browser viewport instead of screen bottom */
.browser-viewport .luminabot-widget-container {
  position: absolute !important;
  bottom: 20px !important;
  right: 20px !important;
}
.browser-viewport .luminabot-panel {
  bottom: 70px !important;
}

/* Mock Site 1: Smile Dental Clinic */
.mock-site-dental {
  font-family: 'Outfit', sans-serif;
  color: #1e293b;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.dental-hero {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  padding: 48px 32px;
  text-align: center;
}

.dental-hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 12px;
}

.dental-hero p {
  color: #0284c7;
  max-width: 500px;
  margin: 0 auto 20px;
  font-size: 14px;
}

.dental-btn {
  background-color: #0284c7;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.dental-features {
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dental-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.dental-card-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.dental-card h3 {
  font-size: 15px;
  color: #0f172a;
  margin-bottom: 8px;
}

.dental-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Mock Site 2: Iron Forge Gym */
.mock-site-gym {
  background-color: #0a0a0c;
  color: #f3f4f6;
  min-height: 100%;
  font-family: 'Outfit', sans-serif;
}

.gym-hero {
  padding: 56px 32px;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1517838277536-f5f99be501cd?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80') center/cover;
  border-bottom: 2px solid #ef4444;
}

.gym-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: white;
  text-transform: uppercase;
}

.gym-hero h1 span {
  color: #ef4444;
}

.gym-hero p {
  font-size: 13px;
  color: #9ca3af;
  margin: 10px 0 20px;
}

.gym-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.gym-pricing {
  padding: 32px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.gym-card {
  background-color: #16161a;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 24px;
  width: 200px;
  text-align: center;
}

.gym-card h3 {
  font-size: 16px;
  color: white;
}

.gym-price {
  font-size: 28px;
  font-weight: 800;
  color: #ef4444;
  margin: 12px 0;
}

.gym-card p {
  font-size: 11px;
  color: #9ca3af;
}

/* Mock Site 3: Apex Real Estate */
.mock-site-realtor {
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100%;
}

.realtor-header {
  padding: 16px 32px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.realtor-logo {
  font-weight: 700;
  color: #4f46e5;
  font-size: 18px;
}

.realtor-hero {
  padding: 40px 32px;
  background: linear-gradient(135deg, #e0e7ff 0%, #e0f2fe 100%);
  text-align: center;
}

.realtor-hero h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1e1b4b;
}

.realtor-listings {
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.realtor-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.realtor-img {
  height: 110px;
  background-size: cover;
  background-position: center;
}

.realtor-info {
  padding: 12px;
}

.realtor-price {
  font-size: 16px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 4px;
}

.realtor-address {
  font-size: 11px;
  color: #64748b;
}

/* Captured Leads Styles */
#site-leads-container table {
  width: 100%;
  border-collapse: collapse;
}

#site-leads-container th {
  padding: 12px 16px;
  background-color: #f8fafc;
  border-bottom: 2px solid #cbd5e1;
  font-weight: 600;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#site-leads-container td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: middle;
}

#site-leads-container tr:hover td {
  background-color: #f1f5f9;
}

.lead-delete-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lead-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.lead-delete-btn:active {
  transform: translateY(0);
}

