/* 커스텀 스타일 */

/* 기본 설정 - 애플/토스 스타일 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --text-color: #111827;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* TailwindCSS 커스텀 애니메이션 정의 */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 애니메이션 클래스 정의 */
.animate-blob {
    animation: blob 7s infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* 기본 스타일 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-display: swap; /* 폰트 스왑으로 FOIT 방지 */
}

/* 토스 스타일 메인 컨텐츠 */
main {
    min-height: 100vh;
}

/* Hero 섹션을 위한 헤더 여백 조정 */
.hero-section {
    padding-top: 80px; /* 헤더 높이만큼 패딩 */
}

/* 일반 페이지들을 위한 헤더 여백 (홈페이지 제외) */
body:not(.home-page) main {
    padding-top: 80px;
}

/* 홈페이지가 아닌 페이지의 첫 번째 섹션 추가 여백 */
body:not(.home-page) section:first-of-type {
    padding-top: 2rem;
}

/* 헤더 스타일 - 토스 스타일 */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color, backdrop-filter, box-shadow;
}

/* 스크롤 시 헤더 스타일 */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 다크모드 헤더 */
.dark .navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 토스 스타일 네비게이션 링크 */
.nav-link {
    color: #4b5563;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    letter-spacing: -0.025em;
}

.nav-link:hover {
    color: #1f2937;
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.08);
}

/* 다크모드 네비게이션 링크 */
.dark .nav-link {
    color: #9ca3af;
}

.dark .nav-link:hover {
    color: #f3f4f6;
    background-color: rgba(255, 255, 255, 0.08);
}

.dark .nav-link.active {
    color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.1);
}

/* 버튼 스타일 - 애플 스타일 */
.btn-gradient {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #1d4ed8;
}

/* 카드 스타일 - 미니멀 */
.glass-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* 섹션 스타일 */
.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* 스크롤 인디케이터 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 100;
    transform-origin: left;
    will-change: transform;
    transform: translateZ(0);
}

/* 네비게이션 다크모드 토글 */
.dark .navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(51, 65, 85, 0.3) !important;
}

.dark .nav-link {
    color: #f1f5f9 !important;
}

.dark .nav-link:hover {
    color: #a855f7 !important;
    background-color: rgba(168, 85, 247, 0.1) !important;
}

/* 로고 다크모드 스타일 */
.dark .navbar a[href*="home"] {
    color: #f1f5f9 !important;
}

.dark .navbar a[href*="home"]:hover {
    color: #3b82f6 !important;
}

/* 다크모드 body 배경 */
.dark body {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #f1f5f9 !important;
}

/* 다크모드 섹션별 스타일 */
.dark section {
    background: transparent !important;
}

.dark .bg-white {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #f1f5f9 !important;
}

.dark .bg-gray-50 {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #f1f5f9 !important;
}

.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark .text-gray-600 {
    color: #94a3b8 !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-800 {
    color: #e2e8f0 !important;
}

.dark .border-gray-100 {
    border-color: rgba(51, 65, 85, 0.3) !important;
}

.dark .border-gray-200 {
    border-color: rgba(51, 65, 85, 0.5) !important;
}

.dark .hover\:border-gray-300:hover {
    border-color: rgba(71, 85, 105, 0.7) !important;
}

.dark .bg-blue-50 {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #3b82f6 !important;
}

.dark .bg-blue-100 {
    background: rgba(37, 99, 235, 0.2) !important;
}

.dark .bg-purple-100 {
    background: rgba(139, 92, 246, 0.2) !important;
}

.dark .bg-green-100 {
    background: rgba(16, 185, 129, 0.2) !important;
}

.dark .bg-orange-100 {
    background: rgba(245, 158, 11, 0.2) !important;
}

.dark .text-blue-600 {
    color: #60a5fa !important;
}

.dark .text-purple-600 {
    color: #a78bfa !important;
}

.dark .text-green-600 {
    color: #34d399 !important;
}

.dark .text-orange-600 {
    color: #fbbf24 !important;
}

/* 네비게이션 active 상태 */
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1) !important;
    font-weight: 600;
}

.dark .nav-link.active {
    color: #60a5fa !important;
    background-color: rgba(96, 165, 250, 0.1) !important;
}

/* 모바일 네비게이션 active 상태 */
.nav-link-mobile.active {
    color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.1) !important;
    font-weight: 600;
}

.dark .nav-link-mobile.active {
    color: #60a5fa !important;
    background-color: rgba(96, 165, 250, 0.1) !important;
}

/* 다크모드 버튼 개선 */
.dark button[id*="darkMode"] {
    background: rgba(51, 65, 85, 0.8) !important;
    border-color: rgba(71, 85, 105, 0.5) !important;
}

