:root {
  --bg: #f3f6f8;
  --navy: #111827;
  --navy-dark: #0b1220;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #52627a;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --accent-light: #ccfbf1;
  --border: #d8e0ea;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, var(--navy) 0 280px, var(--bg) 280px 100%);
}

header {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  color: white;
  padding: 48px 40px 36px;
}

header h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.35;
  letter-spacing: -0.04em;
  font-weight: 700;
}

header h1::before {
  content: 'SOFTWARE EDUCATIVO';
  display: block;
  margin-bottom: 12px;
  color: #14b8a6;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 600;
}

header p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.5;
}

#portal {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 40px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 134px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
  border-radius: 8px;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.card:hover::after {
  opacity: 0.08;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.host-id {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

footer {
  margin-top: auto;
  padding: 16px 40px 28px;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 820px) {
  header {
    padding: 24px 20px;
  }

  #portal {
    padding: 28px 16px;
  }

  footer {
    padding: 12px 16px 24px;
  }
}
