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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: #c01933;
  --icon: #7799cc;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #c01933;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
              url("../img/hero-bg.jpg") center center / cover fixed;
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 900px;
}

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

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.card:hover {
  border-color: var(--border-hover);
  background: #1c2128;
  transform: translateY(-3px);
}

.card i {
  font-size: 2rem;
  color: var(--icon-color, rgba(255, 255, 255, 0.6));
  transition: color 0.2s ease;
}

.card:hover i {
  color: var(--accent);
}

.card span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.2s ease;
}

.card:hover span {
  color: var(--text);
}

button.card {
  width: 100%;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--surface);
}

dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  padding: 2rem 1.5rem 1.5rem;
  max-width: 340px;
  width: 90%;
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

dialog p {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.modal-btn i {
  font-size: 1.1rem;
  color: var(--icon-color, var(--icon));
  transition: color 0.2s ease;
}

.modal-btn:hover {
  border-color: var(--accent);
  background: #1c2128;
}

.modal-btn:hover i {
  color: var(--accent);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }

  .card {
    padding: 1.25rem 0.75rem;
    gap: 0.5rem;
  }

  .card i {
    font-size: 1.6rem;
  }
}
