/* 
========================================================================
   STYLE.CSS - PREMIUM DARK GLASSMORPHIC DESIGN SYSTEM
   Provides state-of-the-art UI styling, responsive layouts,
   glowing accents, and custom micro-animations for the playground.
========================================================================
*/

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

/* --- Design Tokens & Variables --- */
:root {
  /* Color Palette */
  --bg-deep: #08090d;
  /* High-opacity surfaces retain the glass aesthetic without runtime backdrop blur. */
  --bg-surface: rgba(17, 19, 28, 0.95);
  --bg-card: rgba(28, 30, 43, 0.88);
  --border-color: rgba(255, 255, 255, 0.15); /* Increased contrast from 0.08 */
  --border-glow: rgba(139, 92, 246, 0.2);
  
  /* Brand/Accent Gradients */
  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --grad-surface: linear-gradient(145deg, rgba(20, 22, 32, 0.6) 0%, rgba(10, 11, 17, 0.75) 100%);
  --grad-glow: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15) 0%, transparent 60%);

  /* UI Feedback States */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Theme Text & Component Colors (Dark Mode Defaults) (F-36) */
  --text-main: #f1f5f9;
  --text-muted: #cbd5e1; /* Increased contrast from #94a3b8 */
  --text-brand: linear-gradient(to right, #fff, #cbd5e1);
  --header-bg: rgba(10, 11, 18, 0.4);
  --sidebar-border: rgba(255, 255, 255, 0.18);
  --avatar-bg: rgba(255, 255, 255, 0.03);
  --popover-bg: rgba(10, 11, 18, 0.96);
  --popover-border: rgba(139, 92, 246, 0.2);
  --popover-color: #f1f5f9;
  --suggestion-card-bg: rgba(139, 92, 246, 0.05);
  --suggestion-card-border: rgba(139, 92, 246, 0.15);
  --user-bubble-bg: rgba(139, 92, 246, 0.15);
  --user-bubble-border: rgba(139, 92, 246, 0.25);
  --assistant-bubble-bg: rgba(255, 255, 255, 0.03);
  --assistant-bubble-border: var(--border-color);
  --pre-bg: rgba(0, 0, 0, 0.4);
  --pre-border: var(--border-color);
  --pre-color: #f1f5f9;
  --pill-bg: rgba(255, 255, 255, 0.02);
  --pill-border: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(10, 11, 18, 0.6);
  --input-bg-focus: rgba(10, 11, 18, 0.85);
  --input-color: #ffffff;
  --input-panel-bg: rgba(10, 11, 18, 0.6);
  --modal-bg: rgba(28, 30, 43, 0.9);
  --scrollbar-thumb: rgba(139, 92, 246, 0.5); /* Increased contrast from 0.3 */
  --scrollbar-track: rgba(255, 255, 255, 0.02);
  --focus-ring-color: #c4b5fd;

  /* AI Refinery context bar variables (Dark Mode) */
  --agent-context-bar-bg: rgba(0, 0, 0, 0.2);
  --agent-pill-bg: rgba(255, 255, 255, 0.02);
  --agent-pill-border: rgba(255, 255, 255, 0.08);
  --agent-bubble-context-bg: rgba(0, 0, 0, 0.25);
  --agent-bubble-context-border: rgba(255, 255, 255, 0.05);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout Constants */
  --sidebar-width: 360px;
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 
                    0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-sidebar: 5px 0 30px rgba(0, 0, 0, 0.25);
}

