/* 모락모락 공통 스타일 - 모든 페이지에서 사용 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 80px;
    transition: background-color 0.3s, color 0.3s;
}

.page-content {
    margin-top: 20px;
}

.morak-content-section {
    max-width: 960px;
    margin: 32px auto 0;
    padding: 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: #2d334a;
    box-shadow: 0 6px 18px rgba(20, 24, 50, 0.12);
    border: 1px solid rgba(120, 140, 200, 0.15);
}

.morak-content-section h2 {
    font-size: 28px;
    margin-bottom: 14px;
    color: #1f2640;
}

.morak-content-section h3 {
    font-size: 20px;
    margin: 20px 0 10px;
    color: #27335c;
}

.morak-content-section p {
    font-size: 15px;
    line-height: 1.8;
    color: #3b4568;
    margin-bottom: 10px;
}

.morak-content-section ul {
    margin: 8px 0 10px 20px;
    color: #3b4568;
}

.morak-content-section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.morak-faq-item {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(120, 145, 220, 0.08);
    border: 1px solid rgba(120, 145, 220, 0.2);
    line-height: 1.8;
}

/* 다크모드 기본 설정 */
body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

/* ========== 헤더 스타일 ========== */
header.morak-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 246, 255, 0.92));
    padding: 16px 24px;
    box-shadow: 0 16px 40px rgba(30, 40, 80, 0.12);
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 100%;
    border-bottom: 1px solid rgba(80, 90, 140, 0.12);
    font-family: "Space Grotesk", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

header.morak-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(120, 150, 255, 0.18), transparent 45%),
                radial-gradient(circle at 90% 10%, rgba(255, 191, 120, 0.2), transparent 40%);
    pointer-events: none;
}

header .header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 8px;
    column-gap: 18px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.header-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(120, 150, 255, 0.08), rgba(255, 192, 120, 0.06), rgba(120, 150, 255, 0.08));
    opacity: 0.6;
    pointer-events: none;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 12px;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #1b1f3b;
}

.brand-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #6b728f;
}

.dark-mode-toggle {
    min-width: 86px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(80, 90, 140, 0.2);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2b2f55;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    will-change: transform;
    justify-self: end;
}

.dark-mode-toggle::before {
    content: attr(data-icon);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(240, 243, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: inset 0 0 0 1px rgba(130, 150, 220, 0.25);
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(50, 60, 120, 0.18);
}

.page-title-header {
    font-size: 15px;
    color: #36405a;
    font-weight: 600;
    justify-self: center;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(120, 140, 200, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* 헤더 다크모드 */
body.dark-mode header.morak-header {
    background: linear-gradient(135deg, rgba(18, 20, 35, 0.92), rgba(25, 28, 45, 0.92));
    border-bottom: 1px solid rgba(80, 95, 140, 0.25);
}

body.dark-mode .brand-title {
    color: #f3f5ff;
}

body.dark-mode .brand-subtitle {
    color: rgba(190, 200, 230, 0.7);
}

body.dark-mode .page-title-header {
    color: rgba(230, 235, 255, 0.9);
    background: rgba(20, 24, 40, 0.7);
    border-color: rgba(120, 150, 220, 0.25);
}

body.dark-mode .dark-mode-toggle {
    background: rgba(25, 30, 50, 0.9);
    color: #f0f3ff;
    border-color: rgba(120, 150, 220, 0.35);
}

body.dark-mode .dark-mode-toggle:hover {
    background: rgba(30, 35, 60, 0.95);
    box-shadow: 0 12px 24px rgba(10, 14, 30, 0.4);
}

body.dark-mode .dark-mode-toggle::before {
    background: rgba(40, 48, 78, 0.95);
    box-shadow: inset 0 0 0 1px rgba(140, 170, 250, 0.3);
}

body.dark-mode .header-glow {
    opacity: 0.3;
    background: linear-gradient(90deg, rgba(90, 120, 220, 0.12), rgba(220, 160, 120, 0.08), rgba(90, 120, 220, 0.12));
}

body.dark-mode .morak-content-section {
    background: rgba(22, 25, 38, 0.92);
    color: #dbe5ff;
    border-color: rgba(120, 145, 220, 0.25);
}

body.dark-mode .morak-content-section h2 {
    color: #eef3ff;
}

body.dark-mode .morak-content-section h3 {
    color: #d8e2ff;
}

body.dark-mode .morak-content-section p,
body.dark-mode .morak-content-section ul,
body.dark-mode .morak-content-section li {
    color: #b8c5eb;
}

body.dark-mode .morak-faq-item {
    background: rgba(70, 90, 150, 0.2);
    border-color: rgba(120, 145, 220, 0.35);
}

/* ========== 푸터 스타일 ========== */
footer {
    text-align: center;
    padding: 40px 20px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-disclaimer {
    font-size: 0.85em;
    color: #888;
    margin-top: 10px;
    line-height: 1.6;
}

/* 푸터 다크모드 */
body.dark-mode footer {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .footer-links a:hover {
    color: #9f7aea;
}

body.dark-mode .footer-disclaimer {
    color: #666;
}

/* ========== 반응형 디자인 ========== */
@media (max-width: 768px) {
    .morak-content-section {
        margin: 24px 12px 0;
        padding: 22px 18px;
    }

    .morak-content-section h2 {
        font-size: 24px;
    }

    .morak-content-section h3 {
        font-size: 18px;
    }

    .page-title-header {
        font-size: 14px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 64px !important;
    }

    header.morak-header {
        padding: 8px 12px;
    }

    header .header-container {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "left center right";
        column-gap: 10px;
        padding: 0 2px;
    }

    .header-left {
        grid-area: left;
    }

    .header-center {
        grid-area: center;
        justify-content: flex-start;
        min-width: 0;
    }

    .header-right {
        grid-area: right;
        justify-content: flex-end;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-title {
        font-size: 17px;
    }

    .page-title-header {
        font-size: 12px;
        padding: 4px 10px;
    }

    .dark-mode-toggle {
        min-width: 40px;
        height: 32px;
        padding: 0;
        gap: 0;
    }

    .dark-mode-toggle::before {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .dark-mode-toggle .toggle-label {
        display: none;
    }
}
