/* ============================================
   현대적인 다크 테마 디자인 - 검정 메인, 파란 포인트
   ============================================ */

/* CSS Variables - 검정 메인, 파란 포인트 */
:root {
    /* 파란 포인트 색상 */
    --blue-primary: #3b82f6;
    --blue-light: #60a5fa;
    --blue-dark: #2563eb;
    --blue-glow: rgba(59, 130, 246, 0.4);

    /* 검정 메인 색상 */
    --black-main: #000000;
    --black-dark: #0a0a0a;
    --black-medium: #1a1a1a;
    --black-light: #2a2a2a;

    /* 글래스모피즘 */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* 텍스트 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    /* 배경 */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
}

/* Select 드롭다운 커스텀 스타일 */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    border-color: var(--blue-light) !important;
}

select:focus {
    outline: none;
    border-color: var(--blue-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* Option 스타일 (다크모드) */
option {
    background-color: #1a1a1a !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
}

select option:checked,
select option:hover {
    background-color: var(--blue-primary) !important;
    color: #ffffff !important;
}

/* 라이트 모드 */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg-primary: #ffffff;
        --bg-secondary: #f8f9fa;
        --bg-tertiary: #f1f3f5;
        --black-main: #ffffff;
        --black-dark: #f8f9fa;
        --black-medium: #f1f3f5;
        --black-light: #e9ecef;
        --text-primary: #000000;
        --text-secondary: rgba(0, 0, 0, 0.7);
        --text-tertiary: rgba(0, 0, 0, 0.5);
        --glass-bg: rgba(0, 0, 0, 0.03);
        --glass-border: rgba(0, 0, 0, 0.1);
        --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    :root:not([data-theme]) select {
        background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    :root:not([data-theme]) option {
        background-color: #ffffff !important;
        color: var(--text-primary) !important;
    }

    :root:not([data-theme]) select option:checked,
    :root:not([data-theme]) select option:hover {
        background-color: var(--blue-primary) !important;
        color: #ffffff !important;
    }
}

/* data-theme이 설정된 경우 */
[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="light"] option {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] select option:checked,
[data-theme="light"] select option:hover {
    background-color: var(--blue-primary) !important;
    color: #ffffff !important;
}

[data-theme="dark"] option {
    background-color: #1a1a1a !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] select option:checked,
[data-theme="dark"] select option:hover {
    background-color: var(--blue-primary) !important;
    color: #ffffff !important;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --black-main: #000000;
    --black-dark: #0a0a0a;
    --black-medium: #1a1a1a;
    --black-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --black-main: #ffffff;
    --black-dark: #f8f9fa;
    --black-medium: #f1f3f5;
    --black-light: #e9ecef;
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-tertiary: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    /* X축 스크롤 완전 비활성화 */
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Safari/iOS 최적화 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* iOS Safari에서 스크롤 바운스 효과 방지 */
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
    /* iOS Safari에서 터치 딜레이 제거 */
    touch-action: pan-y;
    /* iOS Safari에서 선택 시 색상 제거 */
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    /* 모바일 브라우저 주소창 대응 */
    min-height: 100dvh;
    /* iOS Safari 노치 대응 */
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* 헤더가 없는 페이지를 위한 클래스 */
body.no-header {
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   헤더 - 글래스모피즘 네비게이션
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 0;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px;
    overflow: visible !important;
    will-change: padding, height;
    /* iOS Safari 최적화 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 라이트 모드 헤더 배경 */
[data-theme="light"] .header {
    background: #ffffff;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="light"] .header.mini {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header.scrolled {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header.scrolled.expanded {
    background: #ffffff;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .header {
        background: #ffffff;
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }

    :root:not([data-theme]) .header.mini {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    :root:not([data-theme]) .header.scrolled {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    :root:not([data-theme]) .header.scrolled.expanded {
        background: #ffffff;
    }
}

/* 헤더 확장 상태 (기본) */
.header.expanded {
    padding: 1.25rem 0;
    height: 80px;
}

/* 헤더 최소화 상태 (스크롤 시) */
.header.mini {
    padding: 0.5rem 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .header.mini {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .header.mini {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
}

.header.mini .logo {
    font-size: 1.125rem;
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.mini .nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.mini .nav-link.nav-button {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* 헤더 스크롤 상태 (스크롤 시 배경 강화) */
.header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.header.scrolled.expanded {
    background: rgba(0, 0, 0, 0.92);
}

[data-theme="light"] .header.scrolled {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header.scrolled.expanded {
    background: #ffffff;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .header.scrolled {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    :root:not([data-theme]) .header.scrolled.expanded {
        background: #ffffff;
    }
}

/* 헤더 호버 시 부드러운 전환 */
.header:hover {
    transition-duration: 0.2s;
}

/* 로고 애니메이션 */
.logo {
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.expanded .logo {
    font-size: 1.5rem;
}

.header.mini .logo {
    font-size: 1.125rem;
}

/* 네비게이션 링크 애니메이션 */
.nav-link {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.expanded .nav-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

.header.mini .nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

/* 데스크톱에서 모바일 메뉴 버튼 및 메뉴 숨기기 */
.mobile-menu-toggle,
.mobile-menu,
.mobile-menu-overlay {
    display: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    overflow: visible;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-link.nav-button {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    overflow: visible;
}

.profile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: inherit;
    color: inherit;
    padding: 0.625rem 1.25rem;
    margin: 0;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
}

.profile-toggle:hover {
    opacity: 0.9;
}

.profile-toggle:focus {
    outline: none;
}

.profile-toggle svg {
    transition: transform 0.3s ease;
}

.profile-menu.active .profile-toggle svg {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: fixed;
    min-width: 220px;
    background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.95) 0%,
            rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    overflow: hidden;
    /* Safari에서 네비게이션 영역을 벗어날 수 있도록 */
    will-change: transform, opacity, visibility;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* JavaScript로 위치 계산 */
    top: auto;
    right: auto;
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.5),
            transparent);
}

.profile-menu.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
}

.dropdown-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.15) 0%,
            rgba(37, 99, 235, 0.1) 100%);
    color: var(--blue-light);
    transform: translateX(4px);
}

.dropdown-item:hover svg {
    opacity: 1;
    color: var(--blue-light);
}

.dropdown-item:active {
    transform: translateX(2px);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

[data-theme="light"] .dropdown-divider {
    background: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .dropdown-divider {
        background: rgba(0, 0, 0, 0.1);
    }
}

.theme-toggle-btn {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 다크 모드일 때 - 화이트, 파란 하늘 디자인 */
[data-theme="dark"] .theme-toggle-btn {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(147, 197, 253, 0.2) 50%,
            rgba(96, 165, 250, 0.15) 100%);
    border: 1px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(96, 165, 250, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(147, 197, 253, 0.25) 50%,
            rgba(96, 165, 250, 0.2) 100%);
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow:
        0 3px 12px rgba(96, 165, 250, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 라이트 모드일 때 - 하얀색 배경 */
[data-theme="light"] .theme-toggle-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-toggle-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* 아이콘 색상 조정 */
[data-theme="dark"] .theme-toggle-btn {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .theme-toggle-btn svg {
    color: rgba(147, 197, 253, 0.9);
}

[data-theme="light"] .theme-toggle-btn {
    color: #f59e0b;
}

[data-theme="light"] .theme-toggle-btn svg {
    color: #f59e0b;
}

[data-theme="light"] .theme-toggle-btn #theme-toggle-text {
    color: #f59e0b;
}

[data-theme="dark"] #theme-icon-sun,
[data-theme="dark"] #theme-icon-sun-mobile,
[data-theme="light"] #theme-icon-moon,
[data-theme="light"] #theme-icon-moon-mobile {
    display: block !important;
}

[data-theme="dark"] #theme-icon-moon,
[data-theme="dark"] #theme-icon-moon-mobile,
[data-theme="light"] #theme-icon-sun,
[data-theme="light"] #theme-icon-sun-mobile {
    display: none !important;
}

/* 모바일 메뉴 테마 토글 버튼 */
.theme-toggle-btn-mobile {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 다크 모드일 때 - 화이트, 파란 하늘 디자인 (모바일) */
[data-theme="dark"] .theme-toggle-btn-mobile {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(96, 165, 250, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 1.5rem;
    border-radius: 8px;
}

[data-theme="dark"] .theme-toggle-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow:
        0 3px 12px rgba(96, 165, 250, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 라이트 모드일 때 - 검정, 보라, 진파랑 밤하늘 디자인 (모바일) */
[data-theme="light"] .theme-toggle-btn-mobile {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(67, 56, 202, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 1.5rem;
    border-radius: 8px;
}

[data-theme="light"] .theme-toggle-btn-mobile:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(67, 56, 202, 0.4);
    box-shadow:
        0 3px 12px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 라이트 모드일 때 모바일 텍스트 표시 */
[data-theme="light"] .theme-toggle-btn-mobile #theme-toggle-text-mobile {
    display: inline !important;
}

/* 모바일 메뉴 아이콘 색상 조정 */
[data-theme="dark"] .theme-toggle-btn-mobile {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .theme-toggle-btn-mobile svg {
    color: rgba(147, 197, 253, 0.9);
}

[data-theme="light"] .theme-toggle-btn-mobile {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .theme-toggle-btn-mobile svg {
    color: #f59e0b;
}

[data-theme="light"] .theme-toggle-btn-mobile #theme-toggle-text-mobile {
    color: #f59e0b;
}

/* 라이트 모드 프로필 메뉴 */
[data-theme="light"] .profile-dropdown {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.02) inset;
}

[data-theme="light"] .profile-dropdown::before {
    background: linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.3),
            transparent);
}

[data-theme="light"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="light"] .dropdown-item:hover {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(37, 99, 235, 0.08) 100%);
    color: var(--blue-primary);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .profile-dropdown {
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.95) 0%,
                rgba(248, 249, 250, 0.95) 100%);
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(0, 0, 0, 0.02) inset;
    }

    :root:not([data-theme]) .profile-dropdown::before {
        background: linear-gradient(90deg,
                transparent,
                rgba(59, 130, 246, 0.3),
                transparent);
    }

    :root:not([data-theme]) .dropdown-item {
        color: var(--text-primary);
    }

    :root:not([data-theme]) .dropdown-item:hover {
        background: linear-gradient(135deg,
                rgba(59, 130, 246, 0.1) 0%,
                rgba(37, 99, 235, 0.08) 100%);
        color: var(--blue-primary);
    }
}

/* ============================================
   히어로 섹션 - 다이나믹 배경
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
    z-index: 1;
    /* 헤더 뒤에 위치하도록 */
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--blue-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--blue-glow);
    animation: float-up linear;
    opacity: 0.6;
}

.particle:nth-child(odd) {
    animation: float-up-fast linear;
    width: 5px;
    height: 5px;
    box-shadow: 0 0 15px var(--blue-glow);
}

@keyframes float-up {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    to {
        transform: translateY(-100px) translateX(200px);
        opacity: 0.4;
    }
}

@keyframes float-up-fast {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    to {
        transform: translateY(-100px) translateX(300px);
        opacity: 0.3;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    25% {
        opacity: 0.85;
        transform: scale(1.02);
    }

    50% {
        opacity: 0.75;
        transform: scale(1.05);
    }

    75% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    /* 헤더 뒤에 위치하도록 */
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--blue-light);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--blue-glow);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--blue-primary);
    color: var(--blue-light);
}

