:root {
  --bg-color: #f8fafc;
  --surface-color: rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 1);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #2563eb;
  --accent-gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --neon-glow: 0 10px 25px -5px rgba(37, 99, 235, 0.2), 0 8px 10px -6px rgba(37, 99, 235, 0.2);
  
  --font-family: 'Outfit', 'Inter', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0); /* Make logo black/dark to fit light theme if it was white */
}

.nav-brand span.highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent-color);
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-family: var(--font-family);
  outline: none;
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

.search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-search {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--neon-glow);
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .search-form {
    display: none;
  }
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 5% 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Sections */
.section-container {
  padding: 4rem 5%;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: inline-block;
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50%;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
}

/* Grid Layouts */
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.grid-websites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Category Card */
.category-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  transition: var(--transition-normal);
  cursor: pointer;
  background: #ffffff;
}

.category-card:hover {
  transform: translateY(-5px);
  background: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

.category-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  margin-right: 1rem;
}

.category-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.category-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Website Card */
.website-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  height: 100%;
  background: #ffffff;
}

.website-card:hover {
  transform: translateY(-8px);
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(37, 99, 235, 0.2);
}

.website-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.website-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  margin-right: 1rem;
  background: #f1f5f9;
  padding: 4px;
  border: 1px solid var(--border-color);
}

.website-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.website-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.website-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.tag {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-visit {
  color: var(--accent-color);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-visit:hover {
  color: #1d4ed8;
}

/* Footer */
.footer {
  background: #ffffff;
  padding: 4rem 5% 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

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

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

.footer-bottom a {
  color: var(--accent-color);
  font-weight: 500;
}

/* Loading Screen */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

[data-aos] {
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos].aos-animate {
  opacity: 1;
}
