/* CSS Reset for cross-browser compatibility */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f5f6f7;
    color: #333333;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: rgba(34, 197, 94, 0.1);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f0;
    --border-color: #e8e8e8;
    --border-color-hover: #d0d0d0;
    --navbar-bg: rgba(17, 17, 17, 0.95);
    --shadow-soft: 0 4px 6px -1px rgba(34, 197, 94, 0.12), 0 2px 4px -1px rgba(34, 197, 94, 0.08);
}

body.dark-mode {
    background: #0a0a0a;
    color: #ffffff;
}

body.dark-mode {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: rgba(34, 197, 94, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-tertiary: #666666;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --border-color: #1a1a1a;
    --border-color-hover: #2a2a2a;
    --navbar-bg: rgba(17, 17, 17, 0.95);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
}

.navbar-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    position: relative;
    transition: all 0.2s ease-out;
}

.navbar-brand:hover {
    color: #39FF14;
    text-decoration: none;
    transform: scale(1.02);
}

.navbar-brand svg {
    width: 36px;
    height: 36px;
    color: #39FF14;
    filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.4));
    transition: all 0.2s ease-out;
}

.navbar-brand:hover svg {
    filter: drop-shadow(0 0 16px rgba(57, 255, 20, 0.8));
    transform: rotate(-5deg) scale(1.1);
}

/* Logo Icon - JIEJOE Style */
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #39FF14 0%, #00FF41 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #0a0a0a;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover .logo-icon {
    transform: rotate(-8deg) scale(1.15);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.navbar-brand:hover .logo-icon::before {
    opacity: 1;
}

.navbar-search {
    flex: 1;
    max-width: 400px;
    margin: 0 32px;
}

.navbar-search input {
    width: 100%;
    height: 38px;
    padding: 0 16px;
    border: 1px solid #262626;
    border-radius: 6px;
    background: #1a1a1a;
    font-family: inherit;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    transition: all 0.15s ease;
}

.navbar-search input:focus {
    border-color: #22c55e;
    background: #141414;
}

.navbar-search input::placeholder {
    color: #525252;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-nav a {
    color: #999999;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.navbar-nav a:hover {
    color: #ffffff !important;
    background: #1a1a1a;
    text-decoration: none !important;
}

.navbar-nav a.active {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.1);
}

#notificationLink {
    position: relative;
}

#notificationLink:hover {
    color: #ffffff !important;
    background: #1a1a1a;
    text-decoration: none !important;
}

/* Theme Toggle Button */


.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #999999;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 10001;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.theme-toggle .sun-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-toggle .moon-icon {
    width: 20px;
    height: 20px;
    display: none;
}

body.dark-mode .theme-toggle .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle .moon-icon {
    display: block;
}

/* View Transition 主题切换动画 */
::view-transition-old(root) {
    animation: none;
    z-index: 1;
}

::view-transition-new(root) {
    animation: circle-reveal 0.5s ease-out;
    z-index: 9999;
    mix-blend-mode: normal;
}

@keyframes circle-reveal {
    from {
        clip-path: circle(0% at var(--theme-x, 50%) var(--theme-y, 50%));
    }
    to {
        clip-path: circle(150% at var(--theme-x, 50%) var(--theme-y, 50%));
    }
}

/* Light Mode Styles */
.profile-sidebar {
    background: #ffffff;
    border-right: 1px solid #e8e8e8;
}

.profile-name {
    color: var(--text-primary);
}

.profile-username {
    color: #666666;
}

.profile-bio {
    color: #666666;
}

.profile-nav a {
    color: #666666;
}

.profile-nav a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.profile-nav a.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--primary-color);
}

.profile-section {
    background: #ffffff;
    border: 1px solid #e8e8e8;
}

