:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.1) 42%),
    linear-gradient(135deg, #050506 0%, #111114 40%, #f0f0f4 135%);
  color: #f6f7fb;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
}

.menu-overlay .overlay-inner {
  margin-inline: auto;
  scrollbar-gutter: auto;
}

.background-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  width: clamp(300px, 48vw, 520px);
  height: clamp(300px, 48vw, 520px);
  margin-left: calc(clamp(300px, 48vw, 520px) / -2);
  margin-top: calc(clamp(300px, 48vw, 520px) / -2);
  background: url('./logo-512.png') no-repeat center/contain;
  opacity: 0.18;
  animation: spin 26s linear infinite;
  z-index: -4;
  pointer-events: none;
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.65));
}

.metallic-sheen {
  position: fixed;
  inset: -20% -10%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.06) 40%, rgba(0, 0, 0, 0.45) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -3;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -2;
  opacity: 0.55;
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 9vw, 100px) clamp(20px, 8vw, 120px);
}

.panel {
  width: min(760px, 100%);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.2), rgba(8, 8, 10, 0.86));
  border-radius: 28px;
  padding: clamp(32px, 7vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 45px 80px rgba(0, 0, 0, 0.65), inset 0 0 46px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  box-shadow: inset 0 20px 38px rgba(255, 255, 255, 0.1);
}

.panel h1 {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 18px;
  color: #ffffff;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.85), 0 0 26px rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
}

.panel-intro {
  text-align: center;
  margin: 0 auto 32px;
  color: #d7d9df;
  line-height: 1.7;
  max-width: 52ch;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.wallet-section {
  position: relative;
  padding: clamp(22px, 4vw, 32px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(10, 10, 12, 0.7));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.1), 0 30px 55px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wallet-section + .wallet-section {
  margin-top: clamp(24px, 5vw, 36px);
}

.section-title {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 24px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f6f7fb;
  text-shadow: 0 12px 24px rgba(0, 0, 0, 0.7);
}

.input-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 232, 238, 0.85);
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.65);
}

input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: #101217;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(177, 180, 188, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  box-shadow: inset 0 3px 9px rgba(255, 255, 255, 0.6), inset 0 -6px 12px rgba(0, 0, 0, 0.22);
  outline: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
  box-shadow: inset 0 3px 12px rgba(255, 255, 255, 0.75), 0 0 18px rgba(172, 185, 255, 0.8);
  transform: translateY(-1px);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

button {
  cursor: pointer;
  border: none;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* ==== ボタン縮小バージョン ==== */
.primary-button {
  flex: 1 1 160px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #101216;
  background: linear-gradient(145deg, #ffffff, #b7bbc3 55%, #323337 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 4px 12px rgba(255, 255, 255, 0.7), inset 0 -6px 18px rgba(0, 0, 0, 0.42), 0 26px 48px rgba(0, 0, 0, 0.6);
}

.primary-button:hover,
.primary-button:focus {
  transform: translateY(-2px);
  box-shadow: inset 0 6px 14px rgba(255, 255, 255, 0.78), inset 0 -8px 22px rgba(0, 0, 0, 0.45), 0 35px 60px rgba(0, 0, 0, 0.7);
}

.ghost-button {
  flex: 1 1 160px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #f3f4f8;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(8, 8, 8, 0.65));
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.18), inset 0 -4px 12px rgba(0, 0, 0, 0.35), 0 20px 40px rgba(0, 0, 0, 0.45);
}

.ghost-button:hover,
.ghost-button:focus {
  transform: translateY(-2px);
  box-shadow: inset 0 4px 12px rgba(255, 255, 255, 0.24), inset 0 -8px 18px rgba(0, 0, 0, 0.42), 0 28px 48px rgba(0, 0, 0, 0.55);
}

.wallet-section .primary-button {
  align-self: flex-start;
}

.terminal-display {
  background: linear-gradient(145deg, rgba(16, 16, 18, 0.92), rgba(34, 34, 40, 0.88));
  color: #8dff9d;
  font-family: "Courier New", Courier, monospace;
  padding: 16px;
  border-radius: 16px;
  min-height: 100px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  text-shadow: 0 0 12px rgba(141, 255, 157, 0.4);
  border: 1px solid rgba(141, 255, 157, 0.35);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.8), 0 12px 30px rgba(0, 0, 0, 0.5);
}

.code-output {
  background: rgba(12, 12, 14, 0.82);
  color: #f4f5f9;
  font-family: "Source Code Pro", "Courier New", monospace;
  padding: 16px;
  border-radius: 16px;
  min-height: 80px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.8), 0 14px 32px rgba(0, 0, 0, 0.55);
}

.site-footer {
  text-align: center;
  padding: 32px 16px 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.7));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -20px 35px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-link {
  color: #f4f5f7;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(10, 10, 12, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 3px 12px rgba(255, 255, 255, 0.18), 0 12px 20px rgba(0, 0, 0, 0.55);
}

.footer-link:hover,
.footer-link:focus {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(10, 10, 12, 0.85));
}

.footer-logo {
  height: 110px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

footer a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(180, 196, 255, 0.8);
  outline-offset: 4px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .panel {
    padding: clamp(28px, 6vw, 40px);
  }

  .wallet-section {
    padding: clamp(20px, 6vw, 28px);
  }

  .button-group {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .background-spinner {
    opacity: 0.12;
  }

  .panel h1 {
    letter-spacing: 0.06em;
  }

  .panel-intro {
    font-size: 0.95rem;
  }
}
