@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    /* Color Palette - Light Mode */
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    /* Royal Blue */
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --nav-hover-bg: #f3f4f6;
    --nav-active-bg: #eff6ff;
    --nav-active-text: #2563eb;
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --bg-color: #0f172a;
    /* Slate 900 */
    --surface-color: #1e293b;
    /* Slate 800 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    /* Blue 500 */
    --accent-hover: #60a5fa;
    --border-color: #334155;
    --sidebar-bg: #1e293b;
    --sidebar-border: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --nav-hover-bg: #334155;
    --nav-active-bg: #1e3a8a;
    /* Dark Blue */
    --nav-active-text: #60a5fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Sidebar (PC) */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
    display: block;
    margin-bottom: 40px;
    margin-left: -10px;
    /* Move logo 10px to the left */
    text-align: center;
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    transition: filter 0.3s ease;
}

/* Invert logo in light mode */
:root .logo img {
    filter: invert(1);
}

[data-theme="dark"] .logo img {
    filter: invert(0);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scrollbar */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    fill: none;
    stroke: currentColor;
}

.nav-link:hover {
    background-color: var(--nav-hover-bg);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link.active {
    background-color: var(--nav-active-bg);
    color: var(--nav-active-text);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-legal {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sidebar-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-legal a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.server-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: center;
    background: var(--bg-color);
    padding: 8px;
    border-radius: 8px;
    font-weight: 500;
}

.theme-toggle {
    width: 100%;
    padding: 10px;
    cursor: pointer;
    background: var(--nav-hover-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle .toggle-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.theme-toggle:hover {
    background: var(--border-color);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    /* Match sidebar width */
    padding: 40px;
    flex: 1;
    width: calc(100% - 260px);
    max-width: 1200px;
    /* Limit content width for readability */
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -1px;
    white-space: nowrap;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    /* Move up 5px */
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--surface-color);
    padding: 6px 20px 12px 20px;
    /* top 6px, left/right 20px, bottom 12px */
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid var(--border-color);
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS safe area */
}

.bottom-nav .nav-link {
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    font-size: 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
}

.bottom-nav .nav-link .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.bottom-nav .nav-link:hover {
    transform: none;
    background-color: transparent;
    color: var(--accent-color);
}

.bottom-nav .nav-link.active {
    color: var(--accent-color);
    background-color: transparent;
}

/* Mobile Footer */
.mobile-footer {
    display: none;
}

@media (max-width: 768px) {
    .mobile-footer {
        display: flex;
        position: fixed;
        bottom: 70px; /* Above bottom nav */
        left: 0;
        right: 0;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 12px 20px;
        font-size: 11px;
        color: var(--text-secondary);
        text-align: center;
        background: var(--bg-color);
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }
    
    .mobile-footer a {
        color: var(--text-secondary);
        text-decoration: none;
    }
    
    .mobile-footer a:hover {
        color: var(--accent-color);
        text-decoration: underline;
    }
    
    /* Adjust main content padding for mobile footer */
    .main-content {
        padding-bottom: 140px !important; /* Space for footer + bottom nav */
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
        padding-bottom: 100px;
        /* Space for bottom nav */
    }

    .bottom-nav {
        display: flex;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* YouTube PIP Player */
.youtube-pip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background-color: var(--surface-color);
}

.youtube-pip.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.youtube-pip-header {
    background-color: var(--sidebar-bg);
    border-bottom: 2px solid var(--accent-color);
    padding: 10px 12px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.youtube-pip-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.youtube-pip-buttons {
    display: flex;
    gap: 8px;
}

.youtube-pip-minimize,
.youtube-pip-close {
    background: var(--nav-hover-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
    line-height: 1;
}

.youtube-pip-minimize:hover {
    background: var(--accent-color);
    color: white;
}

.youtube-pip-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.youtube-pip-content {
    width: 100%;
    height: 225px;
    background: #000;
}

.youtube-pip iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive PIP for mobile */
@media (max-width: 768px) {
    .youtube-pip {
        width: 280px;
        bottom: 80px;
        /* Above bottom nav */
        right: 10px;
    }

    .youtube-pip-content {
        height: 157px;
    }
}

/* ==========================================
   Top Bar Styles
   ========================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    z-index: 900;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .top-bar {
    background: rgba(30, 41, 59, 0.9);
}

.top-bar-left-mobile {
    display: none;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.top-bar-logo {
    display: flex;
    align-items: center;
}

.top-bar-logo img {
    height: 28px;
    width: auto;
    display: block;
}

/* Invert logo in light mode */
:root .top-bar-logo img {
    filter: invert(1);
}

[data-theme="dark"] .top-bar-logo img {
    filter: invert(0);
}

.theme-toggle-mobile {
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    background: var(--nav-hover-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle-mobile .toggle-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.theme-toggle-mobile:hover {
    background: var(--border-color);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease;
}

.profile-btn:hover {
    transform: scale(1.05);
}

.profile-btn:active {
    transform: scale(0.95);
}

.profile-nickname {
    display: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 10px;
}

.profile-nickname.visible {
    display: block;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    background: var(--nav-hover-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar svg {
    color: var(--text-secondary);
}

.profile-btn:hover .profile-avatar {
    border-color: var(--accent-color);
    background: var(--nav-active-bg);
}

.profile-btn:hover .profile-avatar svg {
    color: var(--accent-color);
}

.profile-btn:hover .profile-nickname {
    color: var(--accent-color);
}

/* Ensure all SVG icons in buttons have proper sizing */
button svg.icon,
button svg.social-icon {
    display: block;
}

/* Adjust main content for top bar */
.main-content {
    margin-top: 60px;
}

/* ==========================================
   Login Modal Styles
   ========================================== */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    display: none;
}

.login-modal-overlay.active {
    display: flex;
}

.login-modal {
    background: var(--surface-color);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.login-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6, #ec4899, var(--accent-color));
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    background: var(--nav-hover-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
    padding: 0;
}

.login-modal-close .icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2px;
    fill: none;
}

.login-modal-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

.login-modal-close:hover .icon {
    stroke: var(--text-primary);
}

.login-modal-header {
    padding: 48px 32px 24px;
    text-align: center;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo img {
    height: 40px;
    width: auto;
}

/* Invert logo in light mode */
:root .login-logo img {
    filter: invert(1);
}

[data-theme="dark"] .login-logo img {
    filter: invert(0);
}

.login-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.login-modal-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.login-modal-body {
    padding: 8px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Social Login Buttons */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.social-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-login-btn:hover::before {
    left: 100%;
}

.social-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    flex-shrink: 0;
}

/* Kakao Button */
.kakao-btn {
    background: #FEE500;
    color: #191919;
}

.kakao-btn:hover {
    background: #F5DC00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 229, 0, 0.4);
}

.kakao-btn:active {
    transform: translateY(0);
}

.kakao-icon {
    fill: #191919;
    stroke: none;
}

.kakao-icon path {
    fill: #191919;
}

/* Google Button */
.google-btn {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.google-btn:hover {
    background: var(--nav-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .google-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.google-btn:active {
    transform: translateY(0);
}

.google-icon {
    stroke: none;
}

.google-icon path {
    stroke: none;
}

.login-modal-footer {
    padding: 16px 32px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.login-modal-footer p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.login-modal-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.login-modal-footer a:hover {
    text-decoration: underline;
}

/* User Menu Modal */
.user-menu-modal {
    max-width: 360px;
}

.user-menu-header {
    padding: 40px 32px 24px;
}

.user-menu-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    background: var(--nav-hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--border-color);
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-avatar svg {
    color: var(--text-secondary);
}

.user-menu-header h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.user-menu-provider {
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    margin: 0 !important;
}

.user-menu-body {
    padding: 16px 24px 24px !important;
    gap: 8px !important;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
}

.user-menu-item svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.user-menu-item:hover {
    background: var(--nav-hover-bg);
}

.user-menu-item:hover svg {
    color: var(--accent-color);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.user-menu-item.logout-btn {
    color: #ef4444;
}

.user-menu-item.logout-btn svg {
    color: #ef4444;
}

.user-menu-item.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 360px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-icon svg {
    width: 16px;
    height: 16px;
}

.toast.success .toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}

.toast-close svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 90px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        max-width: 100%;
    }
}

/* Login Prompt Banner */
.login-prompt-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.login-prompt-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-prompt-content > svg {
    flex-shrink: 0;
    color: var(--accent-color);
}

.login-prompt-content > span {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.login-prompt-content strong {
    color: var(--accent-color);
}

.login-prompt-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Pretendard', sans-serif;
}

.login-prompt-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.login-prompt-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.login-prompt-close:hover {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .login-prompt-content {
        flex-wrap: wrap;
    }
    
    .login-prompt-content > span {
        flex: 1 1 100%;
        order: 2;
        margin-top: 8px;
    }
    
    .login-prompt-content > svg {
        order: 1;
    }
    
    .login-prompt-close {
        order: 1;
        margin-left: auto;
    }
    
    .login-prompt-btn {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }
}

/* Responsive - Top Bar */
@media (max-width: 768px) {
    .top-bar {
        left: 0;
        height: 56px;
        padding: 0 16px;
        justify-content: space-between;
    }
    
    .top-bar-left-mobile {
        display: flex;
    }
    
    .main-content {
        margin-top: 56px;
        padding-bottom: 100px;
    }
    
    .profile-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
    }
    
    .profile-avatar img {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .profile-avatar svg {
        width: 16px;
        height: 16px;
    }
    
    .profile-nickname {
        display: none !important;
    }
    
    .login-modal {
        max-width: 100%;
        margin: 16px;
        border-radius: 16px;
    }
    
    .login-modal-header {
        padding: 40px 24px 20px;
    }
    
    .login-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .login-modal-body {
        padding: 8px 24px 24px;
    }
    
    .login-modal-footer {
        padding: 14px 24px 20px;
    }
    
    .social-login-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   Community Page Styles (Twitter-like)
   ========================================== */

.community-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Feed Section */
.community-feed {
    min-width: 0;
    width: 100%;
}

/* Post Composer */
.post-composer {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.composer-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--nav-hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-secondary);
}

.composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.composer-avatar .avatar-initial {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.composer-content {
    flex: 1;
    min-width: 0;
}

.composer-content textarea {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: 'Pretendard', sans-serif;
    resize: none;
    outline: none;
    padding: 8px 0;
    line-height: 1.5;
    min-height: 56px;
}

.composer-content textarea::placeholder {
    color: var(--text-secondary);
}

.composer-preview {
    margin-bottom: 12px;
}

.preview-image {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.preview-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.preview-remove:hover {
    background: rgba(0, 0, 0, 0.9);
}

.composer-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.composer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Category Dropdown */
.category-dropdown {
    position: relative;
}

.category-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.category-toggle:hover {
    border-color: var(--accent-color);
    background: var(--nav-hover-bg);
}

.category-dropdown.open .category-toggle {
    border-color: var(--accent-color);
}

.category-arrow {
    transition: transform 0.2s;
}

.category-dropdown.open .category-arrow {
    transform: rotate(180deg);
}

.category-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 120px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 100;
    display: none;
}

.category-dropdown.open .category-menu {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-option {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.category-option:hover {
    background: var(--nav-hover-bg);
}

.category-option.selected {
    background: var(--nav-active-bg);
    color: var(--accent-color);
}

.tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-color);
    transition: background 0.2s;
}

.tool-btn:hover {
    background: var(--nav-active-bg);
}

.composer-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.char-counter {
    font-size: 13px;
    color: var(--text-secondary);
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}

.post-btn {
    padding: 8px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.post-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.post-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feed Header */
.feed-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    width: 100%;
}

.feed-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--nav-hover-bg);
    color: var(--accent-color);
}

.refresh-btn.spinning svg {
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Posts List */
.posts-list {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 16px 16px;
}

/* Post Item */
.post-item {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    width: 100%;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background: var(--bg-color);
}

.post-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--nav-hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar .avatar-initial {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    position: relative;
    flex-wrap: nowrap;
}

.post-author {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.post-time {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.post-category {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.category-잡담 { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.category-뉴스 { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.category-정보 { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.category-유머 { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.category-질문 { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.category-취미 { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.category-분석 { background: rgba(249, 115, 22, 0.2); color: #f97316; }

.post-menu-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.post-menu-btn:hover {
    background: var(--nav-hover-bg);
    color: var(--accent-color);
}

.post-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
    overflow: hidden;
    z-index: 100;
}

.post-menu.show {
    display: block;
}

.post-menu button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #ef4444;
    font-size: 14px;
    font-family: 'Pretendard', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.post-menu button:hover {
    background: var(--nav-hover-bg);
}

.post-content {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    margin-bottom: 12px;
}

.post-content .post-link {
    color: var(--accent-color);
    text-decoration: none;
}

.post-content .post-link:hover {
    text-decoration: underline;
}

.post-content .hashtag {
    color: var(--accent-color);
    cursor: pointer;
}

.post-image {
    margin-bottom: 12px;
    border-radius: 16px;
    overflow: hidden;
}

.post-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Post Actions */
.post-actions {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin-left: -8px;
}

.action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--nav-hover-bg);
}

.action-btn.comment-btn:hover {
    color: var(--accent-color);
}

.action-btn.repost-btn:hover,
.action-btn.repost-btn.active {
    color: #22c55e;
}

.action-btn.like-btn:hover,
.action-btn.like-btn.active {
    color: #22c55e;
}

.action-btn.dislike-btn:hover,
.action-btn.dislike-btn.active {
    color: #ef4444;
}

/* Comment like/dislike buttons */
.comment-action-btn.comment-like-btn:hover,
.comment-action-btn.comment-like-btn.active {
    color: #22c55e;
}

.comment-action-btn.comment-dislike-btn:hover,
.comment-action-btn.comment-dislike-btn.active {
    color: #ef4444;
}

.comment-action-btn span {
    margin-left: 2px;
}

.action-btn.bookmark-btn:hover,
.action-btn.bookmark-btn.active {
    color: var(--accent-color);
}

/* Skeleton Loading */
.post-skeleton {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--nav-hover-bg) 25%, var(--border-color) 50%, var(--nav-hover-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    flex: 1;
    min-width: 0;
}

.skeleton-line {
    height: 14px;
    width: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--nav-hover-bg) 25%, var(--border-color) 50%, var(--nav-hover-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
    .skeleton-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* Load More */
.load-more-container {
    padding: 20px;
    text-align: center;
}

.load-more-btn {
    padding: 12px 32px;
    background: var(--surface-color);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--nav-hover-bg);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}


/* Trending */
.trending-list {
    display: flex;
    flex-direction: column;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 8px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.trending-item:hover {
    background: var(--nav-hover-bg);
}

.trending-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trending-content {
    flex: 1;
}

.trending-tag {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.trending-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--nav-hover-bg);
    color: var(--accent-color);
}

.quick-link svg {
    stroke: currentColor;
    fill: none;
}

.sidebar-footer-text {
    display: none; /* Hidden - using main layout footer instead */
}

/* Post Modal */
.post-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.post-modal-overlay.active {
    display: flex;
}

/* Legal Pages (Terms, Privacy) */
.legal-page {
    padding: 20px;
    max-width: 100%;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.legal-header {
    position: relative;
    padding: 48px 32px;
    text-align: center;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.legal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6, #ec4899);
}

.legal-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.legal-header h1 {
    position: relative;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.legal-header h1::before {
    content: '📋';
    display: block;
    font-size: 40px;
    margin-bottom: 16px;
}

.legal-updated {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--nav-hover-bg);
    padding: 6px 14px;
    border-radius: 20px;
}

.legal-updated::before {
    content: '🕐';
    font-size: 12px;
}

.legal-title-terms::before {
    content: '📜' !important;
}

.legal-title-privacy::before {
    content: '🔒' !important;
}

.legal-content {
    padding: 32px;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-color);
}

.legal-section p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.legal-section ol,
.legal-section ul {
    padding-left: 24px;
    margin-bottom: 12px;
}

.legal-section li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-section li ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

.legal-section strong {
    color: var(--text-primary);
}

.legal-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
}

.legal-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.legal-warning strong {
    display: block;
    margin-bottom: 8px;
    color: #ef4444;
}

.legal-warning p {
    color: var(--text-secondary);
    margin: 0;
}

.legal-footer-info {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.legal-footer-info p {
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 0;
    }
    
    .legal-container {
        border-radius: 0;
    }
    
    .legal-header {
        padding: 40px 20px;
    }
    
    .legal-header h1 {
        font-size: 26px;
    }
    
    .legal-header h1::before {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .legal-content {
        padding: 24px 20px;
    }
    
    .legal-section h2 {
        font-size: 16px;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 14px;
    }
    
    .legal-warning {
        flex-direction: column;
        gap: 12px;
    }
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-overlay.active {
    display: flex;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s;
    z-index: 20001;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    animation: imageZoomIn 0.3s ease forwards;
}

@keyframes imageZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Make post images clickable */
.post-image img {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.post-image img:hover {
    opacity: 0.9;
}

.post-modal {
    width: 100%;
    max-width: 600px;
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease forwards;
}

.post-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.post-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.post-modal-close:hover {
    background: var(--nav-hover-bg);
}

.post-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.post-modal-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-post {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.post-stats {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Comment Composer */
.comment-composer {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comment-composer textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Pretendard', sans-serif;
    resize: none;
    outline: none;
}

.comment-composer textarea:focus {
    border-color: var(--accent-color);
}

.comment-submit-btn {
    padding: 0 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-submit-btn:hover {
    background: var(--accent-hover);
}

/* Comments List */
.comments-list {
    padding: 8px 0;
}

.no-comments {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
    font-size: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--nav-hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar .avatar-initial {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.comment-actions {
    margin-top: 8px;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
}

.comment-action-btn:hover {
    background: var(--nav-hover-bg);
}

.comment-action-btn.active {
    color: #ef4444;
}

.comment-reply {
    display: flex;
    gap: 10px;
    padding: 10px 0 0 0;
    margin-left: 0;
}

.comment-reply .comment-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

.comment-reply .avatar-initial {
    font-size: 12px;
}

/* Fade out animation */
@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-20px); }
}

.error-message {
    text-align: center;
    padding: 32px;
    color: #ef4444;
}

/* Community Responsive */
@media (max-width: 1024px) {
}

@media (max-width: 768px) {
    .community-container {
        display: block;
        padding: 0;
    }
    
    .community-feed {
        width: 100%;
    }
    
    .post-composer {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 8px;
        flex-direction: row;
    }
    
    .composer-content {
        width: 100%;
    }
    
    .composer-content textarea {
        width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .composer-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .feed-header {
        border-radius: 0;
        border-left: none;
        border-right: none;
        flex-direction: row;
    }
    
    .feed-header h2 {
        white-space: nowrap;
    }
    
    .posts-list {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .post-item {
        flex-direction: row;
    }
    
    .post-body {
        width: calc(100% - 52px);
    }
    
    .post-content {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .composer-avatar,
    .post-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        flex-shrink: 0;
    }
    
    .composer-avatar .avatar-initial,
    .post-avatar .avatar-initial {
        font-size: 16px;
    }
    
    .post-modal {
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }
    
    .post-modal-overlay {
        padding: 0;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state h3,
    .empty-state p {
        white-space: normal;
        word-break: keep-all;
    }
    
    .load-more-container {
        padding: 16px;
    }
    
    .load-more-btn {
        width: 100%;
    }
}