/* ============ RoseBlog 全局样式 ============ */

:root {
    /* 主色调 */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: #eef2ff;
    
    /* 辅助色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* 中性色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-dark: #111827;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 过渡 */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-gray);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

/* ============ 导航栏 ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: 64px;
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: 8px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航菜单 */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

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

.nav-item.active .nav-link {
    color: var(--primary);
    background: var(--primary-bg);
}

.dropdown-arrow {
    font-size: 10px;
    transition: var(--transition);
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

/* 搜索框 */
.navbar-search {
    flex: 1;
    max-width: 360px;
    position: relative;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.search-form:focus-within {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
}

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

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

/* 右侧操作 */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 发布按钮 */
.publish-btn-wrapper {
    position: relative;
}

.btn-publish {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.btn-publish:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.publish-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 8px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition-slow);
}

.publish-btn-wrapper:hover .publish-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.publish-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.publish-item:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

/* 通知按钮 */
.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

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

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* 用户菜单 */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    /*display: flex;*/
    align-items: center;
    gap: 8px;
    padding: 4px;
    padding-right: 12px;
    border-radius: 50px;
    background: var(--bg-gray);
    transition: var(--transition);
}
.user-dj {
    /*display: flex;*/
    /*align-items: center;*/
    gap: 8px;
    padding: 4px;
    padding-right: 12px;
    border-radius: 50px;
    /*background: var(--bg-gray);*/
    /*transition: var(--transition);*/
}
.user-menu-btn:hover {
    background: var(--primary-bg);
}

.user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    min-width: 240px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition-slow);
}

.user-menu-wrapper:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-name {
    font-weight: 600;
    font-size: 15px;
}

.dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

/* 登录按钮 */
.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* ============ 主要内容区 ============ */
.main-content {
    padding-top: 88px;
    padding-bottom: 40px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 24px;
}

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

.sidebar {
    width: 340px;
    flex-shrink: 0;
}

/* ============ 轮播图 ============ */
.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    aspect-ratio: 3/1;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.carousel-inner {
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.carousel-caption h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.carousel-caption p {
    font-size: 14px;
    opacity: 0.9;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    opacity: 0;
}

.carousel:hover .carousel-prev,
.carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: white;
}

/* ============ 快捷菜单 ============ */
.quick-menu {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quick-menu-item {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.quick-menu-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-menu-item img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.quick-menu-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============ 内容标签 ============ */
.content-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--primary);
    background: var(--primary-bg);
    font-weight: 600;
}

/* ============ 内容列表 ============ */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.content-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.card-user-info {
    flex: 1;
}

.card-username {
    font-size: 14px;
    font-weight: 600;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-images {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.card-images.grid-1 { grid-template-columns: 1fr; }
.card-images.grid-2 { grid-template-columns: 1fr 1fr; }
.card-images.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.card-images.grid-4 { grid-template-columns: 1fr 1fr; }

.card-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.card-video {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.card-video img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============ 侧边栏 ============ */
.sidebar-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary);
}

/* 用户卡片 */
.user-card {
    text-align: center;
    overflow: hidden;
}

.user-bg {
    height: 80px;
    margin: -20px -20px 0;
}

.user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid white;
    margin-top: -36px;
    box-shadow: var(--shadow);
}

.user-name {
    margin-top: 8px;
    font-size: 16px;
}

.vip-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.user-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-user-home {
    display: block;
    padding: 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-user-home:hover {
    background: var(--primary);
    color: white;
}

/* 圈子列表 */
.section-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.section-item:hover {
    background: var(--bg-gray);
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

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

.section-name {
    font-size: 14px;
    font-weight: 500;
}

.section-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* 公告列表 */
.notice-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.notice-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

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

/* 侧边栏页脚 */
.sidebar-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============ 加载更多 ============ */
.load-more {
    text-align: center;
    margin-top: 24px;
}

.btn-load-more {
    padding: 12px 40px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

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

/* ============ 加载状态 ============ */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading-small {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .navbar-search {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }
    
    .navbar-search {
        max-width: 150px;
    }
    
    .content-left {
        width: 100%;
    }
}