/* ========== 기본 스타일 & 변수 ========== */
:root {
    /* 라이트 테마 */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    /* 브랜드 컬러 */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* 그라데이션 */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-admin: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    
    /* 사이즈 */
    --navbar-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    /* 트랜지션 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 다크 테마 */
.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========== 리셋 & 기본 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* ========== 유틸리티 클래스 ========== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.gradient-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.gradient-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.gradient-btn:hover::before {
    left: 100%;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.gradient-btn:active {
    transform: translateY(0);
}

/* ========== 로딩 스크린 ========== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    width: 200px;
    margin-bottom: 40px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--secondary);
    animation: spin 1.5s linear infinite reverse;
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-bottom-color: var(--accent);
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    animation: fade-pulse 2s ease-in-out infinite;
}

/* ========== 네비게이션 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px var(--shadow-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    transition: transform var(--transition-normal);
}

.nav-logo:hover .logo-img {
    transform: scale(1.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(15deg);
}

.theme-toggle i {
    transition: transform var(--transition-normal);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login, .btn-signup {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-login {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-login:hover {
    background: var(--primary);
    color: white;
}

.btn-signup {
    background: var(--gradient-primary);
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
}

.dropdown-name {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-username {
    font-size: 0.85rem;
    opacity: 0.8;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    padding-left: 24px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--gradient-admin);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ========== 메인 컨텐츠 ========== */
.main-content {
    padding-top: calc(var(--navbar-height) + 30px);
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 글 작성 영역 ========== */
.write-section {
    margin-bottom: 30px;
}

.write-card {
    padding: 24px;
    transition: all var(--transition-normal);
}

.write-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.write-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.write-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.write-prompt {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.write-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.editor-container {
    position: relative;
}

.post-editor {
    width: 100%;
    min-height: 120px;
    max-height: 400px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    transition: all var(--transition-normal);
}

.post-editor:focus {
    background: var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--primary);
}

.post-editor::placeholder {
    color: var(--text-tertiary);
}

.editor-preview {
    min-height: 120px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    overflow: auto;
}

.write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-preview {
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.btn-preview:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-post {
    padding: 10px 24px;
}

/* ========== 피드 영역 ========== */
.feed-section {
    padding-bottom: 50px;
}

.feed-header {
    margin-bottom: 24px;
}

.feed-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== 포스트 카드 ========== */
.post-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px var(--shadow-color);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    transition: all var(--transition-normal);
}

.post-card:hover .author-avatar {
    transform: scale(1.1);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.author-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.admin-mark {
    background: var(--gradient-admin);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: shimmer 2s infinite;
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.post-menu {
    position: relative;
}

.post-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.post-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.post-menu:hover .post-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.menu-item:hover {
    background: var(--bg-tertiary);
}

.menu-item.danger {
    color: var(--danger);
}

.post-content {
    padding: 0 20px 20px;
}

.post-text {
    font-size: 1rem;
    line-height: 1.8;
    word-break: break-word;
}

.post-text h1, .post-text h2, .post-text h3 {
    margin: 16px 0 8px;
}

.post-text p {
    margin-bottom: 12px;
}

.post-text code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

.post-text pre {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 16px 0;
}

.post-text blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-actions {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    gap: 24px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-normal);
    padding: 8px 16px;
    border-radius: 50px;
}

.action-btn:hover {
    background: var(--bg-tertiary);
}

.action-btn.liked {
    color: var(--danger);
}

.action-btn.liked i {
    animation: heart-pop 0.3s ease;
}

.action-btn i {
    font-size: 1.2rem;
    transition: transform var(--transition-normal);
}

.action-btn:hover i {
    transform: scale(1.2);
}

/* ========== 모달 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-in 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    z-index: 10;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* 인증 모달 */
.auth-content {
    padding: 40px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    transition: all var(--transition-normal);
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.auth-tab.active {
    color: var(--text-primary);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    transition: color var(--transition-normal);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.input-wrapper input:focus {
    background: var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--primary);
}

.input-wrapper input:focus + i,
.input-wrapper:focus-within i {
    color: var(--primary);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.form-error {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--border-radius-sm);
    color: var(--danger);
    font-size: 0.9rem;
}

.btn-auth {
    margin-top: 10px;
    justify-content: center;
    font-size: 1.1rem;
    padding: 16px;
}

/* 정지 모달 */
.suspended-content {
    padding: 50px 40px;
    text-align: center;
    background: var(--bg-secondary);
}

.suspended-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suspended-icon i {
    font-size: 2.5rem;
    color: var(--danger);
}

.suspended-content h2 {
    margin-bottom: 16px;
    color: var(--danger);
}

.suspended-reason {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.suspended-until {
    font-weight: 600;
    margin-bottom: 24px;
}

.btn-close-modal {
    padding: 14px 40px;
}

/* 포스트 상세 모달 */
.post-detail-content {
    max-width: 700px;
    padding: 30px;
}

/* 관리자 모달 */
.admin-content {
    max-width: 900px;
    padding: 0;
    max-height: 85vh;
}

.admin-header {
    padding: 24px 30px;
    background: var(--gradient-admin);
    color: white;
}

.admin-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.admin-tab {
    padding: 16px 24px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: all var(--transition-normal);
}

.admin-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-admin);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.admin-tab.active {
    color: var(--text-primary);
}

.admin-tab.active::after {
    transform: scaleX(1);
}

.admin-content-area {
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
}

/* ========== 댓글 영역 ========== */
.comments-section {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input {
    width: 100%;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    resize: none;
    min-height: 50px;
    transition: all var(--transition-normal);
}

.comment-input:focus {
    background: var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--primary);
}

.comment-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.anonymous-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.anonymous-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.btn-comment {
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-comment:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.comment-item:hover {
    background: var(--bg-secondary);
}

.comment-item.reply {
    margin-left: 40px;
    border-left: 2px solid var(--primary);
}

.comment-item.reply-to-reply {
    margin-left: 80px;
    border-left: 2px solid var(--secondary);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-author-name {
    font-weight: 700;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.comment-text {
    margin-bottom: 8px;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 16px;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.comment-action:hover {
    color: var(--text-primary);
}

.comment-action.liked {
    color: var(--danger);
}

.author-heart {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--danger);
}

.author-heart img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* ========== 토스트 메시지 ========== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toast-in 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-message {
    font-weight: 500;
}

.toast.fade-out {
    animation: toast-out 0.3s ease forwards;
}

/* ========== 로딩 ========== */
.feed-loading {
    padding: 40px;
    text-align: center;
}

.loading-dots {
    display: inline-flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* ========== 빈 상태 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-text {
    color: var(--text-secondary);
}

/* ========== 반응형 ========== */

/* 태블릿 */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 600px;
    }
    
    .admin-content {
        width: 95%;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .navbar {
        height: 56px;
        padding: 0 12px;
    }
    
    .nav-container {
        padding: 0;
    }
    
    .main-content {
        padding-top: calc(56px + 16px);
    }
    
    .logo-img {
        height: 28px;
    }
    
    /* 네비게이션 버튼 */
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .btn-login, .btn-signup {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .btn-signup span {
        display: none;
    }
    
    .btn-signup::after {
        content: '가입';
    }
    
    /* 유저 메뉴 */
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-dropdown {
        right: -10px;
        min-width: 180px;
    }
    
    /* 글 작성 영역 */
    .write-section {
        margin-bottom: 16px;
    }
    
    .write-card {
        padding: 12px;
        border-radius: 12px;
    }
    
    .write-header {
        margin-bottom: 12px;
    }
    
    .write-avatar {
        width: 36px;
        height: 36px;
    }
    
    .write-prompt {
        font-size: 0.9rem;
    }
    
    .post-editor {
        min-height: 100px;
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .write-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .write-actions button {
        width: 100%;
        justify-content: center;
    }
    
    /* 에디터 툴바 */
    .editor-toolbar {
        padding: 10px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .toolbar-group {
        gap: 4px;
        flex-wrap: wrap;
        padding-bottom: 6px;
    }
    
    .toolbar-btn, .toolbar-dropdown-btn, .color-picker-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .toolbar-dropdown-content,
    .color-picker-panel {
        min-width: 160px;
    }
    
    /* 피드 */
    .feed-header {
        margin-bottom: 16px;
    }
    
    .feed-title {
        font-size: 1.1rem;
    }
    
    .feed-list {
        gap: 12px;
    }
    
    /* 포스트 카드 */
    .post-card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .post-header {
        margin-bottom: 10px;
    }
    
    .author-avatar {
        width: 38px;
        height: 38px;
    }
    
    .author-name {
        font-size: 0.9rem;
    }
    
    .author-badges {
        flex-wrap: wrap;
    }
    
    .admin-mark {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .post-time {
        font-size: 0.75rem;
    }
    
    .post-content {
        margin-bottom: 12px;
    }
    
    .post-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .post-actions {
        padding-top: 10px;
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .post-menu-btn {
        width: 32px;
        height: 32px;
    }
    
    .post-menu-dropdown {
        min-width: 120px;
    }
    
    /* 모달 */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
        border-radius: 16px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }
    
    /* 인증 모달 */
    .auth-content {
        padding: 24px 16px;
    }
    
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .auth-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .input-wrapper input {
        padding: 10px 12px 10px 38px;
        font-size: 0.9rem;
    }
    
    .input-wrapper i {
        left: 12px;
        font-size: 0.9rem;
    }
    
    .input-hint {
        font-size: 0.7rem;
    }
    
    .btn-auth {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    /* 글 상세 모달 */
    .post-detail-content {
        padding: 16px;
        max-height: 85vh;
    }
    
    /* 댓글 */
    .comments-section {
        margin-top: 16px;
    }
    
    .comments-header {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .comment-form {
        gap: 10px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-input {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .comment-options {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .anonymous-toggle {
        font-size: 0.8rem;
    }
    
    .btn-comment {
        width: 100%;
        justify-content: center;
    }
    
    .comment-item {
        gap: 10px;
        padding: 10px 0;
    }
    
    .comment-item.reply {
        margin-left: 24px;
    }
    
    .comment-item.reply-to-reply {
        margin-left: 48px;
    }
    
    .comment-author {
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .comment-author-name {
        font-size: 0.85rem;
    }
    
    .comment-time {
        font-size: 0.7rem;
    }
    
    .comment-text {
        font-size: 0.85rem;
    }
    
    .comment-actions {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .comment-action {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .admin-reveal {
        font-size: 0.7rem !important;
        padding: 3px 8px !important;
    }
    
    /* 관리자 패널 */
    .admin-content {
        width: 98%;
        max-height: 90vh;
        padding: 16px;
    }
    
    .admin-header h2 {
        font-size: 1.1rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .admin-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .user-action-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* 글 수정 모달 */
    .edit-post-content {
        width: 98%;
        padding: 0;
    }
    
    .edit-header {
        padding: 16px;
    }
    
    .edit-header h2 {
        font-size: 1.1rem;
    }
    
    .edit-body {
        padding: 16px;
    }
    
    .edit-body .post-editor {
        min-height: 150px;
    }
    
    .edit-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .edit-actions button {
        width: 100%;
        justify-content: center;
    }
    
    /* 정지 모달 */
    .suspended-content {
        padding: 24px 16px;
    }
    
    .suspended-icon {
        font-size: 3rem;
    }
    
    .suspended-content h2 {
        font-size: 1.2rem;
    }
    
    /* 토스트 */
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    
    .toast {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    /* 로딩 */
    .loading-content {
        padding: 20px;
    }
    
    .loading-logo {
        height: 50px;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
}

/* 아주 작은 화면 (아이폰 SE 등) */
@media (max-width: 375px) {
    .container {
        padding: 0 8px;
    }
    
    .navbar {
        padding: 0 8px;
    }
    
    .logo-img {
        height: 24px;
    }
    
    .btn-login {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .btn-signup {
        padding: 6px 10px;
    }
    
    .post-card {
        padding: 12px;
    }
    
    .author-avatar {
        width: 32px;
        height: 32px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .comment-item.reply {
        margin-left: 16px;
    }
    
    .comment-item.reply-to-reply {
        margin-left: 32px;
    }
    
    .toolbar-btn, .toolbar-dropdown-btn, .color-picker-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .toolbar-group {
        gap: 3px;
        flex-wrap: wrap;
        padding-bottom: 5px;
    }
}

/* ========== 스크롤바 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========== 푸터 ========== */
.site-footer {
    margin-top: 60px;
    padding: 30px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 40px;
        padding: 20px 16px;
    }
    
    .footer-content p {
        font-size: 0.75rem;
    }
}

/* ========== 선택 영역 ========== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========== 글 수정 모달 ========== */
.edit-post-content {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.edit-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.edit-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.edit-header h2 i {
    color: var(--primary);
}

.edit-body {
    padding: 20px 24px;
}

.edit-body .editor-container {
    margin-bottom: 16px;
}

.edit-body .post-editor {
    min-height: 200px;
    max-height: 400px;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-cancel {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-cancel:hover {
    background: var(--danger);
    color: white;
}

/* ========== 관리자 익명 보기 버튼 ========== */
.admin-reveal {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    margin-left: 8px;
}

.admin-reveal:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.admin-reveal.revealed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

.comment-author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
