:root {
  --bg: #c0c4c6;
  --card: #dddddd;
  --ink: #2d2d2d;
  --accent: #b4b4b4;
  --beam: #13ff8b;
  --vvh: 100dvh;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  border: 0;
  font: inherit;
}

.index {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--vvh);
  overflow: hidden;
  overscroll-behavior: contain;
  pointer-events: none;
  z-index: 2;
}

.main-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  touch-action: none;
}

.landing-card-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--vvh);
  pointer-events: none;
  backdrop-filter: blur(0);
  transition: backdrop-filter 0.2s linear;
}

.landing-card-overlay.blur {
  backdrop-filter: blur(60px);
}

.landing-card-container {
  position: relative;
  width: 280px;
  height: 200px;
  transform: translateY(calc(50dvh - 120px));
  pointer-events: none;
  transition: width 0.36s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.36s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.landing-card-container[data-mode="info"] {
  width: 340px;
  height: 480px;
  transform: translateY(0);
}

.landing-card-container[data-mode="register"] {
  width: 280px;
  height: 140px;
  transform: translateY(0);
}

.landing-card-container[data-mode="loading"] {
  width: 100px;
  height: 100px;
  transform: translateY(0);
}

.landing-card-container[data-mode="success"] {
  width: 280px;
  height: 160px;
  transform: translateY(0);
}

.landing-card-header {
  position: absolute;
  top: -36px;
  left: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: calc(100% - 60px);
  height: 26px;
  opacity: 0;
  pointer-events: all;
  transition: opacity 0.1s linear;
}

.landing-card-container:not([data-mode="default"]) .landing-card-header {
  opacity: 1;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  overflow: hidden;
  border-radius: 13px;
  background: #2d2d2d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.header-action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: #dddddd;
  color: #777777;
  opacity: 1;
  pointer-events: all;
}

.header-confirm {
  color: #009942;
  opacity: 0;
  pointer-events: none;
}

.landing-card-container[data-mode="register"] .header-confirm {
  opacity: 1;
  pointer-events: all;
}

.header-action svg,
.primary svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-action svg {
  stroke-width: 3;
}

.landing-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 25px;
  background: var(--card);
  box-shadow: 0 0 40px #3333331a;
  pointer-events: all;
  --accent: #b4b4b4;
}

.landing-card.shake {
  animation: shake 0.5s linear;
}

.landing-card * {
  user-select: none;
}

.landing-card-content {
  position: absolute;
  inset: 0;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: #111111;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s linear;
  pointer-events: none;
}

.landing-card-container[data-mode="default"] .landing-card-content--default,
.landing-card-container[data-mode="info"] .landing-card-content--info,
.landing-card-container[data-mode="register"] .landing-card-content--register,
.landing-card-container[data-mode="loading"] .landing-card-content--loading,
.landing-card-container[data-mode="success"] .landing-card-content--success {
  opacity: 1;
  pointer-events: all;
}

.landing-card-content--default {
  min-width: 280px;
  min-height: 200px;
  padding-top: 25px;
}

.info-button {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
}

.action-left {
  position: absolute;
  top: 15px;
  left: 50px;
  width: 33px;
  height: 26px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.soundwave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
}

.line {
  width: 3px;
  height: 5px;
  border-radius: 1.5px;
  background: var(--accent);
}

.playing .line:nth-child(1) { animation: w10 0.5s ease-in-out 0.1s infinite; }
.playing .line:nth-child(2) { animation: w25 0.7s ease-in-out 0.2s infinite; }
.playing .line:nth-child(3) { animation: w20 0.8s ease-in-out 0.3s infinite; }
.playing .line:nth-child(4) { animation: w15 0.9s ease-in-out 0.4s infinite; }
.playing .line:nth-child(5) { animation: w20 0.8s ease-in-out 0.5s infinite; }
.playing .line:nth-child(6) { animation: w10 0.9s ease-in-out 0.6s infinite; }
.playing .line:nth-child(7) { animation: w10 0.7s ease-in-out 0.3s infinite; }

.action {
  position: absolute;
  top: 15px;
  right: 15px;
}

.switch-container {
  width: 45.5px;
  height: 26px;
}

.switch {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
}

.switch + label {
  position: relative;
  display: block;
  width: 45.5px;
  height: 26px;
  border-radius: 13px;
  background: #eeeeee;
  cursor: pointer;
  outline: none;
  transition: background-color 0.1s linear;
}

.switch + label::after,
.switch + label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.1s linear, background-color 0.1s linear;
}

.switch:checked + label::after {
  transform: translate(75%);
  background: #333333;
}

.landing-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 30px 0;
  padding-top: 10px;
  color: #2d2d2d;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: center;
  white-space: nowrap;
}

.landing-card-actions {
  display: flex;
  flex-direction: column;
  gap: 7.5px;
}

.landing-card-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 55px;
  padding: 5px 20px;
  border-radius: 20px;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.25px;
  text-decoration: none;
  transition: transform 0.05s linear, background-color 0.1s linear;
}

.landing-card-actions button:active {
  transform: scale(0.98);
}

.landing-card-actions .primary {
  background: #2d2d2d;
  color: #ffffff;
}

.primary svg {
  position: relative;
  right: -5px;
  stroke-width: 2;
}

.version {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  opacity: 0.2;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding-top: 100px;
  width: 100%;
}

.logo img {
  display: block;
  width: 120px;
  height: auto;
}

.paragraph {
  margin: 0 0 30px;
  color: #2d2d2d;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 20px;
  text-align: center;
}

.pill {
  display: flex;
  align-items: center;
  width: fit-content;
  height: 20px;
  margin: 0 auto 20px;
  padding: 0 10px;
  border-radius: 10px;
  background: #2d2d2d;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

form {
  display: flex;
  flex-direction: column;
  gap: 7.5px;
}

.label {
  color: #6f6f6f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 12px;
}

input {
  display: flex;
  width: 100%;
  height: 55px;
  padding: 5px 20px;
  border-radius: 20px;
  background: #ffffff;
  color: #2d2d2d;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.25px;
  opacity: 0.5;
  user-select: text !important;
}

input:focus {
  opacity: 1;
  outline: none;
}

input::placeholder {
  color: #6f6f6f;
}

input.hidden {
  display: none;
}

.landing-card-content--loading,
.landing-card-content--success {
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #bbbbbb;
  border-top-color: #2d2d2d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes w10 { 0%, 100% { height: 5px; } 50% { height: 10px; } }
@keyframes w15 { 0%, 100% { height: 5px; } 50% { height: 15px; } }
@keyframes w20 { 0%, 100% { height: 12px; } 50% { height: 20px; } }
@keyframes w25 { 0%, 100% { height: 15px; } 50% { height: 25px; } }
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (max-width: 720px) {
  .landing-card-container {
    transform: translateY(calc(50dvh - 112px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
