:root {
  --bg: #f8f9fa;
  --text: #212529;
  --card: #ffffff;
  --border: #e9ecef;
  --primary: #0d6efd;
}

html[data-theme="dark"] {
  --bg: #121212;
  --text: #e0e0e0;
  --card: #1e1e1e;
  --border: #333;
  --primary: #0d6efd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

header p {
  color: #666;
  font-size: 1.1rem;
}

#theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity .3s;
}

#theme-toggle:hover { opacity: 1; }

.search-box {
  max-width: 500px;
  margin: 0 auto 3rem;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color .3s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.category {
  margin-bottom: 3rem;
}

.category h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.links a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
  transition: all .3s;
}

.links a:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.links a i {
  font-size: 1.4rem;
  width: 28px;
  opacity: 0.8;
}

footer {
  text-align: center;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: #888;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  header h1 { font-size: 2.2rem; }
  .links { grid-template-columns: 1fr; }
}