/*
 * ColorPicker.Codes - Premium SaaS Web Style Sheet
 * Google Fonts: Outfit (Headings) & Inter (Body)
 */

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

/* ==========================================
   CSS CUSTOM PROPERTIES & VARIABLES
   ========================================== */
:root {
  /* Common Brand Colors */
  --color-primary-rgb: 127, 0, 255; /* Purple */
  --color-secondary-rgb: 0, 240, 255; /* Cyan */
  --color-accent-rgb: 255, 0, 127; /* Pink */
  
  --rainbow-gradient: linear-gradient(90deg, #ff007f, #7f00ff, #00f0ff, #00ff7f, #ffea00, #ff007f);
  --rainbow-glow: 0 0 20px rgba(127, 0, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.2);

  /* Dark Theme Variables (Default) */
  --bg-main: #0b0f19;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-card: rgba(22, 30, 49, 0.85);
  --bg-glass: rgba(11, 15, 25, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.18);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #111827;
  
  --accent-cyan: #00f0ff;
  --accent-pink: #ff007f;
  --accent-purple: #9d4edd;
  
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-color: rgba(127, 0, 255, 0.15);
  --button-hover-shadow: 0 0 25px rgba(0, 240, 255, 0.5);

  --scroll-bar-color: #2a3447;
  --scroll-bar-thumb: #4b5563;
}

[data-theme="light"] {
  /* Light Theme Variables */
  --bg-main: #f8fafc;
  --bg-surface: rgba(241, 245, 249, 0.7);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-hover: rgba(15, 23, 42, 0.18);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent-cyan: #0ea5e9;
  --accent-pink: #db2777;
  --accent-purple: #7c3aed;
  
  --card-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.18);
  --glow-color: rgba(124, 58, 237, 0.06);
  --button-hover-shadow: 0 0 25px rgba(124, 58, 237, 0.3);

  --scroll-bar-color: #e2e8f0;
  --scroll-bar-thumb: #cbd5e1;
}

/* ==========================================
   RESET & SYSTEM STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.5s ease, color 0.5s ease;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--scroll-bar-color);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-bar-thumb);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Mouse-Follower Glow Container */
.mouse-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mouse-glow::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -250px);
  left: var(--mouse-x, -250px);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--glow-color) 0%, rgba(0,0,0,0) 70%);
  transform: translate(-50%, -50%);
  transition: top 0.1s ease-out, left 0.1s ease-out;
  will-change: transform;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
}

.rainbow-text {
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

/* Button & UI Interactions */
.btn-primary {
  position: relative;
  padding: 14px 28px;
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 9999px;
  box-shadow: var(--rainbow-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  animation: shine 4s linear infinite;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--button-hover-shadow);
  background-position: right center;
}

.btn-secondary {
  position: relative;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-main);
  transform: translateY(-2px);
}

/* ==========================================
   HEADER / STICKY NAVIGATION
   ========================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  animation: shine 4s linear infinite;
  opacity: 0.8;
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

header.scrolled::after {
  transform: scaleX(1);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  transition: padding 0.4s ease;
}

header.scrolled .nav-wrapper {
  padding: 8px 0;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--rainbow-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(127, 0, 255, 0.3);
}

.logo-text {
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

nav ul li a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
  padding: 8px 0;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--text-main);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rainbow-gradient);
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
  transform: rotate(20deg);
}

.theme-toggle .fa-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .fa-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .fa-sun {
  display: block;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  padding: 160px 0 100px 0;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 90vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: flex-start;
  flex-direction: column;
  gap: 24px;
}

.badge-rainbow {
  background: rgba(127, 0, 255, 0.15);
  border: 1px solid rgba(127, 0, 255, 0.3);
  padding: 6px 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.badge-rainbow span {
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.hero-title {
  font-size: 56px;
  line-height: 1.15;
  font-weight: 800;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.animated-illustration {
  width: 100%;
  max-width: 420px;
  height: 420px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at center, rgba(127, 0, 255, 0.1) 0%, transparent 70%);
}

#illustration-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================
   COLOR PICKER TOOL SECTION
   ========================================== */
.tool-section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-badge {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-pink);
}

.section-title {
  font-size: 38px;
  font-weight: 800;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
}

/* Grid layout for the main tool interface */
.tool-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.tool-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.upload-area {
  min-height: 420px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  background: var(--bg-surface);
  transition: border-color 0.3s ease, background-color 0.3s ease;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

[data-theme="light"] .upload-area {
  border: 2px dashed rgba(0, 0, 0, 0.12);
}

.upload-area.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.03);
}

