/* ==========================================================================
   [DESIGN SYSTEM] 법률사무소 신 - 내용증명 작성 도우미
   ========================================================================== */

/* 1. 폰트 및 색상 변수 정의 */
@font-face {
    font-family: 'MaruBuri';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10-21@1.0/MaruBuri-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #5d6d7e;
    --accent-color: #34495e;
    --highlight-color: #c0392b;
    /* 포인트가 필요할 때 사용할 차분한 레드 */
    --success-color: #27ae60;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #fdfdfd;
    --border-color: #94a3b8;
    /* 테두리 확실히 진하게 */
    --hover-bg: #f5f6fa;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* 2. 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MaruBuri', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f9f9f9;
    color: var(--text-primary);
    line-height: 1.7;
    /* 줄간격 확대 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 배경 패턴 제거 및 미니멀 처리 */
body::before {
    display: none;
}

/* 3. 상단 헤더 */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

.header-left {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 0.5rem;
}

.header-left:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.header-left .main-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-left strong {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.header-left .website-info {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
}

.header-left .website-info i {
    font-size: 0.65rem;
}

.browser-tip {
    color: var(--text-secondary);
    font-size: 1rem;
    background: transparent;
    padding: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.browser-tip:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
    color: var(--primary-color);
}

/* 信 서예체 스타일 */
.hanja-shin {
    font-family: 'Zhi Mang Xing', cursive !important;
    font-size: 1.3em !important;
    font-weight: 400 !important;
    position: relative;
    top: 0.05em;
    display: inline-block;
    line-height: 1;
    letter-spacing: 0;
}

/* 4. 메인 콘텐츠 영역 */
.main-content {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* 5. 페이지 제목 스타일 */
.page-header {
    text-align: center;
    margin-bottom: 3.5rem;
    padding: 1rem;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.page-header::before {
    display: none;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    letter-spacing: -0.02em;
}

.page-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
    opacity: 1;
}

.page-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    word-break: keep-all;
}

/* Progress Steps */
.progress-container {
    margin-bottom: 3rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: -1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    padding: 0 0.5rem;
}

.progress-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: var(--text-light);
}

.progress-step.active .progress-step-circle {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.progress-step.completed .progress-step-circle {
    background: var(--text-secondary);
    color: white;
    border-color: var(--text-secondary);
}

.progress-step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.progress-step.active .progress-step-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* 6. 카드 스타일 */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 8px;
    /* 둥근 모서리 축소 */
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.card-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* 내용증명 종류 선택 */
.cert-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.cert-type-button {
    padding: 1.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cert-type-button:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.cert-type-button.selected {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.cert-type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.cert-type-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cert-type-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 세부 유형 선택 */
.sub-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.sub-type-button {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.sub-type-button:hover {
    border-color: var(--accent-color);
}

.sub-type-button.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 7. 당사자 정보 입력 */
.party-section {
    margin-bottom: 2rem;
    background: var(--hover-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.party-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.party-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.party-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-right: 2rem;
}

.party-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.party-input-group {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .party-input-group {
        grid-template-columns: 1fr 2fr;
    }
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-field {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
    background: #fff;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-party-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.add-party-button:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.remove-party-button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

/* 8. 작성 모드 선택 */
.mode-selection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .mode-selection {
        grid-template-columns: 1fr 1fr;
    }
}

.mode-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.mode-card:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.mode-card.selected {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.mode-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.mode-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.mode-features {
    text-align: left;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.mode-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.mode-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.mode-features li:last-child {
    margin-bottom: 0;
}

/* 9. 채팅 UI */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.8rem;
    max-width: 85%;
}

.chat-message.ai {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.chat-avatar.ai {
    background: var(--primary-color);
    color: white;
}

.chat-avatar.user {
    background: var(--secondary-color);
    color: white;
}

.chat-bubble {
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

.chat-bubble.ai {
    background: white;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 0;
    color: var(--text-primary);
}

.chat-bubble.user {
    background: var(--primary-color);
    color: white;
    border-top-right-radius: 0;
}

.chat-thinking {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-thinking span {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: thinking 1.4s infinite ease-in-out both;
}

.chat-thinking span:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-thinking span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinking {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.8rem;
}

.chat-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-send-button {
    padding: 0 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-send-button:hover {
    background: var(--accent-color);
}

.chat-send-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* 10. 직접 작성 UI */
.demand-textarea {
    width: 100%;
    height: 300px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 1.5rem;
    font-family: inherit;
}

.demand-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.demand-examples {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.demand-examples-title {
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demand-examples-list {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 11. 네비게이션 버튼 & 생성 버튼 */
.nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.nav-button {
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button-prev {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.nav-button-prev:hover {
    background: var(--hover-bg);
}

.nav-button-next {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.nav-button-next:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.nav-button:disabled {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none !important;
}

.generate-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 3rem;
    /* 둥글게 */
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
    filter: brightness(1.1);
}

.generate-button:disabled {
    background: #cbd5e1;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 12. 세련된 로딩 애니메이션 (문서 작성 컨셉) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.loading-doc-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

.loading-pen-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    animation: writing 2s infinite ease-in-out;
}

@keyframes writing {
    0% {
        transform: translate(-30%, -60%) rotate(0deg);
    }

    25% {
        transform: translate(10%, -40%) rotate(-10deg);
    }

    50% {
        transform: translate(-20%, -20%) rotate(5deg);
    }

    75% {
        transform: translate(20%, -30%) rotate(-10deg);
    }

    100% {
        transform: translate(-30%, -60%) rotate(0deg);
    }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.loading-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 점 3개 타이핑 효과 */
.dots::after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60% {
        content: '...';
    }

    80%,
    100% {
        content: '';
    }
}

/* 13. 결과 화면 */
.result-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-content {
    background: white;
    padding: 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    font-family: 'Batang', '바탕', serif;
    font-size: 1rem;
    line-height: 2;
    color: #1a1a1a;
    min-height: 600px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    white-space: pre-wrap;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 1rem;
}

.copy-button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-button:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.copy-button.copied {
    background: var(--success-color);
}

/* 수정 요청 섹션 */
.modify-container {
    margin-top: 2rem;
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.modify-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modify-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.modify-textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    resize: vertical;
}

.modify-buttons {
    display: flex;
    justify-content: flex-end;
}

.apply-modify-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.apply-modify-button:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

/* 안내 박스 & 경고 박스 */
.info-box,
.warning-box {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.info-box i {
    color: #0284c7;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.info-box-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.warning-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    margin-bottom: 2rem;
}

.warning-box i {
    color: #d97706;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.warning-box-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* 에러 메시지 */
.error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    justify-content: center;
}

/* 수정 완료 모달 */
.success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1.5rem 2.5rem;
    border-radius: 1rem;
    z-index: 3000;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.success-modal.show {
    display: flex;
    opacity: 1;
}

.success-modal-icon {
    font-size: 2.5rem;
    color: #4ade80;
}

.success-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* 14. 하단 푸터 */
.footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .cert-types {
        grid-template-columns: 1fr;
    }

    .sub-types {
        grid-template-columns: 1fr;
    }

    .result-content {
        padding: 1.5rem;
        min-height: 400px;
    }
}

/* ===== 홈 화면 추가 안내 모달 ===== */
.home-guide-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.home-guide-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-guide-content {
    background: white;
    border-radius: 20px;
    padding: 20px;
    padding-top: 60px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 링크 복사 버튼 */
.service-link-copy {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 50px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.service-link-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.service-link-copy.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.guide-header {
    text-align: center;
    margin-bottom: 20px;
}

.guide-header h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-weight: 700;
    padding: 0 30px;
    line-height: 1.4;
}

.guide-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.guide-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.guide-close:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.browser-section {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.browser-section h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.browser-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.samsung-icon {
    background: #1428A0;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
}

.guide-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-steps li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.guide-steps li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 3px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 50%;
}

.guide-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.guide-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--success-color);
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   [DESIGN UPGRADE] 삭제를 원하시면 이 주석부터 다음 주석까지 지우세요.
   ========================================================================== */

/* 1. Glass Header Accent (헤더 배경) - 가시성 개선 */
.design-glass-header {
    background: rgba(255, 255, 255, 0.8) !important;
    overflow: hidden;
}

.design-glass-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('./og-image.webp');
    background-size: cover;
    background-position: center 30%;
    opacity: 0.25;
    filter: blur(8px) saturate(1.2);
    z-index: 0;
    pointer-events: none;
}

/* 헤더 내용물이 이미지 위에 오도록 설정 */
.header-container {
    position: relative;
    z-index: 2;
}

/* 2. Hero Mockup (타이틀 옆 떠있는 이미지) */
.design-hero-mockup {
    position: absolute;
    right: 5%;
    top: 10px;
    width: 140px;
    height: auto;
    transform: rotate(12deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    z-index: 0;
    opacity: 0.95;
    animation: heroFloat 6s ease-in-out infinite;
    display: none;
    /* 모바일 숨김 */
}

@media (min-width: 1024px) {
    .design-hero-mockup {
        display: block;
        right: 10%;
    }
}

@keyframes heroFloat {

    0%,
    100% {
        transform: rotate(12deg) translateY(0);
    }

    50% {
        transform: rotate(12deg) translateY(-10px);
    }
}

/* 3. Authority Seal (배경 워터마크) - 가시성 개선 */
.design-watermark {
    position: fixed;
    bottom: -50px;
    right: -50px;
    width: 50vw;
    max-width: 500px;
    opacity: 0.15;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
    filter: grayscale(100%);
    mix-blend-mode: multiply;
}

@media (max-width: 768px) {
    .design-watermark {
        width: 300px;
        bottom: -20px;
        right: -20px;
        opacity: 0.1;
    }
}

/* 본문 내용이 워터마크 위에 오도록 순서 정리 */
.main-content,
.footer {
    position: relative;
    z-index: 1;
}

/* [DESIGN UPGRADE] 조성욱 변호사 소개 배너 (Dark Mode Style) - !important로 강제 적용 */
.lawyer-banner {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    background: #1e293b !important;
    /* Deep Navy 배경 */
    padding: 10px 16px 10px 11px !important;
    border-radius: 13px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: #ffffff !important;
    /* 흰색 텍스트 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    z-index: 9999 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.lawyer-banner:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.5) !important;
    background: #0f172a !important;
    /* 호버 시 더 어두운 네이비 */
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.lawyer-banner * {
    color: #ffffff !important;
    /* 내부 모든 요소 흰색 강제 */
}

.lawyer-icon-box {
    width: 35px !important;
    height: 35px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    /* 반투명 흰색 배경 */
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

.lawyer-text-box {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.3 !important;
}

.lawyer-title {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    font-family: 'MaruBuri', serif !important;
}

.lawyer-subtitle {
    font-size: 0.6rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    color: #cbd5e1 !important;
    /* 연한 회색 */
}

.lawyer-subtitle::after {
    content: '→';
    font-size: 0.8em !important;
    transition: transform 0.2s !important;
    color: #94a3b8 !important;
}

.lawyer-banner:hover .lawyer-subtitle::after {
    transform: translateX(3px) !important;
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .lawyer-banner {
        bottom: 16px !important;
        right: 16px !important;
        padding: 8px 13px 8px 10px !important;
    }

    .lawyer-icon-box {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.88rem !important;
    }

    .lawyer-title {
        font-size: 0.72rem !important;
    }
}