/* 프리텐다드 폰트 import */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* CSS Reset - 브라우저 기본 스타일 완전 제거 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 모든 요소의 기본 스타일 초기화 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 링크와 버튼의 기본 스타일 완전 제거 */
a {
  color: inherit;
  text-decoration: none;
  background: transparent;
}

a:active,
a:hover {
  outline: 0;
}

button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button:focus {
  outline: none;
}

button:active {
  outline: none;
}

/* 입력 필드 기본 스타일 제거 */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: transparent;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* 기본 스타일 재설정 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--font-size-base);
  letter-spacing: -0.03em;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
}

/* Root 스타일 및 CSS 변수 */
:root {
  /* 색상 변수 */
  --color-primary-gradient: linear-gradient(0deg, #e56b36, #e56b36),
    linear-gradient(90deg, #b21e23 0%, #e74c3c 100%);
  --color-text: #3d3d3d;
  --color-text-secondary: #666;
  --color-border: #ddd;
  --color-background: #fff;

  --primary-color: #e56b36;
  --primary-light: #e74c3c;
  --primary-dark: #b21e23;
  --danger-color: #e74c3c;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #95a5a6;
  --bg-light: #f8f9fa;
  --bg-lighter: #fafbfc;
  --border-color: #e0e0e0;
  --border-radius: 8px;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);

  /* 폰트 크기 변수 */
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.25rem;
  /* 20px */
  --font-size-2xl: 1.5rem;
  /* 24px */

  /* 간격 변수 */
  --spacing-xs: 0.25rem;
  /* 4px */
  --spacing-sm: 0.5rem;
  /* 8px */
  --spacing-md: 1rem;
  /* 16px */
  --spacing-lg: 1.5rem;
  /* 24px */
  --spacing-xl: 2rem;
  /* 32px */

  /* 헤더 높이 */
  --header-height: 110px;
  --header-height-mobile: 65px;

  /* 컨테이너 최대 너비 */
  --container-max-width: 1280px;

  /* 트랜지션 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 그림자 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* 간격 유틸리티 클래스 */
.gap-20 {
  height: 20px;
}

.gap-30 {
  height: 30px;
}

.gap-40 {
  height: 40px;
}

/* 모바일에서 간격 조정 */
@media (max-width: 768px) {
  .gap-20 {
    height: var(--spacing-md);
  }

  .gap-30 {
    height: var(--spacing-lg);
  }

  .gap-40 {
    height: var(--spacing-xl);
  }
}

/* 작은 모바일에서 간격 더 줄이기 */
@media (max-width: 320px) {
  .gap-20 {
    height: var(--spacing-sm);
  }

  .gap-30 {
    height: var(--spacing-md);
  }

  .gap-40 {
    height: var(--spacing-lg);
  }
}

/* 헤더 스타일 */
header {
  position: sticky;
  top: 0;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition-normal);
  backdrop-filter: blur(10px);
}

/* 스크롤 시 헤더 효과 */
header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-lg);
}

/* 스피너 스타일 */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.spinner-overlay.show {
  opacity: 1;
  visibility: visible;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(229, 107, 54, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-text {
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-align: center;
  margin: 0;
}

/* 스피너 애니메이션 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 다양한 크기의 스피너 */
.spinner.small {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.spinner.large {
  width: 70px;
  height: 70px;
  border-width: 5px;
}

/* 다중 링 스피너 */
.spinner-multi {
  position: relative;
  width: 50px;
  height: 50px;
}

.spinner-multi::before,
.spinner-multi::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-multi::before {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(229, 107, 54, 0.1);
  border-top: 4px solid var(--primary-color);
  animation-duration: 1s;
}

.spinner-multi::after {
  width: 30px;
  height: 30px;
  top: 10px;
  left: 10px;
  border: 3px solid rgba(229, 107, 54, 0.2);
  border-top: 3px solid var(--primary-light);
  animation-duration: 0.8s;
  animation-direction: reverse;
}

/* 펄스 스피너 */
.spinner-pulse {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.8);
    opacity: 1;
  }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .spinner,
  .spinner-multi::before,
  .spinner-multi::after,
  .spinner-pulse {
    animation: none;
  }
}
