/* 紫粉色主题变量（参考 brothel.css） */
:root {
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --accent-color: #c084fc;
    --text-color: #ffffff;
    --text-secondary: #e2e8f0;
    --background-color: #0f0f23;
    --surface-color: rgba(15, 15, 35, 0.95);
    --card-bg-color: rgba(30, 30, 60, 0.9);
    --glass-bg: rgba(15, 15, 35, 0.7);
    --neon-purple: #8b5cf6;
    --neon-pink: #ec4899;
    --neon-blue: #06b6d4;
    --gradient-sexy: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-hot: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #8b5cf6 100%);
    --gradient-passion: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --border-radius: 16px;
    --transition-normal: 0.3s;
    --shadow-sm: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
    --shadow-neon: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color) !important;
    color: var(--text-color) !important;
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: -0.025em;
}

/* 动态背景容器 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0f0f23 70%) !important;
}

.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    will-change: transform;
}

.shape1 {
    width: 600px;
    height: 600px;
    background: conic-gradient(from 0deg, #8b5cf6, #ec4899, #06b6d4, #a855f7, #8b5cf6);
    top: -200px;
    left: -200px;
    animation: elegantFloat 25s ease-in-out infinite;
}

.shape2 {
    width: 700px;
    height: 400px;
    background: linear-gradient(45deg, #a855f7, #ec4899, #06b6d4);
    bottom: -150px;
    right: -250px;
    border-radius: 60% 40% 60% 40%;
    animation: elegantFloat 30s ease-in-out infinite reverse;
}

.shape3 {
    width: 500px;
    height: 600px;
    background: radial-gradient(ellipse, #ec4899, #8b5cf6, #6366f1);
    top: 30%;
    left: 70%;
    border-radius: 70% 30% 70% 30%;
    animation: elegantFloat 22s ease-in-out infinite 3s;
}

.shape4 {
    width: 350px;
    height: 350px;
    background: conic-gradient(from 45deg, transparent, #8b5cf6, transparent);
    top: 60%;
    left: 20%;
    animation: elegantRotate 20s linear infinite;
}

.shape5 {
    width: 450px;
    height: 250px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    top: 10%;
    right: 30%;
    border-radius: 50%;
    animation: elegantPulse 18s ease-in-out infinite;
}

/* 动画定义 */
@keyframes elegantFloat {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 50%; }
    25% { transform: translate(60px, -40px) scale(1.1) rotate(90deg); border-radius: 60% 40% 70% 30%; }
    50% { transform: translate(-30px, 60px) scale(0.9) rotate(180deg); border-radius: 30% 70% 40% 60%; }
    75% { transform: translate(40px, 30px) scale(1.05) rotate(270deg); border-radius: 70% 30% 60% 40%; }
}

@keyframes elegantRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes elegantPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* 主要容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* 头部 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 15px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color) !important;
}

.header-left h1 a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    transition: all var(--transition-normal);
}

.header-left h1 a:hover {
    color: var(--neon-purple) !important;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 通用按钮样式 */
.action-button {
    background: var(--gradient-hot) !important;
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    color: var(--text-color) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

.action-button::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.6s;
}

.action-button:hover::before {
    left: 100%;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

.action-button:disabled {
    background: rgba(15, 15, 35, 0.4) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed;
}

/* 标签导航 */
.tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 15px;
    justify-content: space-between;
    align-items: center;
}

.tab-link {
    padding: 6px 10px;
    background: var(--glass-bg) !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    white-space: nowrap;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.tab-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hot);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.tab-link:hover::before {
    opacity: 0.15;
}

.tab-link:hover {
    color: var(--neon-purple) !important;
    transform: translateY(-2px);
}

.tabs .count {
    background: var(--gradient-hot) !important;
    color: var(--text-color) !important;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

/* 搜索栏 */
.search-bar.desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.search-bar.desktop input[type="text"] {
    padding: 8px 12px;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--text-color) !important;
    background: var(--glass-bg) !important;
    outline: none;
    transition: all var(--transition-normal);
    width: 200px;
}

.search-bar.desktop input[type="text"]:focus {
    border-color: var(--neon-purple) !important;
    box-shadow: var(--shadow-sm);
    width: 250px;
}

.search-bar.mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.search-bar.mobile input[type="text"] {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 15px;
    right: 15px;
    padding: 10px 40px;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color) !important;
    background: var(--glass-bg) !important;
    box-shadow: var(--shadow-sm);
    z-index: 1001;
}

