/**
 * [스타일 모듈] 글로벌 스타일 규칙
 * 책임: 컬러 팔레트 배정, 초기화(Reset), 다크모드 베이스 관리
 */

 :root {
    --bg-dark: #07070a; /* 극도의 다크 심층 배경 */
    --text-main: #f8fafc;
    --text-mute: #94a3b8;
    --neon-blue: #3b82f6;
    --neon-purple: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.03); /* 유리 투명도 */
    --glass-border: rgba(255, 255, 255, 0.08); /* 유리 엣지 반사광 */
}

/* 텍스트 복사 방지 */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 입력 필드는 선택 허용 */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

html {
    font-size: 15px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    word-break: keep-all;
    overscroll-behavior-y: none;
}

/* 다국어 번역(English) 등 텍스트 길이 변경 시 넘침 방지 */
body, p, h1, h2, h3, h4, h5, h6, span, div, button {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 프리미엄 사이트의 상징: 빛번짐 애니메이션 배경 */
.glow-background {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.1) 0%, rgba(7, 7, 10, 0) 65%),
                radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12) 0%, rgba(7, 7, 10, 0) 60%);
    z-index: -1;
    animation: slowAtmosphere 25s ease-in-out infinite alternate;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes slowAtmosphere {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 2%); }
}

/* 각 스크롤 영역 정렬용 공통 베이스 */
section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 90px 20px;
}

/* 히어로 섹션만 풀 뷰포트 유지 */
.hero-section {
    min-height: 100vh;
    padding: 120px 20px;
}

.section-title {
    font-size: 2.3rem;
    margin-bottom: 48px;
    letter-spacing: -0.05em;
    font-weight: 800;
}

/* ─── 모바일 성능 최적화 ─── */
/* 모바일에서 glow 배경 애니메이션 정지 → 배터리 + 프레임 보호 */
@media screen and (max-width: 768px) {
    .glow-background {
        animation: none !important;
        transform: none !important;
    }
}

/* GPU 과부하 유발하는 backdrop-filter 모바일 경감 */
@media screen and (max-width: 768px) {
    .glass-card,
    .case-card,
    .vs-box,
    .philosophy-card,
    .glass-form {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(15, 15, 25, 0.95) !important;
    }
}

/* ─── 움직임 감소 설정 (접근성 + 저사양 기기 대응) ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .glow-background {
        animation: none !important;
    }
    html {
        scroll-behavior: auto !important;
    }
}

/* ─── 심리 챗봇 모바일 높이 조정 ─── */
@media screen and (max-width: 480px) {
    #psych-chat-messages {
        height: 260px !important;
    }
    #psych-chat-input {
        font-size: 16px !important; /* iOS 자동 확대 방지 */
    }
}
