/* ===========================================
   CHROMA.MAL+ - Color & Design Toolkit
   Cyberpunk Aesthetic - Orange/Blue Theme
   =========================================== */

/* CSS Variables */
:root {
  --primary: #FF7800;
  --primary-light: #FF9A40;
  --primary-dark: #CC6000;
  --secondary: #00BFFF;
  --secondary-light: #40D4FF;
  --secondary-dark: #0099CC;
  
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --bg-input: #0d0d14;
  
  --border: #2a2a3a;
  --border-light: #3a3a4a;
  
  --text-primary: #ffffff;
  --text-secondary: #b4b4c4;
  --text-muted: #6a6a7a;
  
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --info: #3b82f6;
  
  --glow-primary: rgba(255, 120, 0, 0.4);
  --glow-secondary: rgba(0, 191, 255, 0.4);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* Background Effects */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(255, 120, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 191, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 120, 0, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.color-orbs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.color-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(20px, 30px) scale(1.05); }
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
}

.logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.logo-white {
  color: var(--text-primary);
}

.logo-plus {
  color: var(--primary);
  text-shadow: 0 0 20px var(--glow-primary), 0 0 40px var(--glow-primary);
}

.tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.neon-btn {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.neon-btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--glow-primary);
}

.flavor-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.flavor-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Quick Color Bar */
.quick-color-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.quick-color-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-color-preview {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all 0.3s;
}

.quick-color-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  transition: all 0.3s;
}

.quick-color-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 120, 0, 0.1);
}

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

.quick-color-btn,
.quick-random-btn {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-color-btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
  border-color: var(--primary);
}

.quick-random-btn:hover {
  background: var(--secondary);
  color: var(--bg-dark);
  border-color: var(--secondary);
}

.quick-color-btn i,
.quick-random-btn i {
  width: 20px;
  height: 20px;
}

.quick-color-output {
  margin-top: 12px;
  display: none;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-color-output.visible {
  display: flex;
}

.quick-output-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-output-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.quick-output-chip i {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.quick-output-chip:hover i {
  opacity: 1;
}

/* Category Navigation */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
  padding: 0 10px;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}

.category-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.category-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
}

.category-btn i {
  width: 16px;
  height: 16px;
}

.category-btn .count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
}

.category-btn.active .count {
  background: rgba(0, 0, 0, 0.2);
}

/* Tools Container - now just a wrapper */
.tools-container {
  /* Grid moved to .tools-grid inside */
}

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.tool-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tool-card.wide {
  grid-column: span 2;
}