/* ============================================
   섹션 공통 스타일
   ============================================ */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--blue-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ============================================
   글래스 카드 - 글래스모피즘 (유리 효과)
   ============================================ */
.glass-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 글래스 카드 내부 빛 반사 효과 */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    pointer-events: none;
}

/* 라이트 모드용 글래스 효과 */
[data-theme="light"] .glass-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.6) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .glass-card {
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.8) 0%,
                rgba(255, 255, 255, 0.6) 100%);
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--blue-primary);
    box-shadow:
        0 12px 40px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.08) 100%);
}

/* ============================================
   서비스 소개 섹션
   ============================================ */
.about-section {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-grid .glass-card {
    text-align: center;
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 20px var(--blue-glow));
    transition: transform 0.3s ease;
}

.glass-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.glass-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.glass-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   FAQ 섹션
   ============================================ */
.faq-section {
    background: var(--bg-secondary);
    padding: 6rem 0;
}

.faq-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-preview-card {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-preview-card:hover {
    transform: translateY(-8px);
}

.faq-preview-card .card-icon {
    font-size: 3rem;
}

.faq-cta {
    margin-top: 3rem;
}

/* ============================================
   주요 기능 섹션
   ============================================ */
.features-section {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateX(12px);
    border-color: var(--blue-primary);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.feature-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-line {
    position: absolute;
    bottom: 0;
    left: 2.5rem;
    right: 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

/* ============================================
   프로세스 섹션
   ============================================ */
.process-section {
    background: var(--bg-secondary);
}

/* 한 줄 프로세스 타임라인 */
.process-timeline-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.process-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.process-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 20px var(--blue-glow);
    flex-shrink: 0;
}

.process-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.process-arrow {
    color: var(--blue-light);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    margin: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 100%;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
}

.step-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    color: white;
    border-radius: 50%;
    box-shadow: 0 8px 30px var(--blue-glow);
    position: relative;
}

.step-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--blue-primary);
    opacity: 0;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.step-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.process-step:hover .step-content {
    transform: translateY(-8px);
    border-color: var(--blue-primary);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.payment-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--blue-primary);
    border-radius: 12px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.payment-item:last-child {
    margin-bottom: 0;
}