.dark button[id*="darkMode"]:hover {
    background: rgba(71, 85, 105, 0.9) !important;
    border-color: rgba(100, 116, 139, 0.7) !important;
}

/* 다크모드 CTA 섹션 */
.dark .bg-gradient-to-br.from-blue-600.to-purple-600 {
    background: linear-gradient(to bottom right, #1e40af, #7c3aed) !important;
}

/* 토스 스타일 모바일 메뉴 */
.navbar-collapse {
    position: absolute;
    top: 100%; 
    left: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-15px) scale(0.95) translateZ(0);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    z-index: 50;
    will-change: transform, opacity, max-height;
    /* 기본적으로 숨겨진 상태 */
    visibility: hidden;
}

/* 태블릿 화면에서 모바일 메뉴 최적화 */
@media (min-width: 768px) and (max-width: 1023px) {
    .navbar-collapse {
        left: 1rem;
        right: 1rem;
    }
}

.navbar-collapse.show {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
    padding: 1rem;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.navbar-collapse.hide {
    max-height: 0;
    opacity: 0;
    transform: translateY(-15px) scale(0.95) translateZ(0);
    padding: 0 1rem;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}



.navbar-collapse a {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    color: #374151;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    opacity: 0;
    transform: translateX(-20px) translateZ(0);
    will-change: transform, opacity;
}

.navbar-collapse.show a {
    opacity: 1;
    transform: translateX(0) translateZ(0);
}

.navbar-collapse.show a:nth-child(1) { transition-delay: 0.05s; }
.navbar-collapse.show a:nth-child(2) { transition-delay: 0.1s; }
.navbar-collapse.show a:nth-child(3) { transition-delay: 0.15s; }
.navbar-collapse.show a:nth-child(4) { transition-delay: 0.2s; }
.navbar-collapse.show a:nth-child(5) { transition-delay: 0.25s; }
.navbar-collapse.show a:nth-child(6) { transition-delay: 0.3s; }

.navbar-collapse a:hover {
    color: #1f2937;
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateX(4px) translateZ(0);
}

/* 다크모드 모바일 메뉴 */
.dark .navbar-collapse {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dark .navbar-collapse.show {
    background: rgba(15, 23, 42, 0.95);
}

.dark .navbar-collapse.hide {
    background: rgba(15, 23, 42, 0.95);
}

.dark .navbar-collapse a {
    color: #d1d5db;
    opacity: 0;
    transform: translateX(-20px) translateZ(0);
}

.dark .navbar-collapse.show a {
    opacity: 1;
    transform: translateX(0) translateZ(0);
}

.dark .navbar-collapse a:hover {
    color: #f3f4f6;
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px) translateZ(0);
}

/* 토스 스타일 햄버거 메뉴 버튼 */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: none;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    will-change: transform, background-color;
}

.navbar-toggler:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark .navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* 햄버거 메뉴 아이콘 애니메이션 */
.navbar-toggler svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    will-change: transform;
}

/* 폼 스타일 - 애플/토스 디자인 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* 포커스 상태 개선 */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* 라벨 스타일 */
label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

