:root {
  --bg: #05070d;
  --accent: #7cd6ff;
  --accent-2: #b98bff;
  --text: #eaf2ff;
  --text-dim: #8ea0bd;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --bar-bg: rgba(8, 11, 20, 0.55);
  --header-h: 64px;
  --footer-h: auto;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: var(--bar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .dot {
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
}

.topnav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.topnav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.topnav a:hover {
  color: var(--text);
}

main.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - var(--header-h));
  align-items: stretch;
}

.wheel-stage {
  position: relative;
  flex: 0 0 46%;
  max-width: 560px;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.wheel-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 22%);
  mask-image: linear-gradient(to right, transparent 0%, black 22%);
}

.wheel-wrap:active {
  cursor: grabbing;
}

.wheel {
  position: absolute;
  inset: 0;
}

.wheel-item {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  padding: 1.1rem 1.3rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  will-change: transform, opacity;
  pointer-events: auto;
  user-select: none;
}

.wheel-item .wi-icon {
  font-size: 1.5rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 6px rgba(124, 214, 255, 0.25));
}

.wheel-item .wi-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
}

.wheel-item .wi-badge {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wheel-item.is-active {
  border-color: rgba(124, 214, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 30px rgba(124, 214, 255, 0.12);
}

.detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vh clamp(1.5rem, 5vw, 4rem);
  min-width: 0;
}

.detail-inner {
  max-width: 560px;
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1.25rem;
}

.detail-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(124, 214, 255, 0.3));
}

.detail-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.detail p.detail-desc {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.detail-badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid rgba(124, 214, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

.detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--bg);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-left: auto;
}

.detail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 214, 255, 0.25);
}

.detail-cta.disabled {
  pointer-events: none;
  opacity: 0.4;
  background: var(--card-bg);
  color: var(--text-dim);
  border: 1px solid var(--card-border);
}

.detail-frame-wrap {
  margin-top: 0.5rem;
  max-width: 720px;
  height: clamp(400px, 46vh, 520px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.detail-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 860px) {
  main.layout {
    flex-direction: column;
  }
  .wheel-stage {
    flex: none;
    max-width: 100%;
    width: 100%;
    min-height: 380px;
    height: 42vh;
  }
  .wheel-wrap { min-height: unset; height: 100%; }
  .detail {
    padding: 2rem 1.5rem 3rem;
  }
}
