/* ==========================================================================
   AI TOOLDEX - ORIGINAL POKÉDEX COLOR SYSTEM (LIGHT METRIC THEME)
   ========================================================================== */

:root {
  --bg-color: #e5e7eb;
  --panel-bg: #ffffff;
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-border-hover: rgba(0, 0, 0, 0.15);
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  
  /* Original Pokédex Theme Colors */
  --pokedex-red: #dc0a2d;      /* Scarlet Kanto Red */
  --pokedex-red-hover: #b00824;
  --pokedex-blue: #00a2f9;     /* Big camera eye blue */
  --pokedex-yellow: #ffde00;   /* Light yellow indicator */
  --pokedex-green: #51ae5f;    /* Light green indicator */
  
  --accent-color: #dc0a2d;
  --accent-glow: rgba(220, 10, 45, 0.15);
  
  /* Category Colors (Pastel / Lighter Shades) */
  --color-writing: #059669;    /* Emerald */
  --color-coding: #2563eb;     /* Blue */
  --color-image: #ea580c;      /* Orange */
  --color-video: #7c3aed;      /* Purple */
  --color-research: #0891b2;   /* Cyan */
  --color-automation: #dc2626; /* Red */
  --color-productivity: #ca8a04; /* Dark Yellow */
  
  /* New Excel Sheet Categories */
  --color-writing-text: #10b981;       /* Emerald Green */
  --color-coding-dev: #3b82f6;         /* Bright Blue */
  --color-image-art: #f97316;          /* Orange */
  --color-video-editing: #8b5cf6;      /* Violet */
  --color-audio-voice: #ec4899;        /* Rose Pink */
  --color-music-audio: #a855f7;        /* Purple */
  --color-research-search: #06b6d4;     /* Cyan */
  --color-data-analytics: #6366f1;     /* Indigo */
  --color-productivity-pres: #eab308;  /* Yellow */
  --color-design-ui: #14b8a6;          /* Teal */
  
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* App Wrapper Container */
.tooldex-app {
  background: radial-gradient(circle at 50% 50%, #f3f4f6 0%, #d1d5db 100%);
  width: 100vw;
  height: 100vh;
}

.tooldex-container {
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  width: 100%;
  height: 100%;
  border: 4px solid var(--pokedex-red);
  background-color: var(--pokedex-red);
  gap: 4px; /* Simulates plastic border gaps */
}

/* Panels Common */
.panel {
  background-color: var(--panel-bg);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--pokedex-red);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
}

.panel-section {
  padding: 24px;
  border-bottom: 1px solid var(--panel-border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* LEFT PANEL: Discovery Radar */
.left-panel {
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

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

.dex-brand h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pokedex-red);
}

/* Pokédex Style Indicator Lights */
.dex-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--pokedex-blue);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(0, 162, 249, 0.6);
  position: relative;
}

.dex-indicator-small {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
}

.red-glow { background-color: var(--pokedex-red); box-shadow: 0 0 6px var(--pokedex-red); }
.blue-glow { background-color: var(--pokedex-blue); box-shadow: 0 0 6px var(--pokedex-blue); }
.yellow-glow { background-color: var(--pokedex-yellow); box-shadow: 0 0 6px var(--pokedex-yellow); }

.device-model {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Radar Scanner Area */
.radar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(0, 162, 249, 0.04) 0%, transparent 70%);
}

.radar-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid #8c8c8c;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #232323; /* Classic dark display inside red casing */
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.radar-grid {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, transparent 20%, rgba(0, 162, 249, 0.1) 21%, rgba(0, 162, 249, 0.1) 22%, transparent 23%),
    radial-gradient(circle, transparent 50%, rgba(0, 162, 249, 0.1) 51%, rgba(0, 162, 249, 0.1) 52%, transparent 53%),
    radial-gradient(circle, transparent 80%, rgba(0, 162, 249, 0.1) 81%, rgba(0, 162, 249, 0.1) 82%, transparent 83%);
}

.radar-grid::before,
.radar-grid::after {
  content: '';
  position: absolute;
  background-color: rgba(0, 162, 249, 0.15);
}

.radar-grid::before {
  top: 0; bottom: 0; left: 50%; width: 1px;
}

.radar-grid::after {
  left: 0; right: 0; top: 50%; height: 1px;
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(0, 162, 249, 0.3) 0deg, transparent 90deg, transparent 360deg);
  border-radius: 50%;
  transform-origin: center;
  animation: sweep 4s linear infinite;
  pointer-events: none;
}

.radar-center {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--pokedex-blue);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--pokedex-blue);
}

#radar-visualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scanner-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--pokedex-green);
  box-shadow: 0 0 6px var(--pokedex-green);
}

.status-dot.pulsing {
  animation: pulse-green 1.5s infinite;
}

.status-text {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Metric Progress Rows */
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pokedex-blue) 0%, var(--pokedex-green) 100%);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Category Filter pills */
.category-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.filter-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background-color: #e5e7eb;
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--pokedex-red);
  color: #fff;
  border-color: var(--pokedex-red);
}

