/* 전역 스크롤바 스타일 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c8cd #f1f3f4;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #a8b2ba;
}

*::-webkit-scrollbar-corner {
    background: #f1f3f4;
}

/* 다크 모드 스크롤바 */
[data-theme="dark"] * {
    scrollbar-color: #475569 #334155;
}

[data-theme="dark"] *::-webkit-scrollbar-track {
    background: #334155;
}

[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background: #475569;
}

[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

[data-theme="dark"] *::-webkit-scrollbar-corner {
    background: #334155;
}

/* CSS 변수 정의 */
:root {
    --brand: #0ea5e9;
    --brand-light: #38bdf8;
    --brand-dark: #0284c7;
    
    /* 라이트 모드 색상 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    
    /* 다크 모드 색상 */
    --bg-primary-dark: #0f172a;
    --bg-secondary-dark: #1e293b;
    --bg-tertiary-dark: #334155;
    --text-primary-dark: #f8fafc;
    --text-secondary-dark: #cbd5e1;
    --text-muted-dark: #94a3b8;
    --border-dark: #334155;
    --border-light-dark: #475569;
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --shadow-medium-dark: rgba(0, 0, 0, 0.3);
    
    /* 타이포그래피 */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* 간격 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* 둥근 모서리 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 전환 */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: var(--bg-primary-dark);
        --bg-secondary: var(--bg-secondary-dark);
        --bg-tertiary: var(--bg-tertiary-dark);
        --text-primary: var(--text-primary-dark);
        --text-secondary: var(--text-secondary-dark);
        --text-muted: var(--text-muted-dark);
        --border: var(--border-dark);
        --border-light: var(--border-light-dark);
        --shadow: var(--shadow-dark);
        --shadow-medium: var(--shadow-medium-dark);
    }
}

/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* 접근성: 애니메이션 감소 설정 */
@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;
    }
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

/* 섹션 공통 스타일 */
.section {
    padding: var(--spacing-3xl) 0;
}

.section__title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.section__subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 네비게이션 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
    will-change: border-bottom-color, background-color, backdrop-filter;
}

.header.scrolled {
    border-bottom-color: var(--border);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
    .header.scrolled {
        background-color: rgba(15, 23, 42, 0.8);
    }
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80px; /* 고정 높이 설정 */
}

.nav__logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.nav__logo:hover {
    color: var(--brand);
}

.brand {
    color: var(--brand);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav__list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav__link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link:hover {
    color: var(--text-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand);
    transition: width var(--transition-fast);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__buttons {
    display: flex;
    gap: var(--spacing-md);
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

/* 온보딩 폼 스타일 */
.onboarding-form {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form__error {
    font-size: 0.875rem;
    color: #ef4444;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

/* 파일 업로드 스타일 */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(14, 165, 233, 0.05);
}

.file-upload-placeholder svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-types {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-name {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.file-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-file-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

/* 생성 상태 스타일 */
.generation-status {
    text-align: center;
    padding: 3rem 2rem;
}

.generation-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #06b6d4);
    border-radius: 4px;
    animation: progress 3s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* 모바일 메뉴 */
@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-top: 1px solid var(--border);
        flex-direction: column;
        padding: var(--spacing-xl);
        gap: var(--spacing-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        z-index: 1001; /* 헤더보다 높은 z-index */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav__menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav__list {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .nav__buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .nav__toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav__toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav__toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-base);
    line-height: 1;
}

.btn--primary {
    background-color: var(--brand);
    color: white;
    border: 1px solid var(--brand);
}

.btn--primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    transform: translateY(-1px);
}

.btn--outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn--outline:hover {
    background-color: var(--bg-secondary);
    border-color: var(--brand);
    color: var(--brand);
}

.btn--ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn--ghost:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn--large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.btn--full {
    width: 100%;
}

/* 배지 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

/* 히어로 섹션 */
.hero {
    padding-top: calc(80px + var(--spacing-3xl));
    text-align: center;
}

.hero__title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    color: var(--text-primary);
}

.hero__description {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-3xl);
    flex-wrap: wrap;
}

/* 데모 박스 */
.demo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    max-width: 400px;
    margin: 0 auto;
}

.demo-box__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.demo-box__icon {
    font-size: var(--font-size-xl);
}

.demo-box__arrow {
    font-size: var(--font-size-lg);
    color: var(--brand);
    font-weight: 700;
}

/* 핵심 기능 그리드 */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--shadow);
}

