* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #ffffff;
  background-color: #1a2530;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35)), url("back.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.bg-ready::before {
  opacity: 1;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
}

.fixed-corner-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #1e1e1e;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: none;
}

.fixed-corner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.brand {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.welcome-text {
  position: absolute;
  top: 18vh;
  left: 50%;
  font-size: 60px;
  font-weight: 300;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  z-index: 999;
  opacity: 0;
  transform: translate(-50%, 8px);
  animation: welcomeFadeIn 0.5s ease-out forwards;
  white-space: nowrap;
}

.welcome-subtext {
  position: absolute;
  top: calc(18vh + 76px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  opacity: 0;
  animation: welcomeSubFadeIn 0.5s ease-out forwards;
}

@keyframes welcomeSubFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.actions {
  position: absolute;
  top: 62vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
}

.play-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #1e1e1e;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(8px);
  animation: buttonFadeIn 0.5s ease-out 0.5s forwards;
  cursor: pointer;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.server-popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%);
  min-width: 320px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #1e1e1e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  z-index: 1300;
}

.server-popover.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.server-popover-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.server-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 16px;
}

.copy-ip-btn {
  border: none;
  border-radius: 8px;
  background: #1e1e1e;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.server-version {
  margin: -6px 0 8px 82px;
  font-size: 13px;
  color: #444444;
}

.popover-note {
  margin-top: 2px;
  font-size: 13px;
  color: #444444;
}

@keyframes buttonFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rules-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.table-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.table-wrap {
  width: min(760px, 90vw);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.table-title {
  margin-bottom: 16px;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.table-tip {
  width: min(760px, 90vw);
  margin: 0 auto 10px;
  text-align: left;
  font-size: 18px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.notice-board {
  margin-top: 26px;
  margin-bottom: 5vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.table-section .notice-board {
  margin-top: 0;
  margin-bottom: 26px;
}

.table-section .table-wrap {
  margin-bottom: 5vh;
}

.notice-title {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.rules-page .notice-title,
.rules-page .notice-box {
  opacity: 0;
  transform: translateY(8px);
}

.rules-page.content-ready .notice-title {
  animation: contentFadeIn 0.5s ease-out forwards;
}

.rules-page.content-ready .notice-box {
  animation: contentFadeIn 0.5s ease-out 0.15s forwards;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice-box {
  width: min(760px, 90vw);
  min-height: 110px;
  padding: 16px 18px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.scroll-hint.hidden {
  opacity: 0;
}

.copy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #1e1e1e;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
}

.copy-toast.show {
  animation: copyToastLifecycle 4s ease forwards;
}

@keyframes copyToastLifecycle {
  0% {
    opacity: 0;
  }

  12.5% {
    opacity: 1;
  }

  87.5% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  color: #1f1f1f;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 16px;
}

th {
  background: rgba(245, 245, 245, 0.95);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

.warning-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.warning-modal.warning-modal--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.warning-modal[hidden] {
  display: none;
}

html.warning-modal-open,
html.warning-modal-open body {
  overflow: hidden;
}

.warning-modal__panel {
  width: min(520px, 100%);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: #1e1e1e;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.warning-modal__title {
  flex-shrink: 0;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.warning-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.warning-modal__dismiss {
  flex-shrink: 0;
  align-self: center;
  padding: 12px 36px;
  border: none;
  border-radius: 10px;
  background: #1e1e1e;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.warning-modal__dismiss:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
