:root {
  /* Premium Dark Theme */
  --bg-dark: #0f1115;
  --bg-panel: #16181d;
  --bg-card: #1e2128;
  --bg-card-hover: #262a33;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  /* Accents */
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.2);
  --accent-crimson: #e11d48;
  --accent-teal: #14b8a6;
  --accent-emerald: #10b981;
  
  /* Borders & Glass */
  --border-light: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(30, 33, 40, 0.7);
  --blur: blur(12px);

  /* Status Colors */
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-indigo);
  text-decoration: none;
  transition: all 0.2s;
}

a:hover {
  text-decoration: underline;
  color: #818cf8;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

a.sidebar-header,
.sidebar-header {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}

a.sidebar-header:hover {
  color: var(--text-main);
  text-decoration: none;
  opacity: 0.85;
}

.sidebar-header .logo-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-crimson));
  border-radius: 6px;
}

.nav-menu {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-item.active {
  border-right: 3px solid var(--accent-indigo);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(99,102,241,0.05) 0%, transparent 50%);
}

.topbar {
  height: 80px;
  padding: 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover.interactive {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  border-color: rgba(255,255,255,0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-indigo);
  color: white;
  box-shadow: 0 0 15px var(--accent-indigo-glow);
}

.btn-primary:hover {
  background: #4f46e5;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent-indigo);
  border: 1px solid var(--accent-indigo);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--status-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--status-warning); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--status-error); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--status-info); }
.badge-indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.badge-outline { border: 1px solid var(--border-light); color: var(--text-muted); }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.text-success { color: var(--status-success); }
.text-error { color: var(--status-error); }
.text-warning { color: var(--status-warning); }
.text-indigo { color: var(--accent-indigo); }
.text-muted { color: var(--text-muted); }

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  background: rgba(0,0,0,0.1);
}

.empty-state h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* User Avatar Dropdown Area */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.dot-live { background-color: var(--status-success); box-shadow: 0 0 8px var(--status-success); }
.dot-idle { background-color: var(--text-muted); }
.dot-error { background-color: var(--status-error); }

/* Rating stars */
.rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #fbbf24; /* yellow-400 */
  font-size: 0.875rem;
  font-weight: 500;
}

.rating-stars {
  letter-spacing: 1px;
}

.rating-count {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* Author / Developer specific styles */
.vendor-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vendor-avatar {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Agent Studio & Property Grid --- */
.property-group {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.property-header {
    background: rgba(255,255,255,0.03);
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}
.property-row {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border-light);
}
.property-row:last-child {
    border-bottom: none;
}
.property-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.property-value {
    font-size: 0.8125rem;
    color: var(--text-main);
}

.library-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    transition: all 0.2s;
}
.library-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent-indigo);
}
.library-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.console-container {
    background: #090a0f;
    border-top: 1px solid var(--border-light);
    height: 180px;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    overflow-y: auto;
    flex-shrink: 0;
}
.console-line {
    margin-bottom: 0.35rem;
    display: flex;
    gap: 1rem;
    line-height: 1.4;
}
.console-time { color: var(--text-muted); opacity: 0.5; }
.console-tag { font-weight: 700; font-size: 0.7rem; }
.tag-thought { color: #c678dd; }
.tag-tool { color: #61afef; }
.tag-system { color: #98c379; }

/* --- Marketing Site Specifics --- */

.marketing-hero {
    position: relative;
    padding: 120px 0 80px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(225, 29, 72, 0.08) 0%, transparent 40%);
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-indigo);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-indigo-glow);
    border-radius: 99px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, #fff 10%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px);
}

.section-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-indigo);
    margin-bottom: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.feature-card {
    padding: 3rem;
    text-align: left;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-indigo-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--accent-indigo);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-text {
    color: var(--text-muted);
    line-height: 1.6;
}

.two-track-section {
    padding: 8rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.track-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.track-box {
    padding: 4rem;
    border-radius: 32px;
}

.builder-track {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.consumer-track {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(225, 29, 72, 0.1);
}

.track-image {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-light);
}

.cta-button {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-strip {
    padding: 4rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.trust-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.trust-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

footer {
    padding: 6rem 0 3rem;
    text-align: center;
}

.mockup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 4rem auto 0;
}

.mockup-item {
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.mockup-item:hover {
    border-color: var(--accent-indigo);
    background: var(--bg-card-hover);
}

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

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

