/* ToolForge Pro - Global Styles */

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
  /* Colors */
  --color-primary: #6C63FF;
  --color-primary-hover: #5A52E0;
  --color-secondary: #FF6584;
  --color-accent: #43E97B;
  --color-bg: #F8F9FF;
  --color-surface: #FFFFFF;
  --color-surface-2: #F0F1FF;
  --color-border: #E2E4F3;
  --color-text: #1A1B3A;
  --color-text-muted: #6B7280;
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;
  
  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(20px);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(26, 27, 58, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 27, 58, 0.12);
  --shadow-lg: 0 12px 32px rgba(26, 27, 58, 0.16);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --color-bg: #0D0D1A;
  --color-surface: #1A1B2E;
  --color-surface-2: #252640;
  --color-border: #2D2E4A;
  --color-text: #F0F1FF;
  --color-text-muted: #9CA3AF;
  --glass-bg: rgba(26, 27, 46, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

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

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  animation: fadeUp 0.6s ease forwards;
}

/* ==================== LAYOUT ==================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4rem 2rem;
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
}

.theme-toggle {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--color-primary);
  color: white;
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

.announcement-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.social-proof {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--color-primary);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: var(--color-secondary);
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: var(--color-accent);
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

/* ==================== STATS BAR ==================== */
.stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 1200px;
  margin: -3rem auto 4rem;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== TOOLS GRID ==================== */
.tools-section {
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.tool-card-featured {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border: none;
}

.tool-card-featured .tool-name,
.tool-card-featured .tool-description {
  color: white;
}

.tool-icon {
  font-size: 3rem;
  line-height: 1;
}

.tool-name {
  font-size: 1.25rem;
  font-weight: 600;
}

.tool-description {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  flex-grow: 1;
}

.tool-card-featured .tool-description {
  color: rgba(255, 255, 255, 0.9);
}

/* ==================== BUTTONS ==================== */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.btn-ghost {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: var(--color-primary);
  color: white;
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
}

.badge-category {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.badge-success {
  background: var(--color-success);
  color: white;
}

.badge-error {
  background: var(--color-error);
  color: white;
}

/* ==================== FEATURES SECTION ==================== */
.features-section {
  max-width: 1280px;
  margin: 4rem auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-muted);
}

/* ==================== YOUTUBE SPOTLIGHT ==================== */
.youtube-spotlight {
  background: linear-gradient(135deg, #FF0000, #CC0000);
  padding: 4rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  color: white;
  margin: 4rem auto;
  max-width: 1280px;
}

.youtube-spotlight h2 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.youtube-spotlight p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.spotlight-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  max-width: 800px;
  margin: 2rem auto;
}

.spotlight-feature {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
}

/* ==================== TESTIMONIALS ==================== */
.testimonials-section {
  max-width: 1280px;
  margin: 4rem auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.testimonial-rating {
  color: var(--color-warning);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: var(--color-text);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-name {
  font-weight: 600;
}

.author-role {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ==================== FAQ ==================== */
.faq-section {
  max-width: 800px;
  margin: 4rem auto;
}

.faq-container {
  margin-top: 2rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.faq-item summary:hover {
  background: var(--color-surface-2);
}

.faq-item p {
  padding: 0 1.5rem 1.5rem;
  color: var(--color-text-muted);
}

/* ==================== CTA BANNER ==================== */
.cta-banner {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-xl);
  color: white;
  max-width: 1280px;
  margin: 4rem auto;
}

.cta-banner h2 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ==================== FORM ELEMENTS ==================== */
.input, .textarea, .select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: var(--transition);
  font-size: 1rem;
}

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

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-code);
}

.checkbox, .radio {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  min-width: 300px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideInRight 0.3s ease;
  color: white;
  font-weight: 500;
}

.toast-success {
  background: var(--color-success);
}

.toast-error {
  background: var(--color-error);
}

.toast-warning {
  background: var(--color-warning);
}

.toast-info {
  background: var(--color-info);
}

/* ==================== CARDS ==================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.card-tool {
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* ==================== UTILITY CLASSES ==================== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface-2);
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.skeleton-loader {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-border) 50%, var(--color-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.adsense-ad {
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  min-height: 100px;
}

.code-block {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: var(--font-code);
  font-size: 0.875rem;
  overflow-x: auto;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
}

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

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-item::after {
  content: '/';
  margin-left: 0.5rem;
}

.breadcrumb-item:last-child::after {
  content: '';
}

/* ==================== TAB SYSTEM ==================== */
.tab-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab {
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.875rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    min-height: 60vh;
  }
  
  .stats-bar {
    flex-direction: column;
  }
  
  .toast-container {
    right: 1rem;
    left: 1rem;
  }
  
  .toast {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2rem 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}