.search-bar.mobile input[type="text"]:focus {
    border-color: var(--neon-purple) !important;
}

.search-bar.mobile.active input[type="text"] {
    display: block;
}

/* 排序栏 */
.sort-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.sort-toggle {
    display: flex;
    gap: 10px;
}

.sort-toggle label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary) !important;
}

.sort-toggle input[type="checkbox"] {
    accent-color: var(--neon-purple) !important;
}

/* 帖子列表 */
.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.recommendation-item {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--glass-bg) !important;
    border-radius: var(--border-radius);
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    transition: all var(--transition-normal);
}

.recommendation-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-neon);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recommendation-content {
    flex: 1;
    min-width: 0;
}

.title {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 12px;
    align-items: baseline;
    flex-wrap: nowrap;
}

.title a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color) !important;
    text-decoration: none !important;
    flex: 1;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.title a:hover {
    color: var(--neon-purple) !important;
}

.title .tag {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color) !important;
    white-space: nowrap;
}

.title .tag.label-4 { background: var(--gradient-hot) !important; }
.title .tag.label-3 { background: #457b9d; }
.title .tag.label-2 { background: #f4a261; }
.title .tag.label-1 { background: #2a9d8f; }
.title .tag.label-0 { background: #6c757d; }

.meta {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary) !important;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.meta .label {
    color: var(--neon-pink) !important;
    white-space: nowrap;
}

.meta .content {
    color: var(--text-secondary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta .content.highlight {
    color: var(--neon-purple) !important;
}

.meta .content.category i {
    color: var(--text-secondary) !important;
    font-size: 14px;
}

.stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary) !important;
}

.stats .highlight {
    color: var(--neon-purple) !important;
}

.no-results {
    text-align: center;
    color: var(--text-color) !important;
    padding: 20px;
    font-size: 16px;
    background: var(--glass-bg) !important;
    border-radius: var(--border-radius);
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
    margin-bottom: 20px;
}

.pagination .page-info {
    font-size: 14px;
    color: var(--text-color) !important;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-left h1 {
        font-size: 20px;
    }

    .header-right {
        gap: 8px;
    }

    .action-button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 2px;
        justify-content: flex-start;
        margin-bottom: 16px;
    }

    .tab-link {
        padding: 4px 8px;
        font-size: 12px;
    }

    .search-bar.desktop {
        display: none;
    }

    .search-bar.mobile {
        display: block;
    }

    .sort-toggle label {
        font-size: 13px;
    }

    .recommendation-item {
        flex-direction: row;
        gap: 12px;
        padding: 16px;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .recommendation-content {
        flex: 1;
    }

    .title a {
        font-size: 14px;
    }

    .meta {
        font-size: 12px;
        gap: 12px;
    }

    .stats {
        font-size: 12px;
        gap: 12px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination button, .pagination .page-info {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 60px;
    }
}


#floating-logo {
    position: absolute;
    top: 20px;
    left: 260px; /* ✅ 默认：桌面端正常位置 */
    z-index: 9999;
    transition: all 0.3s ease;
}

#floating-logo img {
    width: 250px;
    height: auto;
    transition: all 0.3s ease;
}

/* ✅ 向下滚动时缩小 logo + 下移 */
#floating-logo.shrinked {
    top: 120px;
}

#floating-logo.shrinked img {
    width: 100px;
}

/* ✅ 移动端重新设定位置 */
@media (max-width: 768px) {
    #floating-logo {
        left: 100px;  /* 手机上贴边显示，不会挤出屏幕 */
        top: 30px;
    }

    #floating-logo img {
        width: 200px;  /* 适配手机尺寸 */
    }

    #floating-logo.shrinked {
        top: 90px;     /* 缩小时也往下移一些 */
    }

    #floating-logo.shrinked img {
        width: 80px;
    }
}