.filter-btn .cat-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.filter-btn .cat-label-wrap {
  display: flex;
  align-items: center;
}

.filter-btn .cat-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.filter-btn.active .cat-count {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* CENTER PANEL: Main Tool Collection & Canvas */
.center-panel {
  background-color: #eef2f7; /* Soft light-blue/gray backdrop for cards */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.search-overlay-container {
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  pointer-events: none;
}

.search-box {
  background-color: #ffffff;
  border: 2px solid var(--pokedex-red);
  border-radius: 24px;
  padding: 2px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  transition: var(--transition-smooth);
  max-width: 500px;
  margin: 0 auto;
}

.search-box:focus-within {
  box-shadow: 0 4px 20px rgba(220, 10, 45, 0.2);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 0;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

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

/* Canvas Viewport */
.three-canvas-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Slider Controls */
.viewport-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  border: 2px solid var(--pokedex-red);
  border-radius: 20px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.nav-arrow-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-smooth);
}

.nav-arrow-btn:hover {
  color: var(--pokedex-red);
  transform: scale(1.2);
}

.deck-index-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}

.current-index {
  color: var(--pokedex-red);
}

.index-separator {
  color: var(--text-muted);
}

.total-count {
  color: var(--text-secondary);
}

/* RIGHT PANEL: Profile Display */
.right-panel {
  border-right: none;
  background-color: #ffffff;
}

.no-selection-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  position: relative;
  background-color: #f9fafb;
}

.pokedex-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.hint-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hint-icon {
  font-size: 32px;
  opacity: 0.4;
}

.hint-container h3 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.hint-container p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 200px;
}

/* Profile Detail Layout */
.profile-scroll-container {
  overflow-y: auto;
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header {
  border-bottom: 2px solid var(--pokedex-red);
  padding-bottom: 16px;
}

.profile-number {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.profile-badges {
  display: flex;
  gap: 8px;
}

.badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.category-badge {
  background-color: var(--pokedex-red);
  color: #fff;
}

.price-badge {
  background-color: #f3f4f6;
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
}

/* Stat chart container */
.stats-chart-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--panel-border);
}

.stats-visualization {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid-item {
  background-color: #f9fafb;
  border: 1px solid var(--panel-border);
  padding: 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grid-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.grid-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.link-value {
  color: var(--pokedex-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.link-value:hover {
  text-decoration: underline;
}

/* Prompt tab UI */
.prompt-tabs {
  background-color: #f9fafb;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.tab-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--panel-border);
  background-color: #e5e7eb;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  padding: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.tab-btn.active {
  color: var(--pokedex-red);
  background-color: #ffffff;
  border-bottom: 2px solid var(--pokedex-red);
}

.prompt-box {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-box pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #065f46;
  background: #ecfdf5;
  padding: 10px;
  border-radius: 4px;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.4;
  border: 1px solid #a7f3d0;
}

.copy-prompt-btn {
  align-self: flex-end;
  background-color: var(--pokedex-red);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.copy-prompt-btn:hover {
  background-color: var(--pokedex-red-hover);
}

/* Tips and lists */
.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-list li {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  padding-left: 14px;
}

.tips-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--pokedex-red);
  font-size: 10px;
  top: 1px;
}

/* Alternatives list */
.alternatives-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.alt-card {
  background-color: #f9fafb;
  border: 1px solid var(--panel-border);
  padding: 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.alt-card:hover {
  background-color: #e5e7eb;
  border-color: var(--pokedex-red);
}

/* Animations */
@keyframes sweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--pokedex-green);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 2px var(--pokedex-green);
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .tooldex-container {
    grid-template-columns: 280px 1fr;
    grid-template-rows: 1fr 320px;
  }
  .right-panel {
    grid-column: 1 / 3;
    height: 320px;
  }
}
@media (max-width: 768px) {
  .tooldex-container {
    display: flex;
    flex-direction: column;
  }
  .left-panel {
    display: none;
  }
  .center-panel {
    height: 60vh;
  }
  .right-panel {
    height: 40vh;
  }
}

/* Sound Toggle Button & Controls */
.header-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.sound-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.sound-toggle-btn:hover {
  background-color: #e5e7eb;
}

.sound-toggle-btn:active {
  transform: scale(0.95);
}

.sound-btn-text {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.sound-wave-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--pokedex-red);
  box-shadow: 0 0 5px var(--pokedex-red);
  transition: var(--transition-smooth);
}

.sound-toggle-btn.enabled .sound-wave-dot {
  background-color: var(--pokedex-green);
  box-shadow: 0 0 6px var(--pokedex-green);
  animation: pulse-green 1.5s infinite;
}

.sound-toggle-btn.enabled {
  border-color: rgba(81, 174, 95, 0.4);
  background-color: rgba(81, 174, 95, 0.05);
}