.upload-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(127, 0, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
  transform: translateY(-5px);
}

.upload-text {
  text-align: center;
}

.upload-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-formats {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}

/* Image Workspace after upload */
.image-workspace {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.canvas-container {
  position: relative;
  width: 100%;
  max-height: 550px;
  border-radius: 12px;
  overflow: hidden;
  background: #1e1e1e;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}

#target-canvas {
  max-width: 100%;
  max-height: 520px;
  display: block;
  cursor: crosshair;
}

/* Custom magnifying loupe */
.magnifier-loupe {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  display: none;
  overflow: hidden;
  z-index: 100;
  background-color: #000;
}

#magnifier-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.workspace-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.active-color-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
}

.active-color-swatch {
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--card-shadow);
  position: relative;
}

.active-color-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-color-name {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-color-name .favorite-btn {
  font-size: 18px;
  color: var(--text-muted);
  transition: color 0.3s ease, transform 0.2s ease;
}

.active-color-name .favorite-btn:hover {
  transform: scale(1.2);
}

.active-color-name .favorite-btn.active {
  color: var(--accent-pink);
}

.color-grids {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.code-field {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

[data-theme="light"] .code-field {
  background: rgba(255, 255, 255, 0.5);
}

.code-field code {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
}

.btn-copy-small {
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-copy-small:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

/* Right side panel styles */
.tool-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dominant-colors-panel {
  padding: 24px;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dominant-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dominant-item {
  display: grid;
  grid-template-columns: 36px 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  transition: background-color 0.2s ease;
}

.dominant-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dominant-swatch {
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
}

.dominant-hex, .dominant-rgb {
  font-size: 13px;
  font-family: monospace;
}

/* Accessibility checker styles */
.accessibility-panel {
  padding: 24px;
}

.accessibility-rating-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.rating-box {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  text-align: center;
}

.rating-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.rating-value {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.rating-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.badge-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.contrast-ratio-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-size: 14px;
}

.contrast-ratio-num {
  font-weight: 800;
  font-size: 18px;
  color: var(--accent-cyan);
}

/* Generator & Palette layouts */
.palette-panel {
  padding: 24px;
}

.palette-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 8px;
}

.palette-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.palette-tab-btn.active {
  background: var(--text-main);
  color: var(--text-inverse);
  border-color: var(--text-main);
}

.palette-swatches-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  height: 80px;
  margin-bottom: 16px;
}

.palette-swatch-col {
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.palette-swatch-col:hover {
  transform: scale(1.05);
  z-index: 2;
}

.palette-export-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-export {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* Gradient generator layouts */
.gradient-panel {
  padding: 24px;
}

.gradient-preview {
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  margin-bottom: 16px;
  position: relative;
}

.gradient-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.select-control {
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  outline: none;
}

/* Palette History & Favorites panels */
.history-favorites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.history-panel, .favorites-panel {
  padding: 24px;
}

.fav-colors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fav-color-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.fav-color-circle:hover {
  transform: scale(1.15);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.history-thumbnail {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.history-info {
  flex: 1;
}

.history-date {
  font-size: 11px;
  color: var(--text-muted);
}

.history-swatches {
  display: flex;
  gap: 4px;
}

.history-swatch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ==========================================
   STATISTICS SECTION
   ========================================== */
.stats-section {
  padding: 80px 0;
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 40px 24px;
}

.stat-icon {
  font-size: 32px;
  background: var(--rainbow-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  display: inline-block;
}

.stat-number {
  font-size: 44px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 15px;
  color: var(--text-muted);
}

/* ==========================================
   FEATURE GRID
   ========================================== */
.features-section {
  padding: 80px 0;
}

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

.feature-card {
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(127, 0, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.feature-card:nth-child(even) .feature-icon {
  color: var(--accent-pink);
  background: rgba(255, 0, 127, 0.1);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================
   TESTIMONIALS (CAROUSEL)
   ========================================== */
.testimonials-section {
  padding: 80px 0;
  background: radial-gradient(circle at center, rgba(127, 0, 255, 0.05) 0%, transparent 60%);
}

.carousel-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  height: 320px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.testimonial-slide {
  min-width: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.client-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-cyan);
  object-fit: cover;
  margin-bottom: 20px;
}

.client-quote {
  font-size: 18px;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-main);
  max-width: 600px;
}

.client-name {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-pink);
}

.client-role {
  font-size: 13px;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--accent-cyan);
  opacity: 1;
  width: 24px;
  border-radius: 5px;
}

/* ==========================================
   WHY CHOOSE US (COMPARISON TABLE)
   ========================================== */
.why-us-section {
  padding: 80px 0;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  text-align: left;
}

thead {
  background: rgba(127, 0, 255, 0.1);
  border-bottom: 1px solid var(--border-glass);
}

th, td {
  padding: 20px 24px;
  font-size: 15px;
}

th {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

tr {
  border-bottom: 1px solid var(--border-glass);
}

tr:last-child {
  border-bottom: none;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.td-check {
  color: #10b981;
  font-size: 18px;
}

.td-cross {
  color: #ef4444;
  font-size: 18px;
}

/* ==========================================
   CTA BANNER SECTION
   ========================================== */
.cta-section {
  padding: 100px 0;
}

.cta-banner {
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(127, 0, 255, 0.4);
  animation: shine 6s linear infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 100%);
}

.cta-banner h2 {
  font-size: 40px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  font-size: 18px;
  max-width: 600px;
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.cta-banner .btn-secondary {
  background: #fff;
  color: #000;
  border: none;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.cta-banner .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==========================================
   SEO CONTENT SECTIONS
   ========================================== */
.seo-content {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border-glass);
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.seo-card {
  padding: 40px;
  margin-bottom: 24px;
}

.seo-card h2 {
  font-size: 28px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(127, 0, 255, 0.2);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.seo-card h3 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.seo-card p {
  margin-bottom: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

.seo-card ul, .seo-card ol {
  margin-left: 24px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.seo-card li {
  margin-bottom: 8px;
}

/* FAQ Layout */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.faq-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-answer {
  background: rgba(0, 0, 0, 0.1);
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: padding 0.3s ease, max-height 0.3s ease;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 20px 24px;
  max-height: 300px;
  border-top: 1px solid var(--border-glass);
}

.faq-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
footer {
  background: #07090e;
  border-top: 1px solid var(--border-glass);
  padding: 80px 0 40px 0;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  animation: shine 4s linear infinite;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.social-btn:hover {
  color: #fff;
  transform: translateY(-3px);
}

.social-btn.facebook:hover { background-color: #1877F2; border-color: #1877F2; }
.social-btn.instagram:hover { background-color: #E4405F; border-color: #E4405F; }
.social-btn.twitter:hover { background-color: #000000; border-color: #333; }
.social-btn.linkedin:hover { background-color: #0A66C2; border-color: #0A66C2; }

.footer-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.input-group {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.input-group input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  color: var(--text-main);
  outline: none;
}

.btn-subscribe {
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  color: #fff;
  font-weight: 600;
  padding: 0 20px;
  animation: shine 4s linear infinite;
  transition: background-position 0.3s ease;
}

.btn-subscribe:hover {
  background-position: right center;
}

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* ==========================================
   ABOUT / CONTACT / LEGAL PAGE TEMPLATES
   ========================================== */
.page-hero {
  padding: 140px 0 60px 0;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(127, 0, 255, 0.08) 0%, transparent 60%);
}

.page-hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.page-body {
  padding: 40px 0 100px 0;
}

.card-rich-text {
  padding: 48px;
  margin-bottom: 32px;
}

.card-rich-text h2 {
  font-size: 26px;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.card-rich-text h2:first-of-type {
  margin-top: 0;
}

.card-rich-text h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.card-rich-text p {
  margin-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.8;
}

.card-rich-text ul, .card-rich-text ol {
  margin-left: 24px;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.card-rich-text li {
  margin-bottom: 10px;
}

/* Contact form specifics */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(127, 0, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent-cyan);
}

.info-text h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.info-text p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid var(--accent-cyan);
  border-right: 1px solid var(--border-glass);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  color: var(--accent-cyan);
  font-size: 18px;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes shine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================
   RESPONSIVE LAYOUTS
   ========================================== */

/* Large screens and desktops */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 44px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets and medium viewports */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .badge-rainbow {
    align-self: center;
  }
  .hero-desc {
    margin: 0 auto;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-right {
    order: -1;
  }
  .animated-illustration {
    height: 300px;
  }
  nav ul {
    display: none; /* Mobile menu toggled via class */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 2px solid var(--border-glass);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  }
  nav.active ul {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .history-favorites-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile phones and small viewports */
@media (max-width: 480px) {
  .hero-title {
    font-size: 34px;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas button, .hero-ctas a {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-right .btn-secondary {
    display: none; /* hide upload button in navigation on mobile for space */
  }
  .active-color-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .active-color-swatch {
    height: 80px;
  }
  .palette-export-group {
    justify-content: center;
  }
  .palette-swatches-grid {
    height: 60px;
  }
}
