/* =====================================================
   메인 스타일시트 - 다크/라이트 테마
   위치: assets/css/style.css
   ===================================================== */

/* ── 테마 변수 ── */
:root {
    --radius:    12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --transition: .2s ease;
}

/* 라이트 테마 (기본) */
[data-theme="light"], :root {
    --bg:        #f5f6fa;
    --bg2:       #ffffff;
    --bg3:       #f0f1f7;
    --border:    rgba(0,0,0,0.08);
    --border2:   rgba(0,0,0,0.15);
    --text1:     #1a1d2e;
    --text2:     #5a6075;
    --text3:     #9aa0b8;
    --accent:    #4f7cff;
    --accent2:   #7c5cfc;
    --green:     #10b981;
    --coral:     #ef4444;
    --amber:     #f59e0b;
    --pink:      #ec4899;
    --shadow:    0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* 다크 테마 */
[data-theme="dark"] {
    --bg:        #0f1117;
    --bg2:       #181c27;
    --bg3:       #1f2436;
    --border:    rgba(255,255,255,0.07);
    --border2:   rgba(255,255,255,0.12);
    --text1:     #f0f2f8;
    --text2:     #8b92a8;
    --text3:     #555d74;
    --accent:    #4f7cff;
    --accent2:   #7c5cfc;
    --green:     #22c984;
    --coral:     #ff6b6b;
    --amber:     #ffa94d;
    --pink:      #f06292;
    --shadow:    0 2px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── 기본 리셋 ── */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
    background: var(--bg);
    color: var(--text1);
    min-height: 100vh;
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── 레이아웃 ── */
body {
    min-width: 1280px;
}

.container {
    max-width: 1200px;
    min-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-sm {
    max-width: 800px;
    min-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── 헤더 ── */
.site-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 16px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text1);
}
.site-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 24px;
}
.header-nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text2);
    transition: all var(--transition);
    font-weight: 500;
}
.header-nav a:hover,
.header-nav a.active {
    background: var(--bg3);
    color: var(--text1);
}
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition);
}
.theme-toggle:hover { background: var(--border2); }

/* ── 버튼 ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { opacity: .85; }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost {
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text1); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ── 카드 ── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border2); box-shadow: var(--shadow); }
.card-body { padding: 20px; }

/* ── 폼 ── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text1);
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    background: var(--bg2);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-error {
    font-size: 12px;
    color: var(--coral);
    margin-top: 5px;
}
.form-hint {
    font-size: 12px;
    color: var(--text3);
    margin-top: 5px;
}

/* ── 알림 박스 ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert-error   { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.25);   color: var(--coral); }
.alert-success { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.25);  color: var(--green); }
.alert-info    { background: rgba(79,124,255,.1);  border: 1px solid rgba(79,124,255,.25);  color: var(--accent); }
.alert-warn    { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.25);  color: var(--amber); }

/* ── 뱃지 ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-premium { background: rgba(79,124,255,.15);  color: var(--accent); }
.badge-coupon  { background: rgba(236,72,153,.15);  color: var(--pink); }
.badge-new     { background: rgba(16,185,129,.15);  color: var(--green); }
.badge-hot     { background: rgba(239,68,68,.15);   color: var(--coral); }
.badge-normal  { background: rgba(90,96,117,.1);    color: var(--text2); }

/* ── 페이지네이션 ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text2);
    background: var(--bg2);
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-decoration: none;
}
.page-btn:hover { color: var(--text1); border-color: var(--border2); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 별점 ── */
.stars { color: var(--amber); letter-spacing: 1px; }
.rating-num { font-weight: 700; color: var(--text1); }
.rating-cnt { font-size: 12px; color: var(--text3); }

/* ── 섹션 타이틀 ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.section-more {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

/* ── 빈 상태 ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text3);
}
.empty-state .icon { font-size: 48px; margin-bottom: 14px; }
.empty-state .title { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.empty-state .desc  { font-size: 13px; }

/* ── 로딩 ── */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 반응형 ── */

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── 푸터 ── */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 60px;
    font-size: 13px;
    color: var(--text3);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-links {
    display: flex;
    gap: 16px;
}
.footer-links a {
    color: var(--text3);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--text1); }

/* ── 헤더 고정 해제 ── */
.top-bar { position: relative !important; }
.site-header { position: relative !important; top: auto !important; }
.sidebar { position: relative !important; top: auto !important; }