.payment-item span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.payment-item strong {
    color: var(--blue-light);
    font-weight: 600;
}

/* ============================================
   가입 신청 섹션
   ============================================ */
.signup-section {
    background: var(--bg-primary);
}

.signup-cta {
    text-align: center;
    padding: 2rem 0;
}

.signup-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* 단일 폼인 경우 가운데 정렬 */
.signup-layout:has(> form:only-child) {
    display: flex;
    justify-content: center;
}

.signup-layout:has(> form:only-child)>.signup-form {
    max-width: 800px;
    width: 100%;
}

/* 가운데 정렬된 단일 카드 */
.signup-center {
    max-width: 800px;
    margin: 0 auto;
}

.signup-center .glass-card {
    width: 100%;
}

.signup-form {
    padding: 3rem;
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-header p {
    color: var(--text-secondary);
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group--spaced {
    margin-bottom: 2rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input {
    padding: 1rem 1.25rem;
    padding-right: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* 입력 필드 래퍼 */
.input-wrapper {
    position: relative;
    width: 100%;
}

/* 검증 아이콘 */
.validation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.validation-icon.valid {
    color: #22c55e;
    animation: checkPop 0.3s ease;
}

.validation-icon.invalid {
    color: #ef4444;
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% {
        transform: translateY(-50%) scale(0);
    }

    50% {
        transform: translateY(-50%) scale(1.2);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}


.signup-sidebar h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.checklist {
    list-style: none;
    margin-bottom: 2rem;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li svg {
    flex-shrink: 0;
    color: var(--blue-primary);
    margin-top: 0.125rem;
}

.btn-link {
    display: block;
    text-align: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--blue-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-link:hover {
    border-color: var(--blue-primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-primary);
}

/* ============================================
   푸터
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
}

.footer-content {
    text-align: center;
    color: var(--text-tertiary);
    padding: 1rem 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--blue-light);
}

.footer-separator {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--blue-primary);
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.policy-link {
    color: var(--blue-light);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.policy-link:hover {
    color: var(--blue-primary);
}

/* ============================================
   정책 페이지 스타일 (개인정보처리방침, 이용약관, 환불정책)
   ============================================ */
.policy-section {
    padding: 6rem 2rem 4rem;
    background: var(--bg-primary);
    min-height: 100vh;
}

.policy-header {
    text-align: center;
    margin-bottom: 4rem;
}

.policy-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 20px var(--blue-glow));
}

.policy-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.policy-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.policy-content {
    max-width: 900px;
    margin: 0 auto;
}

.policy-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.policy-card:hover {
    transform: translateY(-4px);
    border-color: var(--blue-primary);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.policy-card-info {
    border-left: 4px solid var(--blue-primary);
}

.policy-card-danger {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--glass-bg) 100%);
}

.policy-card-warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--glass-bg) 100%);
}

.policy-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.policy-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.policy-text:last-child {
    margin-bottom: 0;
}

.policy-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.policy-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.8;
}

