:root {
  --bg-light: #faf5ff;
  --bg-card: #ffffff;
  --text-dark: #3b0764;
  --text-soft: #6b21a5;
  --purple-primary: #9333ea;
  --purple-dark: #7e22ce;
  --purple-light: #e9d5ff;
  --border: #e9d5ff;
  --shadow: 0 4px 12px rgba(139,92,246,0.1);
  --gradient: linear-gradient(135deg, #a855f7, #7c3aed);
}

body.dark {
  --bg-light: #1e1b4b;
  --bg-card: #2e2a5e;
  --text-dark: #f0eaff;
  --text-soft: #c4b5fd;
  --border: #4c1d95;
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}
.logo span {
  background: none;
  color: var(--purple-primary);
}
.nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 500;
  transition: 0.2s;
}
.nav-links a:hover { color: var(--purple-primary); }
.dark-toggle {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #f3e8ff, #ffffff);
  padding: 60px 0;
  text-align: center;
  border-radius: 0 0 40px 40px;
}
body.dark .hero {
  background: linear-gradient(135deg, #2e2a5e, #1e1b4b);
}
.hero h1 {
  font-size: 2.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-soft);
  margin: 12px auto;
  max-width: 600px;
}
.search-wrapper {
  position: relative;
  max-width: 450px;
  margin: 25px auto 0;
}
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-primary);
}
#toolSearch {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: white;
  font-size: 1rem;
}

/* Tool Sections */
.section-header {
  margin: 50px 0 25px;
}
.section-header h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
}
.section-header p {
  color: var(--text-soft);
}
.section-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient);
  margin-top: 8px;
  border-radius: 3px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}
.tool-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: 0.25s;
  box-shadow: var(--shadow);
}
.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--purple-primary);
}
.card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.tool-card h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}
.tool-card p {
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* Newsletter */
.newsletter {
  background: var(--gradient);
  border-radius: 40px;
  padding: 2rem;
  text-align: center;
  margin: 50px 0;
  color: white;
}
.newsletter input {
  padding: 12px 20px;
  border-radius: 40px;
  border: none;
  width: 260px;
  margin-right: 10px;
}
.newsletter button {
  background: #f59e0b;
  border: none;
  padding: 12px 25px;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Support Box */
.support-box {
  background: #fef7e0;
  border-radius: 40px;
  padding: 2rem;
  text-align: center;
  margin: 30px 0;
}
body.dark .support-box {
  background: #2d2a4a;
}
.paypal-btn {
  background: #003087;
  color: white;
  padding: 10px 25px;
  border-radius: 40px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.float-donate {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #003087;
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  z-index: 1000;
  text-decoration: none;
}

/* Footer */
footer {
  background: #1e1b4b;
  color: #c4b5fd;
  padding: 40px 0 20px;
  margin-top: 60px;
  border-radius: 40px 40px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
}
.footer-grid a {
  color: #c4b5fd;
  text-decoration: none;
}
.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #4c1d95;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    padding: 15px;
    position: absolute;
    top: 65px;
    left: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }
  .tool-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}