@media (max-width: 800px) {
  .tool-card.wide {
    grid-column: span 1;
  }
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.tool-icon i {
  width: 20px;
  height: 20px;
}

.tool-icon.blue {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.tool-icon.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tool-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.tool-icon.pink {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.tool-title {
  flex: 1;
}

.tool-title h3 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tool-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tool-body {
  padding: 20px;
}

/* Form Elements */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group select,
.input-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 120, 0, 0.1);
}

.input-group select {
  cursor: pointer;
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-row .input-group {
  flex: 1;
}

/* Base Color Input Styling (global) */
input[type="color"] {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: none;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 2px solid var(--border);
  border-radius: 6px;
}

/* Color Input with Preview */
.color-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-input-wrapper input[type="text"] {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.color-input-wrapper input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 120, 0, 0.1);
}

/* Range Slider */
.range-group {
  margin-bottom: 16px;
}

.range-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.range-group label span {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

.range-group input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

.range-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.range-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Buttons */
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px var(--glow-primary);
}

.tool-btn i {
  width: 16px;
  height: 16px;
}

.tool-btn.secondary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.tool-btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.tool-btn.blue {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.tool-btn.blue:hover {
  box-shadow: 0 5px 20px var(--glow-secondary);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tool Result */
.tool-result {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 120, 0, 0.05);
  border: 1px solid rgba(255, 120, 0, 0.15);
  border-radius: 8px;
  display: none;
}

.tool-result.visible {
  display: block;
}

.tool-result h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-result h4 i {
  width: 16px;
  height: 16px;
}

/* Color Swatch (display block for single-color previews) */
.color-swatch-display {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.color-swatch-display.large {
  height: 100px;
}

.color-swatch-display::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right,
    rgba(0,0,0,0.1) 0%,
    transparent 20%,
    transparent 80%,
    rgba(255,255,255,0.1) 100%
  );
  pointer-events: none;
}

/* Palette Display */
.palette-row {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.palette-color {
  flex: 1;
  height: 60px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.palette-color:hover {
  transform: scaleY(1.1);
  z-index: 1;
}

.palette-color-label {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.palette-color:hover .palette-color-label {
  opacity: 1;
}

/* Code Block */
.code-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.code-copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.code-copy-btn i {
  width: 12px;
  height: 12px;
}

/* Color Grid (item styles only -- grid layout defined in tools.css) */

.color-grid-item {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.color-grid-item:hover {
  transform: scale(1.05);
  z-index: 1;
}

.color-grid-item .label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  text-align: center;
  padding: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 3px;
}

/* Harmony Wheel */
.harmony-wheel-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.harmony-wheel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    hsl(0, 100%, 50%),
    hsl(60, 100%, 50%),
    hsl(120, 100%, 50%),
    hsl(180, 100%, 50%),
    hsl(240, 100%, 50%),
    hsl(300, 100%, 50%),
    hsl(360, 100%, 50%)
  );
  position: relative;
}

.harmony-wheel::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: var(--bg-card);
  border-radius: 50%;
}

/* Tabs */
.tool-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tool-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}

.tool-tab:hover {
  color: var(--text-secondary);
}

