/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 430px;
  height: 100%;
  background: url('../assets/dragon-bg.png') center center / contain no-repeat;
  opacity: 0.49;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ===== Screen Container ===== */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

.screen.active {
  display: flex;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-gothic);
  font-size: var(--font-size-md);
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--color-button);
  color: var(--color-button-text);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-back {
  background: none;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  padding: var(--space-xs) var(--space-sm);
  gap: var(--space-xs);
}


/* ===== Placeholder Image ===== */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-gothic);
}

/* ===== Overlay ===== */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.overlay.active {
  display: flex;
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
