:root {
  color-scheme: dark;
  --bg: #0f0d13;
  --surface: #1c1b1f;
  --surface-container: #211f26;
  --surface-container-high: #2b2930;
  --surface-variant: #49454f;
  --outline: #938f99;
  --outline-variant: #49454f;
  --text: #e6e1e5;
  --muted: #cac4d0;
  --primary: #d0bcff;
  --primary-container: #4f378b;
  --on-primary-container: #eaddff;
  --secondary: #ccc2dc;
  --tertiary: #efb8c8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Avenir Next", sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

.shell {
  width: min(800px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 80px 0 56px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  padding: 40px;
}

.services-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 600px;
}

.service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all 150ms ease;
  min-height: 140px;
}

.service-btn:hover {
  background: var(--surface-container-high);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.service-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.service-btn.disabled:hover {
  background: var(--surface-container);
  border-color: var(--outline-variant);
  transform: none;
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Media - Play triangle */
.icon-media::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid var(--primary);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}

/* Drive - Folder shape */
.icon-drive::before {
  content: '';
  width: 32px;
  height: 24px;
  background: var(--surface-container-high);
  border: 2px solid var(--primary);
  border-radius: 2px;
  position: relative;
}

.icon-drive::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 8px;
  width: 32px;
  height: 18px;
  background: var(--surface-container);
  border: 2px solid var(--primary);
  border-radius: 2px;
  border-top: none;
}

/* VoIP - Sound waves */
.icon-voip::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 
    0 0 0 4px var(--surface-container),
    0 0 0 6px var(--primary),
    0 0 0 10px var(--surface-container),
    0 0 0 12px rgba(208, 188, 255, 0.5);
}

/* Game - Crossed swords/diamond */
.icon-game::before,
.icon-game::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 32px;
  background: var(--tertiary);
  transform-origin: center;
}

.icon-game::before {
  transform: rotate(45deg);
}

.icon-game::after {
  transform: rotate(-45deg);
}

/* Social - Network nodes */
.icon-social::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 
    -14px -10px 0 -2px var(--secondary),
    14px -10px 0 -2px var(--secondary),
    0 16px 0 -2px var(--secondary);
}

.icon-social::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(208, 188, 255, 0.3);
  border-radius: 50%;
}

/* MUD - Terminal/console icon */
.icon-mud::before {
  content: '';
  width: 32px;
  height: 24px;
  background: var(--surface-container-high);
  border: 2px solid var(--primary);
  border-radius: 4px;
  position: relative;
}

.icon-mud::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 10px;
  width: 12px;
  height: 6px;
  background: var(--primary);
  box-shadow: 
    14px 0 0 var(--primary),
    0 -8px 0 -2px var(--secondary);
}

.service-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .shell {
    padding: 40px 0;
  }
  
  .panel {
    padding: 24px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .service-btn {
    min-height: 100px;
    padding: 24px 16px;
    flex-direction: row;
    gap: 16px;
    text-align: left;
  }
  
  .service-icon {
    margin-bottom: 0;
    font-size: 1.5rem;
  }
  
/* Usage - Bar chart icon */
.icon-usage::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow:
    10px 6px 0 var(--primary),
    20px -4px 0 var(--tertiary);
}

.icon-usage::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--outline);
}

.service-name {
    margin-bottom: 2px;
  }
  
  .service-desc {
    display: block;
  }
}
/* Tunnel - Link/chain icon with arrow */
.icon-tunnel::before {
  content: '';
  width: 28px;
  height: 10px;
  border: 3px solid var(--primary);
  border-radius: 5px;
  position: relative;
  transform: rotate(-45deg);
}

.icon-tunnel::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 10px;
  border: 3px solid var(--secondary);
  border-radius: 5px;
  transform: rotate(45deg);
  margin-top: 8px;
  margin-left: 8px;
}

/* Loading state */
.service-btn.loading {
  opacity: 0.8;
  cursor: wait;
}

.service-btn.loading .service-icon::before,
.service-btn.loading .service-icon::after {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Button element specific styles */
button.service-btn {
  font-family: inherit;
  font-size: inherit;
  width: 100%;
}
