:root {
  --bg: #000000;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.2);
  --text-white: #ffffff;
  --text-dim: #a1a1aa;
  --text-muted: #71717a;
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
}

html, body {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  background: var(--bg);
  color: var(--text-white);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  z-index: 500;
}

.nav-brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-white);
  text-align: center;
}

#flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

#flash.active {
  animation: flashAnim 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes flashAnim {
  0% { opacity: 0.85; }
  50% { opacity: 0.1; }
  100% { opacity: 0; }
}

#gateway {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  padding: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.enter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.enter-box:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.brand-title {
  font-size: clamp(30px, 6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 4px;
  text-align: center;
}

.brand-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 28px;
  text-align: center;
}

.brand-sub strong {
  color: var(--text-white);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 38px;
  background: #000000;
  color: var(--text-white);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #18181b;
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

#stage {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.marquee-track {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  will-change: transform;
}

.feed-chunk {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

h1.feed-title {
  font-size: clamp(34px, 7vw, 50px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-white);
  margin-bottom: 6px;
  text-align: center;
  width: 100%;
}

.feed-sub {
  font-size: clamp(13px, 3.5vw, 15px);
  color: var(--text-dim);
  margin-bottom: 24px;
  text-align: center;
  width: 100%;
}

.feed-sub strong {
  color: var(--text-white);
  font-weight: 600;
}

.card-box {
  width: 100%;
  margin: 14px 0;
  padding: 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s ease;
}

.card-box:hover {
  border-color: var(--card-border-hover);
}

.heading-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-bottom: 16px;
}

.heading-swap {
  display: inline-grid;
  place-items: center;
  position: relative;
}

.heading-swap > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-white);
  white-space: nowrap;
  transition: opacity 0.18s ease;
}

.heading-swap svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-white);
  stroke-width: 2.2;
}

.heading-swap .it { opacity: 0; pointer-events: none; }
.heading-swap .en { opacity: 1; }
body.it-mode .heading-swap .en { opacity: 0; pointer-events: none; }
body.it-mode .heading-swap .it { opacity: 1; }

.title-swap {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 100%;
}

.title-swap > span {
  grid-area: 1 / 1;
  transition: opacity 0.18s ease;
  white-space: nowrap;
}

.title-swap .it { opacity: 0; pointer-events: none; }
.title-swap .en { opacity: 1; }
body.it-mode .title-swap .en { opacity: 0; pointer-events: none; }
body.it-mode .title-swap .it { opacity: 1; }

.data-row {
  margin: 10px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.label-swap {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 100%;
  margin-bottom: 3px;
}

.label-swap > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}

.label-swap svg {
  width: 13px;
  height: 13px;
  stroke: var(--text-muted);
  stroke-width: 2;
}

.label-swap .it { opacity: 0; pointer-events: none; }
.label-swap .en { opacity: 1; }
body.it-mode .label-swap .en { opacity: 0; pointer-events: none; }
body.it-mode .label-swap .it { opacity: 1; }

.val {
  text-align: center;
  color: var(--text-white);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 90vw;
  line-height: 1.45;
  margin: 0 auto;
}

.val.accent {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #ffffff;
}

@media (max-width: 640px) {
  .nav {
    height: 44px;
  }
  .marquee-track {
    top: 44px;
  }
  .feed-chunk {
    padding: 16px 12px 24px;
  }
  .card-box {
    padding: 18px 14px;
    margin: 10px 0;
    border-radius: 14px;
  }
  .val {
    font-size: 13px;
  }
}
