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

#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
}

body {
  font-family: Arial, sans-serif;
  background: #000000;
  color: #00ff41;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-area, .links-grid {
  position: relative;
  z-index: 1;
}

/* ── Search area ── */
.search-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 16px 40px;
  width: 100%;
}

.search-logo {
  margin-bottom: 28px;
  user-select: none;
}
.search-logo img {
  width: 64px;
  height: 64px;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid #005500;
  border-radius: 24px;
  width: 100%;
  max-width: 580px;
  height: 46px;
  padding: 0 16px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.search-form:focus-within {
  background: rgba(0, 0, 0, 0.95);
  border-color: #00ff41;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.4);
}

.search-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: #00ff41;
  margin-right: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #00ff41;
  font-size: 16px;
  line-height: 1;
}
.search-input::placeholder { color: #006622; }

.search-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.search-btn {
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid #005500;
  border-radius: 4px;
  color: #00ff41;
  cursor: pointer;
  font-size: 14px;
  padding: 9px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-btn:hover {
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.35);
}

/* ── Links grid ── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1600px;
  padding: 0 16px 48px;
}
@media (max-width: 1200px) {
  .links-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .links-grid { grid-template-columns: 1fr; }
}

.column {
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid #003300;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #009933;
  padding: 8px 0 4px;
  border-bottom: 1px solid #003300;
}
.section-header:first-child { padding-top: 0; }

.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 4px 6px;
  text-decoration: none;
  color: #00cc44;
  font-size: 14px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-item:hover {
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

.link-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.link-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 2px;
}

.error-msg {
  color: #ea4335;
  font-size: 12px;
  padding: 4px 6px;
}
