/* ============================================
   IFAGENT EVENT IDEA TOOL — Design System
   Premium dark theme with glassmorphism
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  /* Brand Colors */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);

  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.3);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Surfaces */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(26, 26, 37, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(99, 102, 241, 0.4);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #818cf8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 30%, #06b6d4 70%, #10b981 100%);
  --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.05));
  --gradient-surface: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-glow-accent: 0 0 30px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--primary-light); }

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.bg-orb--1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; right: -200px;
  animation: orb-float 15s ease-in-out infinite;
}
.bg-orb--2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -100px; left: -100px;
  animation: orb-float 20s ease-in-out infinite reverse;
}
.bg-orb--3 {
  width: 300px; height: 300px;
  background: #8b5cf6;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-float 18s ease-in-out infinite 5s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav__logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  align-items: center;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}
.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
}
.nav__link--active {
  background: var(--bg-glass-hover);
}

/* --- Hero --- */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero__badge-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}

.hero__title-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--primary-glow);
}

.btn--secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn--icon {
  width: 40px; height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}
.card__icon--primary { background: rgba(99, 102, 241, 0.15); }
.card__icon--accent { background: rgba(6, 182, 212, 0.15); }
.card__icon--success { background: rgba(16, 185, 129, 0.15); }
.card__icon--warning { background: rgba(245, 158, 11, 0.15); }
.card__icon--danger { background: rgba(239, 68, 68, 0.15); }

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.card__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* --- Section --- */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* --- Idea Card --- */
.idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}
.idea-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.idea-card__visual {
  height: 200px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.idea-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.idea-card__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, var(--bg-card));
  z-index: 1;
  pointer-events: none;
}

.idea-card__body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.idea-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-bottom: var(--space-xs);
}

.idea-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.idea-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.idea-card__tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.tag--primary { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); color: var(--primary-light); }
.tag--accent { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); color: var(--accent-light); }
.tag--success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: var(--success); }

/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}
.upload-zone:hover,
.upload-zone--active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: var(--shadow-glow);
}

.upload-zone__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.7;
}

.upload-zone__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.upload-zone__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- Workflow Steps --- */
.workflow {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  overflow-x: auto;
}

.workflow-step {
  flex: 0 0 240px;
  text-align: center;
  position: relative;
}

.workflow-step__number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto var(--space-md);
  transition: all var(--transition-base);
}
.workflow-step--active .workflow-step__number {
  background: var(--gradient-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.workflow-step--done .workflow-step__number {
  background: var(--success);
  border-color: var(--success);
}

.workflow-step__connector {
  position: absolute;
  top: 24px;
  left: calc(50% + 30px);
  width: calc(100% - 20px);
  height: 2px;
  background: var(--border);
}
.workflow-step--active .workflow-step__connector,
.workflow-step--done .workflow-step__connector {
  background: var(--gradient-primary);
}

.workflow-step__label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.workflow-step__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Tab System (Module B) --- */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  border: none;
  background: transparent;
  font-family: inherit;
}
.tab:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}
.tab--active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content--active {
  display: block;
}

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

/* --- TV Screen Frame --- */
.tv-frame {
  width: 320px;
  height: 568px;
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.tv-frame--landscape {
  width: 568px;
  height: 320px;
}

.tv-frame__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tv-frame__content {
  height: calc(100% - 36px);
  overflow-y: auto;
  padding: var(--space-md);
}

/* --- Match Results --- */
.match-result {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.match-result:hover {
  border-color: var(--border-active);
  background: var(--bg-glass-hover);
}

.match-result__score {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.match-result__score--high { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.match-result__score--mid { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.match-result__score--low { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.match-result__info { flex: 1; }
.match-result__name { font-weight: 600; font-size: 0.9rem; }
.match-result__category { font-size: 0.75rem; color: var(--text-muted); }

/* --- Progress Bar --- */
.progress {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Agent Chip --- */
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition-base);
}
.agent-chip--active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: var(--shadow-glow);
}
.agent-chip--done {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.agent-chip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.agent-chip--active .agent-chip__dot {
  background: var(--primary);
  animation: pulse-dot 1s ease-in-out infinite;
}
.agent-chip--done .agent-chip__dot {
  background: var(--success);
}

/* --- Stats --- */
.stats {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat__value {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Footer --- */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__text {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer__brand {
  font-weight: 700;
  color: var(--text-secondary);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-secondary); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.mono { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }

/* --- Animations --- */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-up { animation: slideUp 0.6s ease forwards; }
.animate-up-delay-1 { animation: slideUp 0.6s ease 0.1s forwards; opacity: 0; }
.animate-up-delay-2 { animation: slideUp 0.6s ease 0.2s forwards; opacity: 0; }
.animate-up-delay-3 { animation: slideUp 0.6s ease 0.3s forwards; opacity: 0; }
.animate-up-delay-4 { animation: slideUp 0.6s ease 0.4s forwards; opacity: 0; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero__title { font-size: 2rem; }
  .hero__actions { flex-direction: column; align-items: center; }
  .nav__links { gap: var(--space-sm); }
  .stats { gap: var(--space-lg); }
  .workflow { flex-wrap: wrap; justify-content: center; }
  .workflow-step__connector { display: none; }
}
