* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Noto Sans KR', sans-serif; background: #0f0f1a; color: #e8e8f0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }

/* ===== 신규 헤더 ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 999; background: rgba(10,10,20,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid #2a2a4a; }
.header-inner { max-width: 1300px; margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 64px; }
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-wrap img { width: 36px; height: 36px; }
.logo-text { font-size: 20px; font-weight: 900; color: #f0f0ff; letter-spacing: -0.5px; }
.logo-text span { color: #a78bfa; }
.pc-nav { display: flex; gap: 4px; flex: 1; }
.pc-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #8888aa; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
.pc-nav a:hover, .pc-nav a.active { background: #7C3AED22; color: #c4b5fd; }
.header-auth { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-sm { padding: 7px 16px; border-radius: 20px; background: linear-gradient(135deg,#7C3AED,#a78bfa); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: opacity 0.2s; display: inline-block; border: none; cursor: pointer; }
.btn-sm:hover { opacity: 0.85; }
.btn-sm-outline { padding: 6px 14px; border-radius: 20px; border: 1px solid #7C3AED88; color: #c4b5fd; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: all 0.2s; display: inline-block; }
.btn-sm-outline:hover { background: #7C3AED22; }

/* ===== 공통 버튼 ===== */
.btn { background: #7C3AED; color: #fff; border: none; padding: 12px 30px; border-radius: 50px; font-size: 15px; cursor: pointer; transition: all 0.3s; font-weight: 600; display: inline-block; }
.btn:hover { background: #6d28d9; transform: scale(1.02); }
.btn-outline { background: transparent; border: 2px solid #7C3AED; color: #a78bfa; padding: 12px 30px; border-radius: 50px; font-size: 15px; cursor: pointer; transition: all 0.2s; font-weight: 600; display: inline-block; }
.btn-outline:hover { background: #7C3AED; color: #fff; }

/* ===== 컨테이너 ===== */
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

/* ===== 페이지 제목 ===== */
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: #f0f0ff; }
.page-title span { color: #a78bfa; }
.page-desc { color: #8888aa; font-size: 14px; margin-bottom: 30px; }

/* ===== 폼 ===== */
.form-box { background: #16162a; border-radius: 16px; padding: 40px; max-width: 500px; margin: 0 auto; border: 1px solid #2a2a4a; }
.form-group { margin-bottom: 20px; }
.form-label { font-size: 13px; color: #a0a0c0; margin-bottom: 6px; display: block; font-weight: 600; }
.form-input { width: 100%; background: #0f0f1a; border: 1px solid #2a2a4a; border-radius: 10px; padding: 12px 16px; color: #e8e8f0; font-size: 15px; outline: none; transition: border 0.2s; }
.form-input:focus { border-color: #7C3AED; box-shadow: 0 0 0 3px #7C3AED22; }
.form-input::placeholder { color: #3a3a5a; }
textarea.form-input { height: 120px; resize: vertical; font-family: inherit; }
.form-title { font-size: 22px; font-weight: 800; margin-bottom: 24px; text-align: center; color: #f0f0ff; }

/* ===== 게시판 ===== */
.board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.board-table { width: 100%; border-collapse: collapse; }
.board-table th { background: #16162a; padding: 12px 16px; font-size: 13px; color: #8888aa; text-align: left; border-bottom: 1px solid #2a2a4a; font-weight: 600; }
.board-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #1a1a2e; transition: background 0.2s; color: #d0d0e8; }
.board-table tr:hover td { background: #16162a; }
.board-table .title-cell a { color: #e0e0f8; transition: color 0.2s; font-weight: 500; }
.board-table .title-cell a:hover { color: #a78bfa; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.badge-질의 { background: #1e3a5f; color: #60a5fa; }
.badge-답변 { background: #1a3a2a; color: #4ade80; }
.badge-일상 { background: #3a2a5a; color: #c084fc; }
.badge-유머 { background: #3a2a1a; color: #fb923c; }
.badge-default { background: #7C3AED22; color: #a78bfa; }
.meta { color: #6666888; font-size: 12px; }

/* ===== 카드 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: #16162a; border-radius: 16px; padding: 24px; border: 1px solid #2a2a4a; transition: all 0.2s; cursor: pointer; }
.card:hover { border-color: #7C3AED55; transform: translateY(-2px); box-shadow: 0 8px 24px #7C3AED22; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #e8e8f8; }
.card-desc { font-size: 13px; color: #8888aa; margin-bottom: 16px; line-height: 1.6; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-price { color: #a78bfa; font-weight: 700; font-size: 16px; }
.card-meta { font-size: 12px; color: #6666888; }

/* ===== 알림 ===== */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; font-weight: 500; }
.alert-error { background: #2a1a1a; border: 1px solid #ef444466; color: #f87171; }
.alert-success { background: #1a2a1a; border: 1px solid #22c55e66; color: #4ade80; }

/* ===== 페이지네이션 ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; font-size: 13px; background: #16162a; color: #8888aa; border: 1px solid #2a2a4a; transition: all 0.2s; font-weight: 500; }
.pagination a:hover { border-color: #7C3AED; color: #fff; }
.pagination .active { background: #7C3AED; color: #fff; border-color: #7C3AED; }

/* ===== 탭 ===== */
.tab-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-bar a { padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; background: #16162a; color: #8888aa; border: 1px solid #2a2a4a; transition: all 0.2s; }
.tab-bar a:hover { color: #fff; border-color: #7C3AED; }
.tab-bar a.active { background: #7C3AED; color: #fff; border-color: #7C3AED; }

/* ===== 푸터 ===== */
footer { background: #16162a; border-top: 1px solid #2a2a4a; padding: 24px; text-align: center; }
.footer-inner p { color: #6666888; font-size: 12px; line-height: 2; }

/* ===== 좋아요 ===== */
.like-btn { background: transparent; border: 1px solid #2a2a4a; color: #8888aa; padding: 8px 20px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.like-btn:hover, .like-btn.active { border-color: #7C3AED; color: #a78bfa; background: #7C3AED22; }

/* ===== MIDI 플레이어 ===== */
.midi-player { background: #16162a; border-radius: 12px; padding: 20px; border: 1px solid #2a2a4a; margin-bottom: 20px; }
.midi-player h4 { font-size: 14px; color: #a78bfa; margin-bottom: 12px; font-weight: 700; }
.midi-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.midi-btn { background: #7C3AED; color: #fff; border: none; padding: 8px 20px; border-radius: 20px; font-size: 13px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.midi-btn:hover { background: #6d28d9; }
.midi-btn.stop { background: #2a2a4a; color: #8888aa; }
.midi-btn.stop:hover { background: #3a3a5a; color: #fff; }

/* ===== 모바일 하단 네비 ===== */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #16162a; border-top: 1px solid #2a2a4a; z-index: 999; }
.mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0; font-size: 10px; color: #6666888; text-decoration: none; gap: 4px; transition: color 0.2s; font-weight: 600; }
.mobile-nav a:hover, .mobile-nav a.active { color: #a78bfa; }
.mobile-nav svg { width: 20px; height: 20px; }

/* ===== 모바일 반응형 ===== */
@media (max-width: 768px) {
    body { padding-bottom: 60px; }
    .pc-nav { display: none; }
    .header-auth { display: none; }
    .mobile-nav { display: flex; }
    .container, .container-wide { padding: 20px 16px; }
    .page-title { font-size: 22px; }
    .board-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .board-table th:nth-child(3), .board-table th:nth-child(4), .board-table th:nth-child(6),
    .board-table td:nth-child(3), .board-table td:nth-child(4), .board-table td:nth-child(6) { display: none; }
    .board-table th, .board-table td { padding: 10px 8px; }
    .card-grid { grid-template-columns: 1fr; }
    .form-box { padding: 24px 16px; }
    .btn { padding: 12px 20px; font-size: 14px; }
    .btn-outline { padding: 12px 20px; font-size: 14px; }
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr 1fr"] { display: flex !important; flex-direction: column !important; }
}
