body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f9fafb;
}

main {
  flex: 1;
}

/* Tab System */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  font-size: 0.75rem;
}

#mobileMenu {
  display: none;
}

#mobileMenu.open {
  display: block;
}

/* Color Extractor Core */
.picker-cursor {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.color-text-dark {
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.color-text-light {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.color-swatch-text {
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  padding: 0.25rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 0.25rem;
}

/* Harmony Colors */
.harmony-color {
  width: 60px;
  height: 60px;
  display: inline-block;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #c3c6d7;
}

/* Gradient Preview */
.gradient-preview {
  width: 100%;
  height: 80px;
  border-radius: 12px;
  margin: 10px 0;
  border: 1px solid #c3c6d7;
}

/* Pattern Grid */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.pattern-cell {
  aspect-ratio: 1/1;
  border-radius: 8px;
}

/* Branding Preview */
.branding-preview {
  border: 1px solid #c3c6d7;
  border-radius: 12px;
  padding: 15px;
  margin: 10px 0;
}

/* Blindness Simulator */
.blindness-comparison {
  display: flex;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.blindness-swatch {
  flex: 1;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tab Content Overflow */
#variationsContent, #harmonyContent, #blindnessContent,
#patternsContent, #gradientsContent, #brandingContent, #advancedContent {
  overflow: hidden;
  height: auto;
  max-height: none;
}

/* UI Prototype Styles */
.prototype-preview-container {
  min-height: 500px;
  position: relative;
  transition: all 0.3s ease;
}

.prototype-ui {
  --p-primary: #004ac6;
  --p-secondary: #505f76;
  --p-accent: #2563eb;
  --p-bg: #ffffff;
  --p-text: #131b2e;
  --p-surface: #f2f3ff;
  
  background-color: var(--p-bg);
  color: var(--p-text);
  font-family: 'Inter', sans-serif;
  height: 100%;
  width: 100%;
}

.prototype-ui.dark-mode {
  --p-bg: #131b2e;
  --p-text: #eef0ff;
  --p-surface: #283044;
}

.proto-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--p-surface);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.proto-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--p-primary);
}

.proto-hero {
  padding: 4rem 2rem;
  text-align: center;
}

.proto-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--p-primary);
}

.proto-hero p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.8;
}

.proto-btn-primary {
  background-color: var(--p-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  display: inline-block;
  transition: opacity 0.2s;
}

.proto-btn-secondary {
  border: 2px solid var(--p-secondary);
  color: var(--p-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  display: inline-block;
  margin-left: 1rem;
}

.proto-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.proto-card {
  background-color: var(--p-surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.05);
}

.proto-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 1rem;
}

.proto-card h3 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Dashboard Template */
.proto-dash-sidebar {
  width: 60px;
  background-color: var(--p-primary);
  height: 100%;
}

.proto-dash-main {
  flex: 1;
  padding: 1.5rem;
}

.proto-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.proto-stat-card {
  background-color: var(--p-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--p-secondary);
}

.proto-chart-placeholder {
  background-color: var(--p-surface);
  height: 200px;
  border-radius: 0.75rem;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  gap: 0.5rem;
}

.proto-bar {
  flex: 1;
  background-color: var(--p-primary);
  border-radius: 0.25rem 0.25rem 0 0;
  opacity: 0.6;
}

/* Mobile Template */
.proto-mobile-container {
  max-width: 300px;
  margin: 0 auto;
  border: 8px solid #283044;
  border-radius: 2rem;
  height: 500px;
  overflow: hidden;
  background-color: var(--p-bg);
}

@keyframes marching-ants {
  0% {
    background-position: 0 0, 0 100%, 0 0, 100% 0;
  }
  100% {
    background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px;
  }
}

.selection-box {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  background-color: rgba(0, 74, 198, 0.05);
  
  /* Animated dual-color border */
  background-image: 
    linear-gradient(90deg, #004ac6 50%, #ffffff 50%),
    linear-gradient(90deg, #004ac6 50%, #ffffff 50%),
    linear-gradient(0deg, #004ac6 50%, #ffffff 50%),
    linear-gradient(0deg, #004ac6 50%, #ffffff 50%);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: 8px 2px, 8px 2px, 2px 8px, 2px 8px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  animation: marching-ants 0.3s linear infinite;
}

.cursor-selection {
  cursor: crosshair !important;
}

#enableSelection.active {
  background-color: #004ac6;
  color: white;
}

/* Psychology & Accessibility */
.trait-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.trait-positive {
  background-color: rgba(34, 197, 94, 0.1);
  color: #166534;
}

.trait-negative {
  background-color: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.fix-btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-right: 0.4rem;
  font-weight: 500;
}

.fix-btn-aa {
  background-color: #dcfce7;
  color: #166534;
}

.fix-btn-aaa {
  background-color: #d1fae5;
  color: #065f46;
  font-weight: bold;
}

.fix-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

.psychology-card {
  border-left: 4px solid #004ac6;
  background-color: #f2f3ff;
  transition: transform 0.2s ease;
}

.psychology-card:hover {
  transform: translateX(4px);
}

/* Tailwind Config Block */
#tailwindConfigCode {
  color: #a5b4fc;
}

#tailwindConfigCode .property { color: #f472b6; }
#tailwindConfigCode .string { color: #34d399; }
#tailwindConfigCode .comment { color: #737686; }

pre::-webkit-scrollbar {
  height: 6px;
}

pre::-webkit-scrollbar-thumb {
  background: #434655;
  border-radius: 3px;
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #004ac6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
