/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scrollbar-gutter: stable overlay;
  scroll-behavior: smooth;
  touch-action: none;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Red Hat Text', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: overlay;
  touch-action: none;
}

strong a {
  color: #ff68c2;
  font-weight: bold;
  text-decoration: none;
}

strong a:hover {
  color: #ff68c2;
  font-weight: bold;
  text-decoration: underline;
}

textarea {
  font-family: 'Red Hat Text', sans-serif;
}

/* Buttons */
button {
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

button:hover {
  background-color: #2a2a2a;
  border-color: #666;
}

button:disabled {
  background-color: #333;
  color: #888;
  cursor: not-allowed;
  border-color: #444;
}

select {
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.5em 1em;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border 0.2s ease, background 0.2s ease;
}

select:focus {
  outline: none;
  border-color: #888;
  background-color: #252525;
}

/* Inputs */
input {
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6em 1em;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border 0.2s ease, background 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #888;
  background-color: #252525;
}

input[type="range"] {
  width: 100%;
  accent-color: #888;
}

input[type="file"] {
  background-color: #1e1e1e;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.5em;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
}

input[type="file"]::file-selector-button {
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 0.4em 1em;
  margin-right: 1em;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background-color: #3a3a3a;
  border-color: #777;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #121212;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 10px;
  border: 2px solid #121212;
}

::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 8rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: slideIn 0.3s ease;
  pointer-events: none;
  max-width: 300px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.success {
  background: #2ecc71;
}

.toast.error {
  background: #e74c3c;
}

.toast.info {
  background: #3498db;
}

.toast.loading {
  background: #f39c12;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.fade-out {
  opacity: 0;
  transform: translateX(100%);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #1e1e1e;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(30, 30, 30, 0);
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(30, 30, 30, 0.9);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid #aaa;
}

.logo {
  display: flex;
  align-items: center;
  height: 60px;
}

.logo a {
  display: inline-block;
  height: 100%;
}

.logo img {
  max-height: 100%;
  width: auto;
  display: block;
}

.nav a {
  margin-left: 1.5rem;
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.nav a:hover {
  color: #fff;
}

.support-button {
  background-color: #ff80d5;
  color: #fff !important;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

/* Background */
.bg {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-lostsword {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/lost_sword/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-nikke {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/goddess_of_victory_nikke/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-trickcal {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/trickcal_chibi_go/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-browndust2 {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/brown_dust_2/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-sinoalice {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/sinoalice/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-bluearchive {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/blue_archive/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-azurlane {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/azur_lane/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-destinychild {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/destiny_child/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-howtoraiseaharem {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/how_to_raise_a_harem/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

.bg-alchemystars {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), #121212 85%),
    url('../assets/alchemy_stars/background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 50%;
  background-position: top center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: -1;
}

/* Main */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  text-align: center;
}

/* Intro Section */
.intro {
  position: relative;
  z-index: 1;
  max-width: 700px;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

.intro h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.intro p {
  font-size: 1.5rem;
  color: #aaa;
  line-height: 1.6;
}

.intro-game {
  position: relative;
  z-index: 1;
  max-width: 700px;
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
}

.intro-game h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.intro-game p {
  font-size: 1.5rem;
  color: #aaa;
  line-height: 1.6;
}

.intro-privacy-terms {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

.intro-privacy-terms h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
  text-align: center;
}

.intro-privacy-terms p {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.6;
}

.intro-contact {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

.intro-contact h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.intro-contact p {
  text-align: center;
  font-size: 1.5rem;
  color: #aaa;
  line-height: 1.6;
}

/* Speech */
.speech-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem;
}

.speech-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/speech_background.webp') no-repeat center center / cover;
  opacity: 0.08;
  filter: blur(10px);
  z-index: 0;
}

.speech {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 4rem auto;
  padding: 1rem;
}

.speech-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #fff;
  font-weight: 700;
}

.speech-intro {
  font-size: 1.2rem;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: #ccc;
}

.speech-block {
  margin: 2rem 0;
  padding: 1rem 2rem;
}

.speech-block h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.speech-block p {
  font-size: 1.3rem;
  line-height: 1.7;
  color: #aaa;
}

.speech-block.left {
  text-align: left;
  align-self: flex-start;
}

.speech-block.right {
  text-align: right;
  align-self: flex-end;
}

.highlight {
  color: #ff80d5;
  font-weight: bold;
}

.speech-block {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.speech-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.idea {
  margin-top: 70px;
}

/* Community */
.community-section {
  max-width: 960px;
  margin: 4rem auto;
  padding: 1rem;
  color: #ddd;
  text-align: center;
}

.community-block {
  margin-bottom: 3rem;
}

.community-block h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.community-block p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #aaa;
}

/* Game List */
.game-list-home {
  padding: 5rem;
  border-radius: 20px;
  margin-top: 20px;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
}

.game-list {
  padding: 4rem 0rem;
  border-radius: 20px;
  margin-top: 20px;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
}

.game-list h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 1;
}

.game-card:hover {
  outline: 2px solid #aaa;
  outline-offset: -2px;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.game-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  width: 100%;
  text-align: center;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.search-bar {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 2rem auto;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  background-color: #1e1e1e;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* +18 notice */
.nsfw-notice {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2rem;
  width: 900px;
  margin-top: 3rem;
  background: #fc4141;
  border-radius: 10px;
  border: 1px solid #444;
}

.nsfw-section {
  color: #ffffff;
  font-size: 1rem;
  text-align: center;
  align-items: flex-start;
  margin: 0;
}

.nsfw-section h2 {
  text-align: left;
  margin: 5px;
}

.nsfw-section p {
  text-align: left;
  margin-left: 10px;
  margin-right: 10px;
}

/* Spine Viewer */
.player-buttons {
  display: flex;
  justify-content: space-between;
  width: 1200px;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.left-buttons {
  display: flex;
  gap: 1rem;
}

.help-button {
  background-color: #444;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.help-button:hover {
  background-color: #666;
}

.player-buttons p {
  display: flex;
  text-align: center;
  align-items: center;
}

.player-buttons-space {
  display: flex;
  margin-left: 350px;
}

#player-container {
  width: 1200px;
  height: 650px;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid #444;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

#player-container canvas.spine-player-canvas {
  position: absolute;
  width: 3000px;
  height: 3000px;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.spine-player-controls,
.spine-player-popup-parent {
  display: none !important;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  height: 0;
  width: 0;
  overflow: hidden;
}

#player-container-bar {
  width: 1200px;
  height: 50px;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid #444;
  gap: 10px;
  margin-top: 10px;
  padding: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#spine-progress-wrapper {
  flex-grow: 1;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.spine-progress-track {
  width: 100%;
  height: 35px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}

.spine-progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  width: 0%;
  position: absolute;
  top: 0;
  left: 0;
}

.spine-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}

.spine-icon-btn {
  background-color: #1a1a1a;
  color: white;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.spine-icon-btn img {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
}

.spine-dropdown {
  font-size: 14px;
  padding: 4px 6px;
}

.spine-options {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  z-index: 1000;
  background: #222;
  border: 1px solid #444;
  padding: 4px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
}

.spine-options button {
  background: none;
  border: none;
  color: white;
  text-align: left;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 14px;
}

.spine-options button:hover {
  background: #333;
}

.spine-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

/* Game Tag */
.horizontal-section {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2rem;
  width: 900px;
  margin: 0 auto;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid #444;
}

.horizontal-section-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.side-image {
  width: 128px;
  height: 128px;
  border-radius: 12px;
  flex-shrink: 0;
}

.horizontal-section-text-content {
  flex: 1;
  display: flex;
  justify-content: center;
}

.horizontal-section-text-content h1 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.horizontal-section-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.info-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-box h2 {
  margin: 0;
  font-size: 1.5rem;
}

.info-box p {
  margin: 0;
  font-size: 1rem;
}

.section-spacing {
  margin-top: 2rem;
}

.section-spacing p {
  margin-top: 10px;
}

.description-section {
  color: #ffffff;
  font-size: 1rem;
  text-align: center;
  margin: 0;
}

.description-section h2 {
  text-align: left;
  margin: 5px;
}

.description-section p {
  text-align: left;
  margin-left: 10px;
  margin-right: 10px;
}

.help-section {
  color: #ffffff;
  font-size: 1rem;
  text-align: center;
  align-items: flex-start;
  margin: 0;
}

.help-section h2 {
  text-align: left;
  margin: 5px;
}

.help-section p {
  text-align: left;
  margin-left: 10px;
  margin-right: 10px;
}

.screenshot-gallery {
  position: relative;
  overflow: hidden;
}

.gallery-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.gallery-scroll {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-behavior: smooth;
  padding: 0.5rem 2rem;
  scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-scroll img {
  height: 250px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.gallery-scroll img:hover {
  transform: scale(1.05);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
  opacity: 0.8;
}

.gallery-nav:hover {
  background: #555;
}

.gallery-nav.left {
  left: 0;
}

.gallery-nav.right {
  right: 0;
}

/* My Gacha List */
.my-gacha-list-container {
  width: 900px;
  height: 100%;
  margin-top: 4rem;
  padding: 2rem;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid #444;
}

.profile-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4.5rem;
  margin-bottom: 1rem;
}

.avatar img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 2px solid #555;
  object-fit: cover;
  background-color: #2a2a2a;
  cursor: pointer;
}

.username-input {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  color: white;
  padding: 0.4rem;
  font-size: 1.2rem;
  width: 220px;
  height: 50px;
  text-align: center;
}

.description-input {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  color: white;
  padding: 0.4rem;
  font-size: 1.2rem;
  width: 400px;
  height: 50px;
  text-align: center;
}

.placeholder-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.placeholder-buttons button {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  color: white;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.gacha-columns {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}


.gacha-section {
  flex: 1;
  max-width: 240px;
}

.gacha-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.gacha-input {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  color: white;
  padding: 0.5rem;
  font-size: 1rem;
  width: 240px;
  height: 40px;
  text-align: center;
  margin-bottom: 1rem;
}

.gacha-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.gacha-item {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 0.4rem;
  cursor: pointer;
}

/* Bottom row */
.profile-gacha-lists {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.gacha-column {
  flex: 1;
}

.gacha-column h3 {
  margin-bottom: 0.5rem;
  text-align: center;
}

.gacha-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gacha-list div {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.gacha-list div:hover {
  background: #333;
}

/* Character modal overlay and layout */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1500;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 1rem;
  pointer-events: none;
}

.modal-content {
  z-index: 1000;
  background: #1e1e1e;
  color: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  text-align: left;
  border: 1px solid #444;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.modal-scroll-area {
  max-height: 30vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.modal-content h2 {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  color: #fff;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-content h3 {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  color: #fff;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-content label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #ccc;
}

.modal-content button {
  margin: 1rem auto 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
}

.hover-modal {
  pointer-events: none;
  user-select: none;
}

#type-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

#skin-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.checkbox-group,
.slider-group {
  margin-top: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #ccc;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #888;
}

.checkbox-item input {
  margin: 0;
}

.checkbox-item span {
  color: #ccc;
}

#defaultMixValue {
  font-weight: bold;
  color: #fff;
}

/* Slider group */
.slider-group {
  margin: 1rem 0;
  text-align: left;
}

.slider-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.95rem;
}

#modal-search {
  background-color: #1e1e1e;
}

#type-selector #skin-selector {
  text-align: center;
}

#type-selector h3 #skin-selector h3 {
  margin-bottom: 1rem;
}

#type-buttons #skin-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

#close-modal-btn {
  margin-top: 1rem;
}

#character-list-old {
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-height: 230px;
  overflow-y: auto;
  text-align: left;
  border-radius: 10px;
  border: 1px solid #444;
}

#character-list-old div {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #444;
}

#character-list-old div:hover {
  background: #333;
}

#character-list {
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-height: 470px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 5px;
}

.character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: #222;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}

.character-card:hover {
  background: #333;
}

.character-card img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 4px;
}

.character-card span {
  margin-top: 4px;
  font-size: 1rem;
  color: #ddd;
  word-break: break-word;
}

.field-label {
  margin-top: 1rem;
  font-weight: bold;
  color: #fff;
}

.profile-view {
  background: #222;
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
}

.profile-view button {
  margin-top: 1rem;
  background-color: #333;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* About Me */
.box {
  width: 900px;
  height: 100%;
  margin-top: 4rem;
  padding: 2rem;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid #444;
}

.box h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.box p {
  font-size: 1.3rem;
  line-height: 1.7;
}

/* Footer */
.site-footer {
  background-color: #1e1e1e;
  padding: 1rem;
  text-align: center;
  color: #ffffff;
  font-size: 0.9rem;
}

.site-footer .links {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.site-footer .links a {
  color: #ccc;
  text-decoration: none;
  margin: 0 0.25rem;
}

.site-footer .links a:hover {
  color: #fff;
}



/* Laptops (1024px) */
@media (max-width: 1024px) {
  .site-main {
    max-width: 100%;
    padding: 1rem;
  }

  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .intro {
    padding: 3rem;
  }

  .intro h1,
  .intro-game h1,
  .intro-contact h1,
  .speech-title {
    font-size: 2.2rem;
  }

  .intro-game {
    max-width: 960px;
    margin: 0 auto;
    padding: 5rem;
  }

  .game-list {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
  }

  .speech-block p,
  .intro p,
  .intro-contact p,
  .community-block p {
    font-size: 1.05rem;
  }

  #player-container {
    max-width: 100%;
    margin: 1rem auto;
  }

  #player-container-bar {
    width: 910px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .player-buttons {
    width: 910px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
  }

  .player-buttons-space {
    display: none;
  }

  .left-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .player-buttons p {
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .horizontal-section-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem;
  }

  .side-image {
    width: 160px;
    height: auto;
    flex-shrink: 0;
  }

  .horizontal-section-text-content {
    flex: 1;
  }

  .info-box {
    width: 30%;
    margin-bottom: 1rem;
  }

  .game-card {
    height: 200px;
  }

  .spine-icon-btn {
    padding: 6px 12px;
  }

  .site-header {
    padding: 1rem 2rem;
  }

  .description-section {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .description-section p {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .help-section {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .box h2 {
    font-size: 1.5rem;
    margin: 5px;
  }

  .box p {
    font-size: 1.05rem;
    line-height: 1.6;
  }
}

/* Tablets (≤ 768px) */
@media (max-width: 768px) {
  .site-main {
    max-width: 768px;
    padding: 1rem;
  }

  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .intro {
    padding: 3rem;
  }

  .intro h1,
  .intro-game h1,
  .intro-contact h1,
  .speech-title {
    font-size: 2.2rem;
  }

  .intro-game {
    max-width: 768px;
    margin: 0 auto;
    padding: 5rem;
  }

  .game-list {
    max-width: 768px;
    margin: 0 auto;
    padding: 1.5rem;
  }

  .speech-block p,
  .intro p,
  .intro-contact p,
  .community-block p {
    font-size: 1.05rem;
  }

  .nsfw-notice {
    width: 675px;
  }

  #player-container {
    max-width: 675px;
    margin: 1rem auto;
  }

  #player-container-bar {
    width: 675px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .player-buttons {
    width: 675px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
  }

  .player-buttons-space {
    display: none;
  }

  .left-buttons {
    flex-wrap: wrap;
    gap: 0.1rem;
  }

  .player-buttons p {
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .horizontal-section {
    width: 675px;
  }

  .horizontal-section-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem;
  }

  .side-image {
    width: 125px;
    height: auto;
    flex-shrink: 0;
  }

  .horizontal-section-text-content {
    flex: 1;
  }

  .info-box {
    width: 30%;
    margin-bottom: 1rem;
  }

  .game-card {
    height: 200px;
  }

  .spine-icon-btn {
    padding: 6px 12px;
  }

  .site-header {
    padding: 1rem 2rem;
  }

  .description-section {
    max-width: 675px;
    margin: 1rem;
    padding: 0 1rem;
  }

  .description-section p {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .help-section {
    max-width: 675px;
    margin: 1rem;
    padding: 0 1rem;
  }

  .box {
    width: 675px;
  }

  .box h2 {
    font-size: 1.5rem;
    margin: 5px;
  }

  .box p {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .my-gacha-list-container {
    width: 675px;
    margin: 1rem auto;
  }

  .gacha-input {
    width: 100%;
    font-size: 14px;
  }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }

  .nav a {
    margin: 0.5rem 0;
    color: #ccc;
  }

  .nav-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
  }
}

/* Phones (≤ 425px) */
@media (max-width: 425px) {

  .intro h1,
  .intro-game h1,
  .speech-title {
    font-size: 1.6rem;
  }

  .speech-block p,
  .intro p,
  .intro-contact p {
    font-size: 1rem;
  }

  .intro-game {
    max-width: 380px;
    margin: 0;
    padding: 5rem;
  }

  .game-list {
    max-width: 380px;
    margin: 0;
    padding: 1rem 0;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    height: 160px;
  }

  .spine-icon-btn {
    padding: 4px 8px;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .nsfw-notice {
    width: 380px;
  }

  #player-container {
    max-width: 380px;
    margin: 1rem auto;
  }

  #player-container-bar {
    width: 380px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .player-buttons {
    width: 380px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
  }

  .player-buttons-space {
    display: none;
  }

  .left-buttons {
    flex-wrap: wrap;
    gap: 0.1rem;
  }

  .player-buttons p {
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .horizontal-section {
    width: 380px;
  }

  .horizontal-section-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem;
  }

  .side-image {
    width: 95px;
    height: auto;
    flex-shrink: 0;
  }

  .horizontal-section-text-content {
    flex: 1;
  }

  .description-section {
    max-width: 380px;
    margin: 1rem;
    padding: 0 1rem;
  }

  .description-section p {
    font-size: 0.80rem;
    line-height: 1.6;
  }

  .help-section {
    max-width: 380px;
    margin: 1rem;
    padding: 0 1rem;
  }

  .box {
    width: 380px;
  }

  .box h2 {
    font-size: 1.5rem;
    margin: 5px;
  }

  .box p {
    font-size: 0.80rem;
    line-height: 1.6;
  }

  .my-gacha-list-container {
    width: 380px;
    margin: 1rem auto;
  }

  .gacha-input {
    width: 100%;
    font-size: 14px;
  }

  .profile-header {
    display: flex;
    flex-direction: column;
    gap: 0rem;
  }

  .description-input {
    width: 100%;
  }

  .gacha-columns {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav a {
    margin-left: 1rem;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}