.profile-section-header {
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.profile-section-header h3 {
    color: var(--text-primary);
}

.form-group label {
    color: #666666;
}

.form-group input,
.form-group textarea,
.form-group select {
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid #d9d9d9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: #ffffff;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999999;
}

/* Dark Mode Overrides */
body.dark-mode .profile-sidebar {
    background: #111111;
    border-right: 1px solid #1a1a1a;
}

body.dark-mode .profile-name {
    color: #ffffff;
}

body.dark-mode .profile-username {
    color: #999999;
}

body.dark-mode .profile-bio {
    color: #999999;
}

body.dark-mode .profile-nav a {
    color: #999999;
}

body.dark-mode .profile-nav a:hover {
    background: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .profile-nav a.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--primary-color);
}

body.dark-mode .profile-section {
    background: #111111;
    border: 1px solid #1a1a1a;
}

body.dark-mode .profile-section-header {
    border-bottom: 1px solid #1a1a1a;
    background: #141414;
}

body.dark-mode .profile-section-header h3 {
    color: #ffffff;
}

body.dark-mode .form-group label {
    color: #999999;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    color: #ffffff;
    background: #1a1a1a;
    border: 1px solid #262626;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .form-group select:focus {
    background: #141414;
    border-color: var(--primary-color);
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #525252;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

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

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    padding: 8px 0;
    display: none;
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #e5e5e5;
    font-size: 14px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.dropdown-divider {
    height: 1px;
    background: #1a1a1a;
    margin: 8px 0;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #000000;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #1a1a1a;
    color: #e5e5e5;
    border: 1px solid #262626;
}

.btn-secondary:hover {
    background: #262626;
    border-color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Profile Layout */
.profile-layout {
    display: flex;
    padding-top: 64px;
    min-height: 100vh;
}

.profile-sidebar {
    width: 280px;
    padding: 32px 24px;
    position: fixed;
    top: 64px;
    bottom: 0;
    overflow-y: auto;
}

.profile-main {
    flex: 1;
    margin-left: 280px;
    padding: 32px 40px;
}

/* Profile Avatar */
.profile-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    width: 100%;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 48px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 48px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s ease;
    border-radius: 0 0 80px 80px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-avatar-wrapper:hover .avatar-upload-overlay {
    opacity: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 14px;
    margin-bottom: 16px;
}

.profile-bio {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 24px;
}

body.dark-mode .profile-stats {
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.stat-item:hover {
    background: var(--bg-secondary);
}

body.dark-mode .stat-item:hover {
    background: #1a1a1a;
}

.stat-item .count {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-item .label {
    font-size: 12px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-nav {
    list-style: none;
}

.profile-nav li {
    margin-bottom: 4px;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
}

/* Profile Section */
.profile-section {
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.profile-section-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.profile-section-body {
    padding: 24px 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 6px;
    outline: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group input.error {
    border-color: #ef4444;
}

.error-message {
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
    display: none;
}

/* Alert */
.alert {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.alert.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Home Page */
.home-hero {
    background: #0a0a0a;
    color: #ffffff;
    padding: 120px 40px;
    text-align: center;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.home-hero p {
    font-size: 18px;
    color: #666666;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.home-hero .btn {
    font-size: 15px;
    padding: 14px 32px;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 28px;
    transition: all 0.15s ease;
}

.feature-card:hover {
    border-color: #262626;
    transform: translateY(-2px);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-card h3 svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-card p {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

/* 404 Page */
.page-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: #0a0a0a;
}

.page-404-content h1 {
    font-size: 96px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
}

.page-404-content h2 {
    font-size: 24px;
    color: #666666;
    margin-bottom: 16px;
}

.page-404-content p {
    color: #525252;
    margin-bottom: 32px;
    font-size: 15px;
}

.page-404-content .btn {
    margin: 0 6px;
}

/* Notifications */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: #141414;
}

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

.notification-item.unread {
    background: rgba(34, 197, 94, 0.05);
    border-left: 3px solid #22c55e;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    color: #e5e5e5;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-content .time {
    color: #525252;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #525252;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    color: #a3a3a3;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #525252;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #1a1a1a;
    background: #111111;
}

.tab {
    padding: 14px 24px;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.tab:hover {
    color: #a3a3a3;
    background: #141414;
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: #525252;
    font-size: 14px;
    border-top: 1px solid #1a1a1a;
    background: #0a0a0a;
}

.footer p {
    margin-bottom: 6px;
}

/* Loading */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .profile-sidebar {
        display: none;
    }
    
    .profile-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 12px;
        height: 56px;
    }

    .navbar-brand {
        font-size: 18px;
        gap: 8px;
    }

    .navbar-brand .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .navbar-search {
        display: none;
    }

    .navbar-nav {
        gap: 4px;
    }

    .navbar-nav a {
        padding: 8px;
        font-size: 13px;
    }

    .navbar-nav a svg {
        width: 18px;
        height: 18px;
    }

    #notificationLink .notification-badge {
        top: -2px;
        right: -2px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        margin-left: 2px;
    }

    .user-menu .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .profile-main {
        padding: 20px 16px;
        margin-top: 56px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .home-hero {
        padding: 80px 16px;
        min-height: calc(100vh - 56px);
    }

    .home-hero h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .home-hero p {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .home-features {
        padding: 40px 16px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .feature-card h3 {
        font-size: 16px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 28px;
    }

    .avatar-upload-overlay {
        width: 100px;
        height: 36px;
        border-radius: 0 0 50px 50px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-stats {
        gap: 12px;
        padding: 16px 0;
    }

    .stat-item .count {
        font-size: 20px;
    }

    .page-container {
        padding: 1rem;
        padding-top: 72px;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .articles-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .articles-sidebar {
        order: -1;
    }

    .article-card {
        flex-direction: column;
    }

    .article-card .article-cover {
        width: 100%;
        min-height: 180px;
    }

    .article-card .article-title {
        font-size: 1rem;
    }

    .article-card .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .articles-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-tabs {
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sort-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .empty-state,
    .loading-state {
        padding: 2rem 1rem;
    }

    .login-prompt {
        padding: 2rem 1rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    /* Feed Page Mobile */
    .feed-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feed-sidebar {
        position: static;
        order: -1;
    }

    .following-list {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .following-list::-webkit-scrollbar {
        display: none;
    }

    .following-item {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
        min-width: 70px;
        border-radius: 8px;
    }

    .following-avatar {
        width: 44px;
        height: 44px;
    }

    .following-name {
        font-size: 0.7rem;
        margin-top: 4px;
    }

    .post-composer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .composer-avatar {
        display: none;
    }

    .composer-input {
        min-height: 80px;
        font-size: 15px;
    }

    .feed-filter-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-group + .filter-group {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color, #e8e8e8);
        padding-top: 0.5rem;
        width: 100%;
    }

    body.dark-mode .filter-group + .filter-group {
        border-left-color: transparent;
        border-top-color: var(--border-color, #262626);
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 13px;
    }

    .post-card {
        padding: 1rem;
        margin-bottom: 0.625rem;
        border-radius: 10px;
    }

    .post-header {
        gap: 0.625rem;
        margin-bottom: 0.625rem;
    }

    .post-avatar {
        width: 36px;
        height: 36px;
    }

    .post-author-name {
        font-size: 14px;
    }

    .post-time {
        font-size: 12px;
    }

    .post-text {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 0.625rem;
    }

    .post-actions {
        gap: 0.25rem;
        padding-top: 0.625rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-actions::-webkit-scrollbar {
        display: none;
    }

    .post-action-btn {
        padding: 0.5rem 0.75rem;
        min-height: 38px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .post-action-btn span {
        display: inline;
    }

    .share-card {
        padding: 0.625rem;
        font-size: 13px;
    }

    .selected-user-info {
        padding: 1rem;
        gap: 0.75rem;
    }

    .user-avatar-large {
        width: 48px;
        height: 48px;
    }

    .user-info-text h2 {
        font-size: 1rem;
    }

    .user-info-text p {
        font-size: 13px;
    }

    .comment-item {
        gap: 0.5rem;
    }

    .comment-avatar {
        width: 26px;
        height: 26px;
    }

    .comment-author {
        font-size: 13px;
    }

    .comment-text {
        font-size: 13px;
    }

    .comment-time {
        font-size: 11px;
    }

    .comment-input-area {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .comment-input {
        font-size: 14px;
        min-height: 36px;
    }

    .skeleton-card {
        padding: 1rem;
    }

    .skeleton-avatar {
        width: 36px;
        height: 36px;
    }

    /* Tabs Mobile */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        padding: 12px 18px;
        white-space: nowrap;
        font-size: 13px;
    }

    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Profile Nav Mobile */
    .profile-nav a {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Form Elements Mobile */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 12px 14px;
    }

    /* Alert Mobile */
    .alert {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Footer Mobile */
    .footer {
        padding: 24px 16px;
        font-size: 13px;
    }

    /* Notification Item Mobile */
    .notification-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .notification-avatar {
        width: 36px;
        height: 36px;
    }

    .notification-content p {
        font-size: 13px;
    }

    .notification-content .time {
        font-size: 11px;
    }

    /* Recommend Section Mobile */
    .recommend-user {
        padding: 0.625rem 0;
    }

    .recommend-avatar {
        width: 28px;
        height: 28px;
    }

    .recommend-name {
        font-size: 13px;
    }

    /* No More Articles Mobile */
    .no-more-articles {
        padding: 1.5rem 1rem;
    }

    /* Loading More Mobile */
    .loading-more {
        padding: 1.25rem;
        font-size: 13px;
    }

    /* Pull Refresh Indicator */
    .pull-refresh-indicator {
        font-size: 13px;
        padding: 0.625rem;
    }

    /* Dropdown Menu Mobile */
    .dropdown-menu {
        min-width: 180px;
        right: -8px;
    }

    .dropdown-menu a {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Unread Badge Mobile */
    .unread-badge {
        font-size: 10px;
        min-width: 16px;
        height: 16px;
    }

    /* Share Preview Mobile */
    .share-preview-item {
        font-size: 13px;
        padding: 0.5rem;
    }
}

/* Articles Page */
.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.articles-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}

.articles-main {
    min-width: 0;
}

.articles-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    padding: 1rem;
}

body.dark-mode .sidebar-section {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.articles-filter {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
}

body.dark-mode .articles-filter {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.filter-tab.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

.sort-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-tertiary, #e8e8e8);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
}

body.dark-mode .sort-tabs {
    background: var(--bg-tertiary, #1a1a1a);
    border-color: var(--border-color, #262626);
}

.sort-tab {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.sort-tab:hover {
    color: var(--text-primary);
}

.sort-tab.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    font-weight: 500;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
}

body.dark-mode .article-card {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--border-color-hover, #d0d0d0);
}

body.dark-mode .article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: var(--border-color-hover, #2a2a2a);
}

.article-card .article-cover {
    width: 200px;
    min-height: 150px;
    flex-shrink: 0;
}

.article-card .article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .article-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .article-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.article-card .article-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.article-card .article-meta .author:hover {
    color: var(--primary-color);
}

.article-card .article-meta .author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.article-card .article-meta .author:hover .author-avatar {
    transform: scale(1.1);
}

.article-card .article-meta .stats {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.article-card .article-meta .stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.categories-list, .archives-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-item, .archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.category-item:hover, .archive-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.category-item .count, .archive-item .count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--text-tertiary);
}

.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
}

body.dark-mode .loading-state,
body.dark-mode .empty-state {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.loading-state .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.empty-text {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-align: center;
    padding: 1rem;
}

.loading-placeholder {
    height: 60px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.load-more-trigger {
    min-height: 20px;
}

.loading-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.loading-more .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.no-more-articles {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.no-more-articles span {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 20px;
    color: var(--text-tertiary, #999999);
}

body.dark-mode .no-more-articles span {
    background: var(--bg-secondary, #1a1a1a);
    border-color: var(--border-color, #2a2a2a);
}

.login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
}

body.dark-mode .login-prompt {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.login-prompt p {
    color: var(--text-secondary, #666666);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

@media (max-width: 900px) {
    .articles-layout {
        grid-template-columns: 1fr;
    }

    .articles-sidebar {
        order: -1;
    }

    .article-card {
        flex-direction: column;
    }

    .article-card .article-cover {
        width: 100%;
        min-height: 180px;
    }
}

/* Feed Page Styles */
.feed-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.feed-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.following-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.following-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.following-item:hover {
    background: var(--bg-secondary, #f5f6f7);
    border-color: var(--border-color, #e8e8e8);
}

body.dark-mode .following-item:hover {
    background: var(--bg-secondary, #1a1a1a);
    border-color: var(--border-color, #262626);
}

.following-item.active {
    background: var(--primary-light, rgba(34, 197, 94, 0.1));
    border-color: rgba(34, 197, 94, 0.2);
}

.following-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.following-avatar .avatar-initials {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.following-info {
    flex: 1;
    min-width: 0;
}

.following-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.feed-main {
    min-height: 500px;
}

.selected-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

body.dark-mode .selected-user-info {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.user-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.avatar-initials-large {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.user-info-text h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-info-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.empty-text {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .feed-layout {
        grid-template-columns: 1fr;
    }

    .feed-sidebar {
        position: static;
        order: -1;
    }

    .following-list {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        padding-bottom: 0.5rem;
    }

    .following-item {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
        min-width: 70px;
    }

    .following-avatar {
        width: 48px;
        height: 48px;
    }

    .following-name {
        font-size: 0.75rem;
    }
}

/* Post Composer */
.post-composer {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    margin-bottom: 1rem;
}

body.dark-mode .post-composer {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.composer-avatar .avatar-initials {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.composer-input {
    width: 100%;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary);
    font-family: inherit;
}

body.dark-mode .composer-input {
    background: var(--bg-primary, #0a0a0a);
    border-color: var(--border-color, #262626);
}

.composer-input:focus {
    outline: none;
    border-color: var(--primary, #22c55e);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.composer-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Feed Filter Bar */
.feed-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    margin-bottom: 1rem;
}

body.dark-mode .feed-filter-bar {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.filter-group {
    display: flex;
    gap: 0.25rem;
}

.filter-group + .filter-group {
    padding-left: 1rem;
    border-left: 1px solid var(--border-color, #e8e8e8);
}

body.dark-mode .filter-group + .filter-group {
    border-left-color: var(--border-color, #262626);
}

.filter-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-tertiary, #f0f0f0);
}

.filter-btn.active {
    background: var(--primary, #22c55e);
    color: #fff;
}

body.dark-mode .filter-btn:hover {
    background: var(--bg-tertiary, #1a1a1a);
}

/* Post Card */
.post-card {
    padding: 1.25rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

body.dark-mode .post-card {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.post-card:hover {
    border-color: var(--primary, #22c55e);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-avatar:hover {
    transform: scale(1.1);
}

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

.post-avatar .avatar-initials {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s;
}

.post-author-name:hover {
    color: var(--primary-color);
}

.post-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.post-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.share-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary, #f5f6f7);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: background 0.2s;
}

body.dark-mode .share-card {
    background: var(--bg-tertiary, #0a0a0a);
    border-color: var(--border-color, #262626);
}

.share-card:hover {
    background: var(--primary-light, rgba(34, 197, 94, 0.1));
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

body.dark-mode .post-actions {
    border-top-color: var(--border-color, #1a1a1a);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.post-action-btn:hover {
    background: var(--bg-tertiary, #f0f0f0);
    color: var(--primary, #22c55e);
}

.post-action-btn.liked {
    color: #ef4444;
}

.post-action-btn.liked svg {
    fill: currentColor;
}

body.dark-mode .post-action-btn:hover {
    background: var(--bg-tertiary, #1a1a1a);
}

/* Feed List */
.feed-list {
    min-height: 200px;
}

/* Post Comments Section */
.post-comments-section {
    border-top: 1px solid var(--border-color, #e8e8e8);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

body.dark-mode .post-comments-section {
    border-top-color: var(--border-color, #1a1a1a);
}

.comments-loading {
    text-align: center;
    padding: 1rem;
}

.comment-error, .no-comments {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    padding: 0.75rem;
}

.comments-list {
    margin-bottom: 0.75rem;
}

.comment-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.avatar-initials-sm {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

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

.comment-text {
    font-size: 0.8125rem;
    color: var(--text-primary);
    word-break: break-word;
}

.comment-time {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

.more-comments {
    font-size: 0.8125rem;
    color: var(--primary, #22c55e);
    cursor: pointer;
    padding: 0.25rem 0;
}

.comment-input-area {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

body.dark-mode .comment-input-area {
    border-top-color: var(--border-color, #1a1a1a);
}

.comment-input {
    flex: 1;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

body.dark-mode .comment-input {
    background: var(--bg-primary, #0a0a0a);
    border-color: var(--border-color, #262626);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary, #22c55e);
}

.btn-xs {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-outline {
    border: 1px solid var(--border-color, #e8e8e8);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--primary, #22c55e);
    color: var(--primary, #22c55e);
}

/* Recommend Section */
.recommend-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

body.dark-mode .recommend-section {
    border-top-color: var(--border-color, #1a1a1a);
}

.recommend-section h4 {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0 0 0.75rem;
    font-weight: 500;
}

.recommend-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.recommend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.recommend-info {
    flex: 1;
    min-width: 0;
}

.recommend-name {
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Skeleton Loading */
.skeleton-card {
    padding: 1.25rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

body.dark-mode .skeleton-card {
    background: var(--bg-secondary, #111111);
    border-color: var(--border-color, #1a1a1a);
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary, #e8e8e8);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: var(--bg-tertiary, #e8e8e8);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

body.dark-mode .skeleton-line,
body.dark-mode .skeleton-avatar {
    background: var(--bg-tertiary, #1a1a1a);
}

.skeleton-line.w15 { width: 15%; }
.skeleton-line.w25 { width: 25%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w90 { width: 90%; }

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.skeleton-footer {
    display: flex;
    gap: 1rem;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Unread Badge */
.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    margin-left: 0.375rem;
}

/* Pull to Refresh */
.pull-refresh-indicator {
    text-align: center;
    padding: 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    display: none;
}

.pull-refresh-indicator.visible {
    display: block;
}

/* Mobile Feed Optimization */
@media (max-width: 768px) {
    .post-composer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .composer-avatar {
        display: none;
    }

    .composer-body {
        width: 100%;
    }

    .post-action-btn {
        padding: 0.5rem 0.625rem;
        min-height: 36px;
    }

    .comment-input-area {
        flex-wrap: wrap;
    }

    .comment-input {
        min-width: 0;
        flex: 1 1 calc(100% - 70px);
    }

    .feed-filter-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-group + .filter-group {
        padding-left: 0;
        border-left: none;
    }
}

.post-action-delete {
    margin-left: auto;
}

.post-action-delete:hover {
    color: #ef4444;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary, #ffffff);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-sm {
    max-width: 360px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.25rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

.share-preview {
    margin-top: 0.75rem;
}

.share-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: var(--bg-tertiary, #f0f0f0);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.comment-text-long { max-height: 120px; overflow: hidden; position: relative; }
.comment-text-long::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 30px; background: linear-gradient(to top, var(--square-panel), transparent); }
