@import url(../fonts/stylesheet.css);

:root {
  /* Light theme colors */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --background: #f0f4ff;
  --surface: rgba(255, 255, 255, 0.5);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --text-primary: #2c3e50;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: rgba(220, 225, 230, 0.8);
  --border-focus: var(--primary-color);
  --success: #10b981;
  --error: #ef4444;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  --gradient-bg: linear-gradient(
    135deg,
    rgb(220, 225, 245),
    rgb(205, 215, 240),
    rgb(225, 215, 245)
  );
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme colors */
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #312e81;
    --background: #0f172a;
    --surface: rgba(30, 41, 59, 0.9);
    --surface-hover: rgba(30, 41, 59, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(51, 65, 85, 0.8);
    --border-focus: var(--primary-color);
    --success: #22d3ee;
    --error: #f87171;
    --gradient-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --glass-bg: rgba(30, 41, 59, 0.25);
    --glass-border: rgba(148, 163, 184, 0.18);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter 18pt", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: clamp(14px, 1.5vw, 16px);
}

.container {
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 2rem);
  max-width: 1400px;
  margin: 0 auto;
}

/* Header Styles */
.directory-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.directory-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  letter-spacing: -0.025em;
}

.directory-title i {
  color: var(--primary-color);
  margin-right: clamp(0.5rem, 2vw, 1rem);
}

.directory-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(clamp(280px, 30vw, 350px), 1fr)
  );
  gap: clamp(1.5rem, 3vw, 2rem);
  padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.tool-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: clamp(16px, 2vw, 24px);
  padding: clamp(1.5rem, 4vw, 2rem);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-hover)
  );
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

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

.tool-icon {
  width: clamp(3rem, 6vw, 4rem);
  height: clamp(3rem, 6vw, 4rem);
  background: var(--primary-light);
  border-radius: clamp(8px, 1.5vw, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-icon i {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--primary-color);
}

.tool-card:hover .tool-icon {
  background: var(--primary-color);
  transform: scale(1.1);
}

.tool-card:hover .tool-icon i {
  color: white;
}

.tool-title {
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
  letter-spacing: -0.025em;
}

.tool-description {
  color: var(--text-secondary);
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.6;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.feature-tag {
  padding: clamp(0.25rem, 1vw, 0.375rem) clamp(0.5rem, 2vw, 0.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(4px, 1vw, 6px);
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-weight: 500;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tool-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.25rem);
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: clamp(8px, 1.5vw, 12px);
  font-weight: 600;
  font-size: clamp(0.875rem, 2vw, 1rem);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: auto;
}

.tool-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.tool-link i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-link:hover i {
  transform: translateX(4px);
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.tool-card:nth-child(1) {
  animation-delay: 0.1s;
}
.tool-card:nth-child(2) {
  animation-delay: 0.2s;
}
.tool-card:nth-child(3) {
  animation-delay: 0.3s;
}
.tool-card:nth-child(4) {
  animation-delay: 0.4s;
}
.tool-card:nth-child(5) {
  animation-delay: 0.5s;
}
.tool-card:nth-child(6) {
  animation-delay: 0.6s;
}
.tool-card:nth-child(7) {
  animation-delay: 0.7s;
}
.tool-card:nth-child(8) {
  animation-delay: 0.8s;
}
.tool-card:nth-child(9) {
  animation-delay: 0.9s;
}
.tool-card:nth-child(10) {
  animation-delay: 1s;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

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