/* Toss-Style Shared CSS — Auth Server UI */

/* Font */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

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

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #191f28;
  background: #f9fafb;
  line-height: 1.5;
}

/* ===================== Animations ===================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-40px); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes slideInFromBottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideOutToBottom {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* Tab page transition */
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Count-up number animation */
@keyframes countPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ===================== Skeleton ===================== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ===================== Stepper ===================== */
.toss-stepper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.toss-step {
  display: none;
  width: 100%;
}

.toss-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.toss-step.entering-right {
  display: block;
  animation: slideInRight 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toss-step.entering-left {
  display: block;
  animation: slideInLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toss-step.leaving-left {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  animation: slideOutLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toss-step.leaving-right {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  animation: slideOutRight 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ===================== Bottom Sheet ===================== */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 1001;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 12px auto 0;
}

.bottom-sheet-header {
  padding: 16px 24px 8px;
  font-size: 18px;
  font-weight: 700;
  color: #191f28;
}

.bottom-sheet-body {
  padding: 8px 24px 24px;
}

/* ===================== Toast ===================== */
.toss-toast-container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: 100%;
  max-width: 400px;
  padding: 16px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toss-toast {
  background: #191f28;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.toss-toast.success {
  background: #1b7a4a;
}

.toss-toast.error {
  background: #dc2626;
}

.toss-toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

/* ===================== Modal ===================== */
.toss-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.toss-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  animation: scaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.toss-modal.hiding {
  animation: scaleOut 0.2s ease forwards;
}

.toss-modal-header {
  padding: 24px 24px 8px;
  font-size: 18px;
  font-weight: 700;
}

.toss-modal-body {
  padding: 8px 24px 24px;
}

.toss-modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 8px;
}

/* ===================== Utility ===================== */
.animate-fade-in {
  animation: fadeIn 0.4s ease;
}

.animate-fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