/* 다크모드 폼 스타일 */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="tel"],
.dark input[type="password"],
.dark textarea,
.dark select {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
    color: #f1f5f9 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #94a3b8 !important;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: #3b82f6 !important;
    ring-color: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.dark label {
    color: #f1f5f9 !important;
}

/* 에러 메시지 스타일 */
.text-red-500 {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.dark .text-red-500 {
    color: #f87171 !important;
}

/* 폼 카드 다크모드 */
.dark .section-title {
    color: #f1f5f9 !important;
}

.dark .section-subtitle {
    color: #94a3b8 !important;
}

.dark .text-sm.font-medium.text-gray-700 {
    color: #f1f5f9 !important;
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(51, 65, 85, 0.3) !important;
    color: #f1f5f9 !important;
}

/* 파티클 효과 - 성능 최적화 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

.particle {
    position: absolute;
    background: rgba(37, 99, 235, 0.03);
    border-radius: 50%;
}

/* 부드러운 전환 효과 */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 인터랙티브 버튼 효과 */
.btn-interactive {
    position: relative;
    overflow: hidden;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-interactive:hover::before {
    left: 100%;
}

/* 통합 로딩 시스템 */
.universal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    will-change: opacity, visibility;
}

.universal-loader.active {
    opacity: 1;
    visibility: visible;
}

.universal-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.universal-loader.hidden {
    display: none !important;
}

/* 로더 배경 */
.loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    opacity: 0.95;
}

.universal-loader.dark-mode .loader-backdrop {
    background: linear-gradient(135deg, #1e293b, #374151);
}

/* 로더 콘텐츠 */
.loader-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.universal-loader.fade-out .loader-content {
    transform: translateY(-20px);
    opacity: 0.7;
}

/* 로더 아이콘 */
.loader-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.loader-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    animation: loaderPulse 2s ease-in-out infinite;
}

.loader-spinner {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 로더 텍스트 */
.loader-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 진행률 바 */
.loader-progress {
    width: 240px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,1), rgba(255,255,255,0.8));
    border-radius: 6px;
    position: relative;
    transition: width 0.3s ease;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

/* 로딩 중 body 스타일 */
body.loading-active {
    overflow: hidden;
}

body.loading-active .navbar {
    pointer-events: none;
}

/* 부드러운 애니메이션 정의 */
@keyframes loaderPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

@keyframes smoothPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@keyframes smoothProgress {
    0% { width: 0%; }
    20% { width: 30%; }
    50% { width: 60%; }
    80% { width: 90%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 성능 최적화를 위한 CSS */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.will-change-scroll {
    will-change: scroll-position;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-transform: translateZ(0);
}

/* 자주 애니메이션되는 요소들에 GPU 가속 적용 */
.navbar,
.glass-card,
.btn-gradient,
.animated-card,
.page-loader,
.navbar-collapse {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

/* 호버 효과가 있는 요소들 */
.group:hover,
.hover-lift:hover,
.btn-gradient:hover {
    will-change: transform;
}

/* 접근성 개선 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 표시 개선 */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 반응형 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* 애플 스타일 호버 효과 */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* 다크모드 로딩 화면 */
.dark .page-loader {
    background: linear-gradient(135deg, #1e293b, #374151);
}

.dark #smoothTransitionOverlay {
    background: linear-gradient(135deg, #1e293b, #374151);
}

.dark .loader-logo img {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .loader-bar {
    background: rgba(255, 255, 255, 0.1);
}

.dark .loader-progress {
    background: linear-gradient(90deg, rgba(59,130,246,0.8), rgba(59,130,246,1), rgba(59,130,246,0.8));
}

.dark .loader-progress::after {
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.6), transparent);
}

/* 다크모드 부드러운 전환 */
html {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 다크모드 전환 시 주요 요소들만 부드럽게 전환 */
.navbar,
.glass-card,
input, textarea, select,
.btn-gradient {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 모바일 메뉴 애니메이션 강제 활성화 */
.navbar-collapse {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.navbar-collapse a {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.navbar-toggler svg {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* 버튼과 링크 호버 애니메이션 복원 */
.btn-gradient,
.nav-link,
button,
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 카드 호버 애니메이션 복원 */
.glass-card,
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 다크모드 즉시 적용을 위한 강제 스타일 */
html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

/* 페이지 전환 애니메이션 */
@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
    0% { opacity: 0; transform: translateX(50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromBottom {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromTop {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    0% { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

/* 애니메이션 클래스 */
.animate-slide-in-left {
    animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
    animation: slideInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-top {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-rotate-in {
    animation: rotateIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 지연 애니메이션 */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* 포트폴리오 카드 애니메이션 */
.portfolio-card-enter {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.portfolio-card-exit {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card-exit-active {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

/* 로딩 상태 애니메이션 개선 */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 0px, #4b5563 40px, #374151 80px);
}

/* 필터 버튼 애니메이션 개선 */
.filter-btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.filter-btn-animated:hover::before {
    left: 100%;
}

.filter-btn-animated:active {
    transform: scale(0.95);
}

/* 스크롤 애니메이션을 위한 Intersection Observer 스타일 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate.delay-1 { transition-delay: 0.1s; }
.scroll-animate.delay-2 { transition-delay: 0.2s; }
.scroll-animate.delay-3 { transition-delay: 0.3s; }
.scroll-animate.delay-4 { transition-delay: 0.4s; }
.scroll-animate.delay-5 { transition-delay: 0.5s; }

/* 검색 입력 애니메이션 */
.search-input-focus {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-focus:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

/* 부드러운 페이지 전환 효과 (smooth-navigation.js에서 처리) */
#smoothTransitionOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
    pointer-events: none;
}

#smoothTransitionOverlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content.transitioning {
    opacity: 0.8;
    transform: translateY(10px);
}

/* 페이지 로드 시 부드러운 등장 */
body.page-loading .page-content {
    opacity: 0;
    transform: translateY(20px);
}

body.page-loaded .page-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 마이크로 인터랙션 */
.micro-bounce {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.micro-bounce:hover {
    transform: translateY(-2px);
}

.micro-bounce:active {
    transform: translateY(0);
}

/* 성능 최적화 */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.will-change-scroll {
    will-change: scroll-position;
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 접근성 애니메이션 비활성화 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-animate {
        opacity: 1;
        transform: none;
    }
} 