body,
html {
  height: 100%;
  min-height: 380px;
  margin: 0;
}

body {
  background: linear-gradient(135deg, #1b1a5d 0%, #15183e 100%);
  color: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Inter", "Avenir Next", Avenir, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  transition: color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #121212 0%, #323232 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

body.dark-mode::before {
  opacity: 1;
}

body.dark-mode {
  color: #e0e0e0;
}

body.dark-mode .avatar {
  border-color: #e0e0e0;
}

body.dark-mode a:hover {
  color: #ffd700;
}

@media (max-height: 300px) {
  body {
    overflow-y: scroll;
  }
}

main.anim {
  transition: opacity 300ms cubic-bezier(0.8, 0.5, 0.5, 0.9);
}

main.out {
  opacity: 0;
}

.avatar {
  position: relative;
  width: 128px;
  height: 128px;
  min-width: 128px;
  min-height: 128px;
  border-radius: 100%;
  border: 4px solid #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  transition: transform 200ms cubic-bezier(0.8, 0.5, 0.5, 0.9);
  overflow: hidden;
  margin: 16px;
}

.avatar img {
  width: 128px;
  height: 128px;
}

.avatar:hover {
  transform: scale(1.2);
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 24px 16px;
  animation: fadeIn 1s ease-in;
}

h1 {
  font-weight: 600;
  font-size: 56px;
  text-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15);
  line-height: 100%;
  margin: 0;
  text-align: center;
}

p {
  margin-bottom: 1em;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  color: #f8f8f8;
  text-align: center;
}

.lang-en,
.lang-ja {
  display: inline-block;
  line-height: inherit;
}

a {
  text-decoration: none;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  transition: all 800ms ease;
}

svg {
  fill: currentColor;
  margin: 0 10px;
}

a:hover {
  opacity: 0.9;
  filter: drop-shadow(0 5px 10px #fec2);
  transition: all 200ms ease;
}

@media (max-width: 640px) {
  main {
    flex-direction: column;
  }

  h1 {
    font-size: 8.9vw;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 36px;
  }

  p {
    font-size: 16px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.button-group {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

button {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8f8f8;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20;
}

button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .button-group {
    top: auto;
    bottom: 10px;
    right: 10px;
    left: auto;
  }

  button {
    font-size: 16px;
    padding: 8px 20px;
  }
}