.tool-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Accessibility Badge */
.a11y-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.a11y-badge.pass {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.a11y-badge.fail {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.a11y-badge i {
  width: 14px;
  height: 14px;
}

/* Info Tooltip */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.6rem;
  cursor: help;
  margin-left: 6px;
}

/* Copy Toast */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: var(--bg-dark);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.copy-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Support Section */
.support-section {
  margin-top: 60px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.support-content h4 {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.support-content h4 .inline-icon {
  width: 20px;
  height: 20px;
}

.support-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.qr-link {
  display: inline-block;
}

.qr-image {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.qr-image:hover {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--glow-primary);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  text-decoration: none;
}

.footer-mal {
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
}

.footer-plus {
  color: var(--primary);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
}

.footer-stats {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
}

.footer-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Spacing/text utilities defined in tools.css */

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  header {
    padding: 30px 15px;
  }
  
  .quick-color-inner {
    flex-wrap: wrap;
  }
  
  .quick-color-preview {
    width: 44px;
    height: 44px;
  }
  
  .quick-color-input {
    flex: 1 1 100%;
    order: 2;
  }
  
  .quick-color-btn,
  .quick-random-btn {
    width: 44px;
    height: 44px;
  }
  
  .tool-body {
    padding: 15px;
  }
  
  .input-row {
    flex-direction: column;
  }
  
  .support-section {
    padding: 30px 20px;
  }
}

/* Animation Classes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Print Styles */
@media print {
  .bg-gradient,
  .color-orbs,
  .nav-links,
  .category-nav,
  .quick-color-bar,
  .support-section,
  footer {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .container {
    max-width: 100%;
  }
  
  .tool-card {
    break-inside: avoid;
  }
}

/* =========================
   Welcome Landing Section
   ========================= */
.welcome-section {
  max-width: 1000px;
  margin: 0 auto;
}

.welcome-hero {
  text-align: center;
  padding: 40px 20px;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px var(--glow-primary);
}

.welcome-icon i {
  width: 40px;
  height: 40px;
  color: white;
}

.welcome-hero h2 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.welcome-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.welcome-feature:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 120, 0, 0.1);
  border: 1px solid rgba(255, 120, 0, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon i {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.welcome-feature h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome-feature p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.welcome-cta {
  text-align: center;
  padding: 30px 0;
}

.tool-btn.large {
  padding: 16px 32px;
  font-size: 1rem;
}

.tool-btn.large i {
  width: 20px;
  height: 20px;
}

.welcome-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Import & Export Data Section */
.welcome-data-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.welcome-data-inner {
  text-align: center;
}

.welcome-data-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 120, 0, 0.1);
  border: 1px solid rgba(255, 120, 0, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.welcome-data-icon i {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.welcome-data-section h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.welcome-data-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.welcome-data-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.welcome-data-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.welcome-data-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.welcome-data-card > i:first-child {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.welcome-data-card div {
  flex: 1;
}

.welcome-data-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.welcome-data-card span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.welcome-data-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.welcome-categories {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.welcome-categories h3 {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.welcome-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.welcome-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-category-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.welcome-category-card .cat-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 120, 0, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-category-card .cat-icon i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.welcome-category-card .cat-info {
  flex: 1;
}

.welcome-category-card .cat-name {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.welcome-category-card .cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.welcome-category-card .cat-arrow {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.welcome-category-card .cat-arrow i {
  width: 16px;
  height: 16px;
}

.welcome-category-card:hover .cat-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* Back to Home Button */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
}

.back-home-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.back-home-btn i {
  width: 16px;
  height: 16px;
}

/* Support Note */
.support-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================
   Tools View Enhancements
   ========================= */

/* Home button in nav */
.category-btn.home-btn {
  background: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

.category-btn.home-btn:hover {
  background: var(--secondary);
  color: var(--bg-dark);
}

/* Tools header */
.tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tools-category-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.tools-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Tools grid (replacing tools-container grid) */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

@media (max-width: 440px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .tools-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* =========================
   Sidebar Tools Layout
   ========================= */

.tools-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 600px;
}

/* Mobile toolbar (hidden on desktop) */
.mobile-toolbar {
  display: none;
}

/* Sidebar */
.tools-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-count {
  background: var(--primary);
  color: var(--bg-dark);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}

.sidebar-search {
  position: relative;
  margin-bottom: 12px;
}

.sidebar-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.sidebar-search input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.8rem;
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-category-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.sidebar-category-label:first-child {
  margin-top: 0;
}

.sidebar-category-label i {
  width: 12px;
  height: 12px;
}

.tool-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-sidebar-item:hover {
  background: var(--bg-card-hover);
}

.tool-sidebar-item.active {
  background: rgba(255, 120, 0, 0.15);
  border-left: 3px solid var(--primary);
  margin-left: -3px;
}

.sidebar-item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

.sidebar-item-icon.orange { background: rgba(255, 120, 0, 0.15); color: var(--primary); }
.sidebar-item-icon.blue { background: rgba(0, 191, 255, 0.15); color: var(--secondary); }
.sidebar-item-icon.green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.sidebar-item-icon.purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.sidebar-item-icon.pink { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.sidebar-item-icon i {
  width: 16px;
  height: 16px;
}

.sidebar-item-info {
  flex: 1;
  min-width: 0;
}

.sidebar-item-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.tool-sidebar-item.active .sidebar-item-name {
  color: var(--primary);
}

/* Main content area */
.tools-content {
  flex: 1;
  min-width: 0;
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
}

.tool-panel .tool-card {
  max-width: 1200px;
}

.tool-panel .tool-card.active {
  border-color: var(--primary);
}

/* Scrollbar styling for sidebar */
.tools-sidebar::-webkit-scrollbar {
  width: 6px;
}

.tools-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.tools-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.tools-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Mobile responsive */
@media (max-width: 900px) {
  .tools-layout {
    display: block;
  }
  
  .mobile-toolbar {
    display: block;
    margin-bottom: 16px;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .mobile-menu-btn:hover {
    border-color: var(--primary);
  }
  
  .mobile-menu-btn i {
    width: 20px;
    height: 20px;
    color: var(--primary);
  }
  
  .tools-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .tools-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  
  .tool-panel .tool-card {
    max-width: 100%;
  }
}

/* Overlay for mobile sidebar */
.tools-sidebar.mobile-open::before {
  content: '';
  position: fixed;
  top: 0;
  left: 300px;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