.feature-card__icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
}

.feature-card__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.feature-card__description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 만드는 법 스텝 */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--brand);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.step__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.step__description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 템플릿 그리드 */
.templates__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.template-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition-base);
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--shadow);
}

.template-card__preview {
    height: 200px;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-preview {
    width: 80%;
    height: 80%;
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border);
}

.template-preview__header {
    height: 20px;
    background-color: var(--brand);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

.template-preview__content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.template-preview__line {
    height: 8px;
    background-color: var(--border);
    border-radius: var(--radius-sm);
}

.template-preview__line.short {
    width: 60%;
}

.template-card__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
    color: var(--text-primary);
}

.template-card__description {
    color: var(--text-secondary);
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    line-height: 1.6;
}

/* 가격 그리드 */
.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.pricing-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--shadow);
}

.pricing-card--featured {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--brand);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.pricing-card__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.pricing-card__currency {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

.pricing-card__amount {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card__period {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-left: var(--spacing-sm);
}

.pricing-card__features {
    list-style: none;
    margin-bottom: var(--spacing-xl);
}

.pricing-card__features li {
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.pricing-card__features li:last-child {
    border-bottom: none;
}

/* FAQ */
.faq__list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: var(--spacing-2xl);
}

.faq__item {
    border-bottom: 1px solid var(--border);
}

.faq__question {
    width: 100%;
    padding: var(--spacing-lg) 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.faq__question:hover {
    color: var(--brand);
}

.faq__icon {
    font-size: var(--font-size-xl);
    font-weight: 300;
    transition: transform var(--transition-fast);
}

.faq__item.active .faq__icon {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq__item.active .faq__answer {
    max-height: 200px;
}

.faq__answer p {
    padding: 0 0 var(--spacing-lg) 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 푸터 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.footer__logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.footer__description {
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

.footer__links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer__link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.footer__link:hover {
    color: var(--brand);
}

.footer__bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.footer__copyright {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* 애니메이션 */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition-slow);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal__panel {
    position: relative;
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.modal__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal__content {
    padding: var(--spacing-xl);
    max-height: 60vh;
    overflow-y: auto;
}

.modal__body {
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal__actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary);
}

/* 폼 스타일 */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form__label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form__input,
.form__textarea {
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 100px;
}

.form__error {
    color: #ef4444;
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
}

/* 체크박스 스타일 */
.form__checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.form__checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.form__checkbox-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.form__checkbox-label:hover {
    color: var(--text-primary);
}

/* 사용자 메뉴 스타일 */
.nav__user-menu {
    position: relative;
}

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--font-size-sm);
}

.user-menu__trigger:hover {
    background: var(--bg-tertiary);
    border-color: var(--brand);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.user-category {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.user-menu__arrow {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.user-menu__trigger.active .user-menu__arrow {
    transform: rotate(180deg);
}

.user-menu__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu__dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-menu__item:hover {
    background: var(--bg-secondary);
}

.user-menu__item svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.user-menu__divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

.user-menu__logout {
    color: #ef4444 !important;
}

.user-menu__logout:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.user-menu__logout svg {
    color: #ef4444 !important;
}

/* 위험 버튼 스타일 */
.btn--danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn--danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-sm);
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .user-menu__trigger {
        background: var(--bg-secondary-dark);
        border-color: var(--border-dark);
    }
    
    .user-menu__trigger:hover {
        background: var(--bg-tertiary-dark);
        border-color: var(--brand);
    }
    
    .user-menu__dropdown {
        background: var(--bg-primary-dark);
        border-color: var(--border-dark);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .user-menu__item:hover {
        background: var(--bg-secondary-dark);
    }
    
    .user-menu__divider {
        background: var(--border-dark);
    }
}

/* 로그인 상태 가격 카드 스타일 */
.pricing-card.current {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
    position: relative;
}

.pricing-card.current::before {
    content: "사용 중";
    position: absolute;
    top: -8px;
    right: 16px;
    background: var(--brand);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.pricing-card.disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pricing-card.disabled::after {
    content: "이미 상위 플랜을 사용 중";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    z-index: 20;
}

.pricing-card.disabled .btn {
    background: #6b7280;
    border-color: #6b7280;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 메인 페이지 플랜 버튼 스타일 */
.pricing-card .btn--cancel {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.pricing-card .btn--cancel:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.pricing-card .btn--use {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

.pricing-card .btn--use:hover {
    background: #059669;
    border-color: #059669;
}

/* 플랜 카드 버튼 위치 통일 */
.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card__features {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.pricing-card__actions {
    margin-top: auto;
}

/* 현재 플랜 버튼 비활성화 */
.pricing-card.current .btn {
    background: #6b7280;
    border-color: #6b7280;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

/* 괄호 제거 - JavaScript에서 텍스트를 완전히 교체하므로 불필요 */

/* 인증 탭 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-lg);
}

.auth-tab {
    flex: 1;
    padding: var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

/* 템플릿 미리보기 */
.template-preview-large {
    width: 100%;
    height: 200px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border);
}

.template-preview-large .template-preview {
    width: 80%;
    height: 80%;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform var(--transition-base);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

/* 템플릿 선택 섹션 */
.template-selection {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.template-selection h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

/* 플랜 배지 스타일 */
.template-plan-info {
    margin: 0.75rem 0;
}

.plan-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.plan-badge--free {
    background: #dcfce7;
    color: #166534;
}

.plan-badge--basic {
    background: #dbeafe;
    color: #1e40af;
}

.plan-badge--pro {
    background: #fef3c7;
    color: #92400e;
}

/* 미리보기 팝업 스타일 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.preview-modal.show {
    display: flex;
}

.preview-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 85%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.preview-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.preview-body {
    display: flex;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

.preview-left {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    max-height: 70vh;
}

.preview-right {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-section {
    margin-bottom: 1.5rem;
}

.preview-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.preview-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preview-section li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.preview-section li::before {
    content: '•';
    color: var(--brand);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* 심플한 미리보기 창 */
.preview-window {
    width: 100%;
    max-width: 700px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    max-height: 70vh;
}

.preview-window-content {
    height: 500px;
    max-height: 60vh;
    overflow-y: auto;
    background: white;
    position: relative;
}

/* 반응형 */
@media (max-width: 768px) {
    .preview-body {
        flex-direction: column;
        height: auto;
    }
    
    .preview-left,
    .preview-right {
        flex: none;
    }
    
    .preview-window {
        height: 50vh;
    }
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 반응형 템플릿 그리드 크기 조절 */
@media (max-width: 1200px) {
    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

.template-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    border-color: var(--brand);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.template-card.selected {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.05);
}

.template-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.template-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
}

.template-preview {
    width: 100%;
    height: 150px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.template-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.template-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.template-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.template-features li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.template-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    margin-right: 0.5rem;
}

.template-actions {
    display: flex;
    gap: 0.75rem;
}

.template-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-btn--select {
    background: var(--brand);
    color: white;
}

.template-btn--select:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.template-btn--preview {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.template-btn--preview:hover {
    background: var(--bg-primary);
    border-color: var(--brand);
}

.template-card.locked .template-btn--select {
    background: var(--text-muted);
    cursor: not-allowed;
}

.template-card.locked .template-btn--select:hover {
    background: var(--text-muted);
    transform: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .demo-box {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .demo-box__arrow {
        transform: rotate(90deg);
    }
    
    .features__grid,
    .templates__grid,
    .pricing__grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__content {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer__links {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .modal__panel {
        margin: var(--spacing-md);
        max-width: none;
    }
    
    .modal__actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .section__title {
        font-size: var(--font-size-3xl);
    }
    
    .demo-box {
        padding: var(--spacing-md);
    }
    
    .modal {
        padding: var(--spacing-sm);
    }
}

/* 가격 섹션 안내 텍스트 */
.pricing__notice {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.pricing__notice-text {
    font-size: var(--font-size-sm);
    color: var(--text-color-light);
    margin: 0;
}