/**
 * SOMA Premium Theme Variables & Base Styles
 * Shared between Index, Layout, and Direct Access pages.
 */

/* [CSS 변수 시스템 (:root)] */
:root {
    /* === 기본 다크 테마 (Premium Gray) === */
    --bg: #121212;            /* 메인 배경색 (Deep Dark Gray) */
    --card: #1e1e1e;          /* 카드/컨테이너 배경색 */
    --sidebar-bg: #18181b;    /* 사이드바 배경색 */
    --text: #e4e4e7;          /* 기본 텍스트 (Zinc 200 - 밝은 회색) */
    --text-muted: #a1a1aa;    /* 보조 텍스트 (Zinc 400 - 중간 회색) */
    --border: #2d2d2d;        /* 경계선 색상 */
    
    /* === 브랜드 컬러 (SOMA Gold) === */
    --soma-gold: #D4AF37;     /* 메인 골드 컬러 */
    --soma-gold-rgb: 212, 175, 55; /* 골드 RGB 값 (투명도 조절용) */
    --soma-primary: #D4AF37;  /* 프라이머리 컬러 (골드와 동일) */
    --soma-secondary: #8a6d3b;/* 세컨더리 컬러 (어두운 골드) */
    
    /* === Glassmorphism (유리 질감 효과) 변수 === */
    --glass-bg: rgba(30, 30, 30, 0.6);        /* 반투명 배경 */
    --glass-border: rgba(255, 255, 255, 0.08);/* 반투명 테두리 */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); /* 깊이감 있는 그림자 */
    
    /* === 상태별 색상 (Semantic Colors) === */
    --color-primary: #D4AF37;
    --color-success: #10b981; /* 성공 (Green) */
    --color-info: #3b82f6;    /* 정보 (Blue) */
    --color-warning: #f59e0b; /* 경고 (Orange) */
    --color-danger: #ef4444;  /* 위험 (Red) */
    
    /* === 배지(Badge) 배경색 === */
    --badge-primary-bg: rgba(212, 175, 55, 0.15);
    --badge-success-bg: rgba(16, 185, 129, 0.15);
    --badge-info-bg: rgba(59, 130, 246, 0.15);
    --badge-danger-bg: rgba(239, 68, 68, 0.15);
    
    /* === Landing Specific === */
    --hero-overlay: linear-gradient(180deg, rgba(18,18,18,0.3) 0%, rgba(18,18,18,1) 100%);
}

/* === 라이트 테마 오버라이드 === */
[data-theme="light"] {
    --bg: #f8f9fa;            /* 밝은 회색 배경 */
    --card: #ffffff;          /* 흰색 카드 */
    --sidebar-bg: #ffffff;    /* 흰색 사이드바 */
    --text: #18181b;          /* 어두운 텍스트 */
    --text-muted: #52525b;    /* 회색 보조 텍스트 */
    --border: #e4e4e7;        /* 밝은 회색 테두리 */
    
    --soma-gold: #b8860b;     /* 가독성을 위해 조금 더 어두운 골드 */
    --soma-gold-rgb: 184, 134, 11;
    --soma-primary: #b8860b;
    
    /* 라이트 모드용 Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    
    /* 라이트 모드 배지 배경 */
    --badge-primary-bg: rgba(184, 134, 11, 0.1);
    
    --hero-overlay: linear-gradient(180deg, rgba(248,249,250,0.3) 0%, rgba(248,249,250,1) 100%);
}

/* === 전역 초기화 및 기본 스타일 === */
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    /* 테마 전환 시 배경색과 텍스트 색상이 부드럽게 바뀌도록 트랜지션 적용 */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 타이포그래피 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
}

.text-muted { color: var(--text-muted) !important; }
.text-gold { color: var(--soma-gold) !important; }