.policy-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--blue-light);
    font-weight: bold;
    font-size: 1.25rem;
}

.policy-list-numbered {
    counter-reset: policy-counter;
}

.policy-list-numbered li {
    counter-increment: policy-counter;
    padding-left: 2rem;
}

.policy-list-numbered li::before {
    content: counter(policy-counter) ".";
    color: var(--blue-primary);
    font-weight: 700;
    font-size: 1rem;
    left: 0;
}

.policy-note {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--blue-primary);
    border-radius: 12px;
}

.policy-note p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.policy-note p:last-child {
    margin-bottom: 0;
}

.policy-info-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.policy-info-box p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.policy-info-box p:last-child {
    margin-bottom: 0;
}

.policy-info-box strong {
    color: var(--text-primary);
}

.policy-footer {
    text-align: center;
    margin-top: 4rem;
}

/* 라이트 모드용 정책 페이지 스타일 */
[data-theme="light"] .policy-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.6) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .policy-note,
[data-theme="light"] .policy-info-box {
    background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 768px) {
    .policy-section {
        padding: 5rem 1rem 3rem;
    }

    .policy-card {
        padding: 2rem;
    }

    .policy-card-title {
        font-size: 1.25rem;
    }

    .policy-title {
        font-size: 2rem;
    }
}

