@font-face {
  font-family: "FGP-Marugothic";
  src: url("../fonts/131_FGP丸ｺﾞｼｯｸ体Ca-U.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "M PLUS Rounded 1c", "Kosugi Maru", "Noto Sans JP",
    "Hiragino Maru Gothic ProN", /* macOS */ "Yu Gothic", "Meiryo",
    /* Windows */ "Noto Sans CJK JP", sans-serif !important;
  /* Prevent zoom and user interactions globally */

  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: #fff;
}
html.screen-save,
html.screen-save body {
  background-color: #000 !important;
  background-image: none !important;
}

body {
  background-color: #fff4e6;
  overflow: hidden;
  width: 1920px;
  height: 1200px;
  margin: 0;
  padding: 0;
  position: relative;
  transform-origin: top left;
  font-family: "FGP-Marugothic", sans-serif;
  /* Prevent zoom and user interactions */
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#main-game-screen {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: center;
}

.session-step.active {
  display: block;
}
.session-step {
  display: none;
}

.main-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.main-container.hidden {
  display: none;
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 80px;
  margin-bottom: 40px;
  position: relative;
  width: 100%;
}

.title-section {
  position: relative;
}

.title-image {
  width: 600px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.8s ease-in-out;
}

.title-image.move-right {
  transform: translateX(80%);
}

.level-display {
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.level-display-image {
  width: 100%;
  height: 100%;
  margin-right: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  animation: bounceScale 2.5s ease-in-out infinite;
}

.main-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.all-elements-container {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}

.mascot {
  width: 450px;
  height: 450px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
  animation: bounceScale 1.6s ease-in-out infinite;
  cursor: pointer;
}

.mascot:hover {
  animation-play-state: paused;
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.start-btn {
  position: relative;
  padding: 25px 42px;
  font-size: 50px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 350px;
  height: 200px;
  color: #fff;
  overflow: visible;
}

.start-btn:nth-child(2) {
  padding: 25px 68px;
}

.hexagon-btn {
  border-radius: 999px;
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.hexagon-btn:nth-child(2) {
  background: #4cafa1;
}

.hexagon-btn:nth-child(3) {
  background: #afc133;
}

.hexagon-btn:nth-child(4) {
  background: #cd524e;
}

.start-btn:hover {
  transform: translateY(-5px) scale(1.05);
}

.start-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.admin-button {
  position: fixed;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-button.hidden {
  display: none !important;
}

.admin-button:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.admin-button span {
  font-size: 24px;
  color: white;
  user-select: none;
}

@media (max-width: 768px) {
  .admin-button {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .admin-button span {
    font-size: 16px;
  }
}

.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-login-overlay.show {
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
  visibility: visible;
}

.admin-login-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-login-overlay.show .admin-login-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.admin-login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 15px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.admin-login-overlay.show .admin-login-header {
  transform: translateY(0);
  opacity: 1;
}

.admin-login-header h2 {
  margin: 0;
  color: #333;
  font-size: 32px;
  font-weight: bold;
}

.admin-close-btn {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.admin-close-btn:hover {
  background: #cc0000;
}

.admin-input-group {
  margin-bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.admin-login-overlay.show .admin-input-group {
  transform: translateY(0);
  opacity: 1;
}

.admin-input-group label {
  display: block;
  margin-bottom: 12px;
  font-weight: bold;
  color: #333;
  font-size: 18px;
}

.admin-input-group input {
  width: 100%;
  padding: 16px;
  border: 3px solid #ddd;
  border-radius: 12px;
  font-size: 20px;
  transition: border-color 0.3s ease;
  background: #f8f9fa;
}

.admin-input-group input:focus {
  outline: none;
  border-color: #007bff;
}

.admin-login-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.admin-login-overlay.show .admin-login-buttons {
  transform: translateY(0);
  opacity: 1;
}

.admin-login-btn,
.admin-cancel-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-login-btn {
  background: #007bff;
  color: white;
}

.admin-login-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.admin-cancel-btn {
  background: #6c757d;
  color: white;
}

.admin-cancel-btn:hover {
  background: #545b62;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.admin-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.admin-message.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-message-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.admin-message-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.admin-message-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.admin-message-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.admin-message-icon {
  font-size: 20px;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.admin-message-text {
  flex: 1;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    gap: 20px;
    margin-top: 0;
  }

  .header-section {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .level-display {
    text-align: center;
    justify-content: center;
  }

  .level-display-image {
    max-width: 250px;
  }

  .all-elements-container {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .start-btn {
    width: 200px;
    height: 150px;
    padding: 15px 25px;
    font-size: 1.1rem;
  }

  .title-image {
    max-width: 300px;
  }

  .mascot {
    width: 200px;
    height: 150px;
  }

  .main-container {
    padding: 10px;
  }
}

@keyframes bounceScale {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

rt {
  margin-bottom: 1px;
}
