/* Setting */

:root {
  --font-base:
    "Pretendard", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "GmarketSans", "Pretendard", sans-serif;
  --fs-base: clamp(14px, 3.2vw, 16px);

  /* Brand */
  --c-primary: #1f80ff;
  --c-secondary: #ffc400;
  --c-weak: #c2dcff;

  --c-cancel: #ff4d4f; /* 중간 밝기, 가장 일반적인 경고 빨강 */

  /* Text */
  --c-text: #f1f1f1;
  --c-text-sub: #d0d0d0;

  /* Background */
  --c-bg: #000000;
  --c-bg-soft: #0f0f0f;

  /* Border */
  --c-border: #2a2a2a;

  /* Overlay */
  --drawer-bg: #171a21;
  --overlay: rgba(10, 10, 12, 0.6);

  /* size */
  --header-h: 56px;
  --header-icon-size: 22px;
  --header-icon-touch: 40px;
  --footer-h: 54px;
  --footer-up-h: 124px;

  --seat-blue-stroke: #7bb6d9;
  --seat-blue-fill: rgba(123, 182, 217, 1);

  --seat-green-stroke: #9fd3a6;
  --seat-green-fill: rgba(159, 211, 166, 1);

  --seat-yellow-stroke: #f1d27a;
  --seat-yellow-fill: rgba(241, 210, 122, 1);
}

@media (min-width: 1024px) {
  :root {
    --header-h: 100px;
    --header-icon-size: 44px;
    --header-icon-touch: 80px;
  }
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body.locked {
  overflow: hidden;
}

h1 {
  font-size: clamp(1.2rem, 5vw, 1.8rem);
}
h2 {
  font-size: clamp(1.15rem, 4.5vw, 1.65rem);
}
h3 {
  font-size: clamp(1.05rem, 3.6vw, 1.5rem);
}
h4 {
  font-size: clamp(1rem, 2.8vw, 1.4rem);
}
h5 {
  font-size: clamp(0.8rem, 2.4vw, 1.2rem);
}
h6 {
  font-size: clamp(0.7rem, 2vw, 1rem);
}

p {
  font-size: clamp(0.7rem, 1.9vw, 0.9rem);
}

h1,
h2 {
  font-weight: 700;
}
h3,
h4 {
  font-weight: 600;
}
h5,
h6 {
  font-weight: 600;
}

input {
  display: flex;
  align-items: center;
}

.text-shadow-l {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.text-shadow {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.shadow-xs {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-sm {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.shadow-md {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ease {
  transition: all 0.25s ease;
}

.ease-fast {
  transition: all 0.15s ease;
}

.tap {
  -webkit-tap-highlight-color: transparent;
}

.tap:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.glow-primary {
  box-shadow: 0 0 12px rgba(31, 128, 255, 0.45);
}

/* layout */

.wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-border);
}

header .header-left,
header .header-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 40px;
  height: 100%;
}

header .header-left .logo {
  height: 80%;
  display: flex;
  align-items: center;
  gap: 8px;
}

header .logoImg {
  position: relative;
  width: auto;
  height: 75%;
}

header .header-right .icon {
  width: var(--header-icon-size);
  height: var(--header-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  font-size: 2rem;
}

header nav {
  position: fixed;
  width: 100%;
  height: 100%;
  inset: 0;
  z-index: 999;
  background: var(--overlay);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
}

header nav .nav-drawer {
  width: 58%;
  max-width: 320px;
  height: 100%;
  background: var(--drawer-bg);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 60px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.45);
  animation: drawer-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

header nav .nav-drawer a {
  width: 100%;
  text-align: right;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(100%);
  }
}

main {
  width: 100%;
  padding: 10px 20px;
}

footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-border);
  padding: 10px;
}

footer > * {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

footer .footer-terms {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 12px;
}

footer button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 10px;
  margin: 10px 0;
}

footer .footer-terms button:not(:last-child) {
  padding-right: 12px;
  border-right: 1px solid var(--c-text);
}

@media (min-width: 1024px) {
  header {
    padding: 0 10%;
  }

  header .header-right {
    display: none;
  }

  header nav {
    position: relative;
    width: 60%;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header nav .nav-drawer {
    width: 100%;
    max-width: 800px;
    height: 100%;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: row;
    padding: 0;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    box-shadow: none;
    animation: none;
  }

  header nav .nav-drawer a {
    width: 100%;
    text-align: center;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
  }

  main {
    width: 80%;
    margin: 0 auto;
    padding: 20px 0;
  }

  footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg-soft);
    border-top: 1px solid var(--c-border);
    padding: 10px;
    gap: 3px;
  }

  footer > * {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
  }

  footer .footer-terms {
    justify-content: flex-start;
  }
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 120px;
  max-width: 320px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  white-space: nowrap;
  word-break: keep-all;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.top {
  top: 70px;
}

.toast.bottom {
  bottom: 120px;
}

.modal-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  inset: 0;
  z-index: 999;
  background: var(--overlay);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-container {
  background: var(--c-text-sub);
  border-radius: 10px;
  height: 60%;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  padding-bottom: 10px;
}

@media (min-width: 1024px) {
  .modal-container {
    width: 1000px;
    height: 60%;
  }
}

*::-webkit-scrollbar {
  display: none;
}

.modal-close {
  position: absolute;
  width: 24px;
  height: 24px;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

img.modal-close {
  position: absolute;
  width: 12px;
  height: 12px;
  top: 15px;
  right: 15px;
  border: none;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

.modal-close img {
  width: 12px;
  height: 12px;
}

.modal-content {
  width: 100%;
  height: calc(100% - 50px);
  overflow-y: auto;
  color: #0f0f0f;
}

.modal-title {
  height: 50px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #0f0f0f;
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-desc {
  padding: 12px;
}

.hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.disabled {
  pointer-events: none;
  opacity: 0.4;
  filter: grayscale(100%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
}

button:hover,
a:hover {
  color: #1f80ff !important;
  transition: all 0.2s ease;
}

button.wiggle,
a.wiggle {
  animation: tap-wiggle 140ms ease-out;
}

@keyframes tap-wiggle {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-1px) rotate(-1deg);
  }
  50% {
    transform: translateX(1px) rotate(1deg);
  }
  75% {
    transform: translateX(-0.5px) rotate(-0.5deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.loading.hidden {
  display: none;
}

.loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-bottom: 12px;
}

.confirm {
  padding: 10px 20px;
}

.msg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin-bottom: 10px;
  color: var(--c-cancel-dark);
}

.text {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.confirm-button-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 30px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.confirm button {
  padding: 5px 20px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-weight: bold;
  color: var(--c-bg);
  background-color: var(--c-secondary);
}

.confirm button:last-child {
  background: var(--c-primary);
}

.terms-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 20px;
  overflow-y: scroll;
}
