:root {
  --bg: #0a0a0f;
  --panel: rgba(20, 20, 30, 0.8);
  --panel-hover: rgba(30, 30, 45, 0.9);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #667eea;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --glow: rgba(102, 126, 234, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

/* Background effects */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1000px, 92vw);
  margin: 10vh auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-header {
  text-align: center;
  margin-bottom: 48px;
}

.portal-header h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.portal-header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  width: 100%;
}

.portal-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  background: var(--panel-hover);
  border-color: var(--glow);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15), 0 0 20px rgba(102, 126, 234, 0.1);
}

.portal-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.portal-card h2 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
}

.portal-card p {
  margin: 0 0 24px 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  flex-grow: 1;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  transition: gap 0.3s ease;
}

.card-action::after {
  content: '→';
  transition: transform 0.3s ease;
}

.portal-card:hover .card-action::after {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .portal-shell {
    margin: 40px auto;
  }

  .portal-header h1 {
    font-size: 32px;
  }
}
