/* Brain Train Labs — shared portal styles */

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #252b42;
  --muted: #8b91a7;
  --primary: #6c63ff;
  --primary-dark: #554be8;
  --border: #e9eaf2;
  --shadow: 0 12px 35px rgba(39, 44, 79, 0.07);
  --radius: 22px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 36px;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 5%, #eeedff 0, transparent 28%),
    radial-gradient(circle at 95% 90%, #e5f5ff 0, transparent 25%),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(108, 99, 255, 0.45);
  outline-offset: 3px;
}

/* Shell */
.app {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #827bff, #6257ef);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 6px 15px rgba(108, 99, 255, 0.25);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.8px;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Portal hero */
.portal-hero {
  padding: 26px 4px 22px;
  text-align: left;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.portal-hero h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 900;
  letter-spacing: -1.6px;
  line-height: 1.12;
}

.portal-hero h2 span {
  color: var(--primary);
}

.portal-hero p {
  margin: 0;
  max-width: 390px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Card grid */
.game-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 8px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.game-card:active {
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-right: 28px;
}

.card-avatar {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.avatar-2048 {
  background: linear-gradient(135deg, #827bff, #6257ef);
  box-shadow: 0 6px 15px rgba(108, 99, 255, 0.25);
}

.avatar-flow {
  background: linear-gradient(135deg, #ff6b6b, #cc5de8);
  box-shadow: 0 6px 15px rgba(204, 93, 232, 0.25);
}

.avatar-wordle {
  background: linear-gradient(135deg, #ffbd4a, #ff914d);
  box-shadow: 0 6px 15px rgba(255, 145, 77, 0.25);
}

.avatar-mines {
  background: linear-gradient(135deg, #39c5db, #252b42);
  box-shadow: 0 6px 15px rgba(37, 43, 66, 0.25);
}

.card-info {
  min-width: 0;
}

.card-info span {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.card-info h3 {
  margin: 0;
  font-size: 18.5px;
  font-weight: 850;
  letter-spacing: -0.6px;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.card-arrow {
  position: absolute;
  top: 30px;
  right: 22px;
  color: var(--muted);
  font-size: 18px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.game-card:hover .card-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* Footer */
.footer-notice {
  margin: 36px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
}

.footer-notice p {
  margin: 0 0 6px;
}

.footer-notice p:last-child {
  margin-bottom: 0;
}

.footer-notice a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.footer-notice a:hover,
.footer-notice a:focus-visible {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .card-arrow {
    transition: none;
  }
}
