:root {
  --primary: #2e3c5d;
  --accent: #5a4228;
  --bg: #f6faff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text: #1c1c1c;
  --muted: #5f6472;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Josefin Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(-45deg, #f9e7d7, #e4f0fb, #ffe5d9, #e8f1fb);
  background-size: 400% 400%;
  animation: gradientShift 16s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.portal-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

header {
  text-align: center;
  margin-bottom: 48px;
  color: var(--primary);
}

header h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: 3px;
  margin: 0 0 12px;
}

header p {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 560px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 36px;
}

.mode-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 15px 40px rgba(46, 60, 93, 0.15);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(46, 60, 93, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mode-card:hover,
.mode-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 25px 55px rgba(90, 66, 40, 0.25);
}

.mode-card h2 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--primary);
}

.mode-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(46, 60, 93, 0.12);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.mode-meta {
  font-size: 0.9rem;
  color: #7b7f8f;
}

.mode-card button {
  margin-top: auto;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mode-card button:hover {
  opacity: 0.9;
}

.mode-preview {
  background: rgba(46, 60, 93, 0.12);
  border-radius: 24px;
  padding: 26px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(46, 60, 93, 0.15);
  color: var(--primary);
}

.mode-preview h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.mode-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.portal-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-actions a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .mode-card {
    padding: 24px 20px;
  }

  .mode-preview {
    padding: 22px;
  }
}
