/* 
 * ThinkForge Component Library
 * Modern, tech-forward design system
 * Mobile-first, performance-optimized
 */

/* ========== COLOR SYSTEM ========== */
:root {
  /* Primary Brand Colors */
  --forge-50: #f0f9ff;
  --forge-100: #e0f2fe;
  --forge-400: #38bdf8;
  --forge-500: #06b6d4;
  --forge-600: #0891b2;
  --forge-700: #0e7490;
  --forge-900: #164e63;
  
  /* Secondary Colors */
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Dark Theme Backgrounds */
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --bg-tertiary: #2a2f4a;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ========== GLOBAL STYLES ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  color: white;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
.text-gradient {
  background: linear-gradient(135deg, var(--forge-500) 0%, var(--blue-500) 50%, var(--purple-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--forge-500) 0%, var(--blue-600) 100%);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--forge-500);
}

.btn-ghost {
  background: transparent;
  color: var(--forge-500);
  border: 1px solid var(--forge-500);
}

.btn-ghost:hover {
  background: rgba(6, 182, 212, 0.1);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ========== CARDS ========== */
.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--forge-500);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-flat {
  background: rgba(255, 255, 255, 0.03);
}

.card-elevated {
  box-shadow: var(--shadow-lg);
}

/* ========== INPUTS ========== */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--forge-500);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input::placeholder {
  color: var(--gray-500);
}

.textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  resize: vertical;
  transition: all var(--transition-fast);
}

.textarea:focus {
  outline: none;
  border-color: var(--forge-500);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background: linear-gradient(90deg, #10b981, #059669);
  color: white;
}

.badge-warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: white;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.badge-info {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: white;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .7;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}

/* ========== UTILITY CLASSES ========== */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow {
  box-shadow: var(--shadow-glow);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
  
  .section {
    padding: 5rem 2rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.navbar-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar-link {
  color: var(--gray-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.navbar-link:hover {
  color: var(--forge-500);
}

/* ========== FOOTER ========== */
.footer {
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ========== TOOL-SPECIFIC COMPONENTS ========== */
.tool-container {
  min-height: 100vh;
  padding-top: 5rem;
}

.tool-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tool-card {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.tool-section {
  margin-bottom: 2rem;
}

.tool-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-300);
  font-weight: 600;
}

.result-display {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* ========== MOBILE OPTIMIZATIONS ========== */
@media (max-width: 640px) {
  .btn {
    width: 100%;
  }
  
  .navbar-links {
    display: none; /* Hide on mobile, can add hamburger menu later */
  }
  
  .tool-card {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}