/* --- Light Mode Design System overrides (F-36) --- */
html[data-theme="light"] {
  /* Color Palette Overrides */
  --bg-deep: #e2e8f0; /* Darker slate background for better card contrast in light mode */
  --bg-surface: rgba(255, 255, 255, 0.98);
  --bg-card: rgba(248, 250, 252, 0.95);
  --border-color: rgba(0, 0, 0, 0.16); /* Increased contrast from 0.08 */
  --border-glow: rgba(139, 92, 246, 0.15);

  /* Brand/Accent Gradients Overrides */
  --primary: #6d28d9; /* darker violet for better text contrast in light mode */
  --primary-hover: #5b21b6;
  --accent-cyan: #0891b2;
  --accent-pink: #db2777;
  --grad-primary: linear-gradient(135deg, #6d28d9 0%, #0891b2 100%);
  --grad-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(243, 244, 246, 0.9) 100%);
  --grad-glow: radial-gradient(circle at top right, rgba(109, 40, 217, 0.08) 0%, transparent 60%);

  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 
                    0 1px 1px 0 rgba(255, 255, 255, 1) inset;
  --shadow-sidebar: 5px 0 30px rgba(0, 0, 0, 0.06);

  /* Theme Text & Component Color Overrides */
  --text-main: #0f172a; /* Darker slate-900 for text contrast */
  --text-muted: #334155; /* Darker slate-700 for labels/secondary text */
  --text-brand: linear-gradient(to right, #0f172a, #475569);
  --header-bg: rgba(255, 255, 255, 0.4);
  --sidebar-border: rgba(0, 0, 0, 0.16);
  --avatar-bg: rgba(0, 0, 0, 0.03);
  --popover-bg: rgba(255, 255, 255, 0.98);
  --popover-border: rgba(0, 0, 0, 0.1);
  --popover-color: #0f172a;
  --suggestion-card-bg: rgba(109, 40, 217, 0.05);
  --suggestion-card-border: rgba(109, 40, 217, 0.15);
  --user-bubble-bg: rgba(109, 40, 217, 0.08);
  --user-bubble-border: rgba(109, 40, 217, 0.18);
  --assistant-bubble-bg: rgba(255, 255, 255, 0.8);
  --assistant-bubble-border: rgba(0, 0, 0, 0.12);
  --pre-bg: rgba(0, 0, 0, 0.03);
  --pre-border: rgba(0, 0, 0, 0.12);
  --pre-color: #0f172a;
  --pill-bg: rgba(0, 0, 0, 0.02);
  --pill-border: rgba(0, 0, 0, 0.1);
  --input-bg: #f1f5f9; /* Slate-100 for input background contrast */
  --input-bg-focus: #ffffff; /* White active input state */
  --input-color: #0f172a;
  --input-panel-bg: rgba(255, 255, 255, 0.55);
  --modal-bg: rgba(255, 255, 255, 0.98);
  --scrollbar-thumb: rgba(109, 40, 217, 0.5); /* Increased contrast from 0.3 */
  --scrollbar-track: rgba(0, 0, 0, 0.02);
  --focus-ring-color: #6d28d9;

  /* AI Refinery context bar variables (Light Mode) */
  --agent-context-bar-bg: rgba(0, 0, 0, 0.03);
  --agent-pill-bg: rgba(0, 0, 0, 0.03);
  --agent-pill-border: rgba(0, 0, 0, 0.08);
  --agent-bubble-context-bg: rgba(0, 0, 0, 0.02);
  --agent-bubble-context-border: rgba(0, 0, 0, 0.06);
}

/* --- Base Resets & Global Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

body {
  background-color: var(--bg-deep);
  background-image: var(--grad-glow);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}



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

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--grad-primary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.brand-logo svg {
  fill: #fff;
}

.brand h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: var(--text-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-version {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary-hover);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: center;
  line-height: 1;
  letter-spacing: 0.05em;
  margin-left: 2px;
  flex-shrink: 0;
}


.btn-generate {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.btn-generate:active {
  transform: translateY(1px);
}

/* ========================================================================
   F-25: LANDING & HOME PAGE STYLES
   Adds custom styles for the premium glassmorphic onboarding landing page,
   glowing background elements, teaser workspace mockup, and animations.
   ======================================================================== */

.landing-container {
  display: block; /* Shown by default */
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  color: #f1f5f9;
  font-family: var(--font-body);
  z-index: 100;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background glows */
.lp-bg-glow-1 {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 35vw;
  height: 35vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.lp-bg-glow-2 {
  position: absolute;
  top: 45%;
  right: 5%;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.07) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.lp-content-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
.lp-navbar {
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

/* Hero Section */
.lp-hero {
  text-align: center;
  max-width: 800px;
  margin: 40px auto 60px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: lpFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.lp-badge {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-hover);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
}

.lp-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #94a3b8;
  line-height: 1.6;
  max-width: 650px;
}

.lp-hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.lp-hero-btn-primary {
  padding: 14px 28px !important;
  font-size: 1.05rem !important;
}

.lp-hero-btn-secondary {
  padding: 14px 28px !important;
  font-size: 1.05rem !important;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  border-radius: var(--border-radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lp-hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

/* Teaser Mockup Section */
.lp-teaser-section {
  width: 100%;
  margin-bottom: 80px;
  perspective: 1000px;
  animation: lpFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.lp-mockup-frame {
  background: rgba(10, 11, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 
              0 0 1px 1px rgba(139, 92, 246, 0.15) inset;
  overflow: hidden;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  transform: rotateX(5deg);
  transition: transform 0.5s ease, border-color 0.5s ease;
}

.lp-mockup-frame:hover {
  transform: rotateX(0deg) translateY(-5px);
  border-color: rgba(139, 92, 246, 0.3);
}

.lp-mockup-header {
  height: 44px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.lp-mockup-dots {
  display: flex;
  gap: 6px;
  position: absolute;
  left: 16px;
}

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

.lp-mockup-tab {
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #fff;
}

.lp-mockup-body {
  padding: 16px;
  height: 380px;
}

.lp-mockup-layout {
  display: grid;
  grid-template-columns: 80px 1fr 200px;
  gap: 16px;
  height: 100%;
}

/* Mockup Sidebar */
.lp-mockup-sidebar {
  border-right: 1px solid var(--border-color);
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-mockup-item {
  height: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.lp-mockup-item.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

/* Mockup Workspace */
.lp-mockup-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lp-mockup-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-mockup-minimal-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.lp-mockup-pill {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 20px;
  color: #cbd5e1;
}

.lp-mockup-text-line {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.lp-mockup-output {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px;
  height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mockup Refinery */
.lp-mockup-refinery {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-mockup-refinery-header {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  color: var(--primary-hover);
  margin-bottom: 4px;
}

/* Features Grid */
.lp-features {
  margin-bottom: 80px;
  animation: lpFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
}

.lp-section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #f1f5f9;
}

.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.lp-feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
  cursor: default;
}

.lp-feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 
              0 0 1px 1px rgba(139, 92, 246, 0.1) inset;
}

.lp-feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--border-radius-md);
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-feature-card h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.lp-feature-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Footer */
.lp-footer {
  margin-top: auto;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* Responsive layout adjustments */
@media(max-width: 768px) {
  .lp-mockup-layout {
    grid-template-columns: 1fr;
  }
  .lp-mockup-sidebar, .lp-mockup-refinery {
    display: none;
  }
  .lp-hero-actions-wrapper {
    width: 100%;
    max-width: 320px;
  }
}

