:root {
  --primary-color: #6366f1; /* Indigo 500 */
  --primary-hover: #4f46e5; /* Indigo 600 */
  --bg-color: #f1f5f9; /* BlueGray 100 */
  --card-bg: #ffffff;
  --text-main: #0f172a; /* Slate 900 */
  --text-muted: #475569; /* Slate 600 */
  --border-color: #e2e8f0; /* Slate 200 */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

main {
  flex: 1;
  padding: 2rem 0;
}

footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  margin-top: auto;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

p {
  margin-bottom: 1rem;
}

/* Components */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-card {
  display: block;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  color: var(--text-main);
}

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

.tool-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-color);
  border-radius: 10px;
  color: var(--primary-color);
  flex-shrink: 0;
  transition: all 0.2s;
}

.tool-card:hover .tool-icon-wrapper {
  background: var(--primary-color);
  color: white;
}

.tool-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  transition: color 0.2s;
}

.tool-card:hover h3 {
  color: var(--primary-color);
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background-color: #fff;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  opacity: 0.95;
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

button.secondary:hover {
  background: var(--bg-color);
  border-color: var(--text-muted);
  box-shadow: var(--shadow-md);
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-full { width: 100%; }

/* Search Box */
.search-wrapper {
  position: relative;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.search-input {
  width: 100%;
  padding: 1.125rem 1.5rem !important;
  padding-left: 3.5rem !important;
  font-size: 1.1rem;
  border-radius: 2rem;
  border: 2px solid transparent;
  background-color: white;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.search-input:focus {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  transition: all 0.3s;
  z-index: 10;
  pointer-events: none;
}

.search-input:focus + .search-icon {
  transform: translateY(-50%) scale(1.1);
}

/* Ads Placeholder */
.ad-space {
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  text-align: center;
  padding: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

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