/* ============================================
   로그인/마이페이지 전용 스타일
   ============================================ */
.login-container,
.mypage-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper,
.mypage-wrapper {
    width: 100%;
    max-width: 500px;
}

.page-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.error-message {
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    text-align: center;
    margin-bottom: 1.5rem;
}

.success-message {
    padding: 1rem 1.25rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 12px;
    color: #22c55e;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.status-message {
    padding: 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    text-align: center;
    margin-top: 1.5rem;
}

.status-awaiting {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.page-link {
    text-align: center;
    margin-top: 2rem;
}

.page-link a {
    color: var(--blue-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.page-link a:hover {
    color: var(--blue-primary);
}

.logout-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: var(--blue-primary);
}

/* ============================================
   반응형 디자인
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* 기기 등록 페이지 모바일 최적화 */
    .signup-layout {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .logo-wrapper {
        flex: 1;
        min-width: 0;
    }

    .nav {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    .header {
        padding: 0.75rem 0;
        height: auto;
        min-height: 60px;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background: var(--text-primary);
        border-radius: 3px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 모바일 메뉴 오버레이 */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    [data-theme="light"] .mobile-menu-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme]) .mobile-menu-overlay {
            background: rgba(0, 0, 0, 0.5);
        }
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* 모바일 메뉴 (우측 슬라이드) */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(135deg,
                rgba(10, 10, 10, 0.98) 0%,
                rgba(26, 26, 26, 0.98) 100%);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    [data-theme="light"] .mobile-menu {
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(248, 249, 250, 0.98) 100%);
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme]) .mobile-menu {
            background: linear-gradient(135deg,
                    rgba(255, 255, 255, 0.98) 0%,
                    rgba(248, 249, 250, 0.98) 100%);
            border-left: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
        }
    }

    .mobile-menu-overlay {
        display: block !important;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    /* 모바일 메뉴 헤더 */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    [data-theme="light"] .mobile-menu-header {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme]) .mobile-menu-header {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }
    }

    .mobile-menu-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0;
    }

    .mobile-menu-close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    [data-theme="light"] .mobile-menu-close {
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme]) .mobile-menu-close {
            background: rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.05);
    }

    [data-theme="light"] .mobile-menu-close:hover {
        background: rgba(0, 0, 0, 0.1);
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme]) .mobile-menu-close:hover {
            background: rgba(0, 0, 0, 0.1);
        }
    }

    .mobile-menu-close:active {
        transform: scale(0.95);
    }

    /* 모바일 메뉴 내용 */
    .mobile-menu-content {
        flex: 1;
        padding: 1rem 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 0.875rem;
        padding: 1rem 1.5rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }

    .mobile-menu-link:hover {
        background: rgba(255, 255, 255, 0.05);
        border-left-color: var(--blue-primary);
        padding-left: 1.75rem;
    }

    .mobile-menu-link:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .mobile-menu-link svg {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }

    .mobile-menu-link:hover svg {
        opacity: 1;
        color: var(--blue-light);
    }

    .mobile-menu-link.mobile-menu-button {
        background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
        margin: 1rem 1.5rem;
        border-radius: 12px;
        border-left: none;
        justify-content: center;
    }

    .mobile-menu-link.mobile-menu-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px var(--blue-glow);
        padding-left: 1.5rem;
    }

    .mobile-menu-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 1rem 1.5rem;
    }

    .nav-link.nav-button {
        padding: 0.5rem 0.875rem !important;
        font-size: 0.75rem !important;
    }

    .profile-toggle {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    body {
        padding-top: 60px !important;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    section {
        padding: 4rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .process-timeline {
        grid-template-columns: 1fr;
    }

    .process-timeline-inline {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1.5rem 1rem;
    }

    .process-item {
        flex: 0 0 auto;
        min-width: 100px;
        gap: 0.5rem;
    }

    .process-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .process-text {
        font-size: 0.8125rem;
        white-space: normal;
        word-break: break-word;
        text-align: center;
        line-height: 1.3;
    }

    .process-arrow {
        transform: rotate(90deg);
        margin: 0.25rem 0;
        font-size: 1.25rem;
        width: 100%;
        height: auto;
        order: 10;
        flex-basis: 100%;
    }

    /* 모바일에서 화살표를 번호 아래가 아닌 중간에 배치 */
    @media (max-width: 768px) {
        .process-timeline-inline {
            flex-direction: column;
        }

        .process-item {
            width: 100%;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            padding: 0.5rem;
        }

        .process-number {
            margin-right: 0.75rem;
            flex-shrink: 0;
        }

        .process-text {
            flex: 1;
            text-align: left;
        }

        .process-arrow {
            display: none;
        }
    }

    /* 매우 작은 화면에서는 세로 레이아웃 */
    @media (max-width: 480px) {
        .process-timeline-inline {
            gap: 0.5rem;
            padding: 1rem 0.75rem;
        }

        .process-item {
            width: 100%;
            flex-direction: column;
            align-items: center;
            padding: 0.75rem;
        }

        .process-number {
            margin-right: 0;
            margin-bottom: 0.5rem;
        }

        .process-text {
            text-align: center;
        }
    }

    .signup-cta {
        text-align: center;
    }

    .signup-layout {
        grid-template-columns: 1fr;
    }

    .signup-form,
    .signup-sidebar {
        padding: 2rem;
    }
}

/* Safari/iOS 특화 최적화 */
@supports (-webkit-touch-callout: none) {

    /* iOS Safari 전용 스타일 */
    html {
        overflow-x: hidden !important;
        overflow-y: auto;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    body {
        overflow-x: hidden !important;
        overflow-y: auto;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }

    .header {
        position: fixed;
        /* iOS Safari에서 스크롤 시 헤더 고정 */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        z-index: 9999 !important;
        overflow: visible !important;
    }

    /* Safari에서 헤더 관련 요소들이 overflow로 드롭다운을 클리핑하지 않도록 */
    .header-content,
    .nav,
    .profile-menu {
        overflow: visible !important;
    }

    /* iOS Safari에서 백드롭 필터 성능 최적화 */
    .glass-card,
    .profile-dropdown {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .profile-menu {
        z-index: 10000 !important;
        position: relative !important;
    }

    .profile-dropdown {
        z-index: 10001 !important;
        position: fixed !important;
        /* JavaScript로 위치 계산하므로 top, right는 JavaScript에서 설정 */
    }

    /* iOS Safari에서 버튼 터치 반응 개선 */
    .btn-primary,
    .btn-secondary,
    .btn-submit,
    .nav-link {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    }

    /* Safari에서 버튼 텍스트 색상 명시적 설정 */
    .btn-primary {
        -webkit-text-fill-color: white !important;
        color: white !important;
    }

    .btn-secondary {
        -webkit-text-fill-color: var(--text-primary) !important;
        color: var(--text-primary) !important;
    }

    .nav-link.nav-button {
        -webkit-text-fill-color: white !important;
        color: white !important;
    }

    .profile-toggle {
        -webkit-text-fill-color: white !important;
        color: white !important;
    }

    /* 모든 컨테이너 X축 스크롤 방지 */
    .container,
    section {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* hero 섹션은 헤더 뒤에 위치 */
    .hero {
        z-index: 1;
        position: relative;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .form-grid {
        gap: 1.25rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-submit {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .header {
        min-height: 55px;
        padding: 0.625rem 0;
    }

    .header.expanded {
        min-height: 55px;
        padding: 0.625rem 0;
    }

    .header.mini {
        min-height: 50px;
        padding: 0.5rem 0;
    }

    body {
        padding-top: 55px !important;
    }

    .nav {
        gap: 0.125rem;
    }

    .nav-link {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.75rem !important;
    }

    .logo {
        font-size: 1rem !important;
    }
}