/* 全局样式 */
:root {
    --primary-color: #1890ff;
    --secondary-color: #52c41a;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e8e8e8;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    height: 70px;
}

.nav-brand {
    margin-right: 40px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.logo {
    width: 150px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}
.default-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}
.default-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}
.brand-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    margin-right: 40px;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: transform 0.3s;
}

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

.nav-menu {
    display: flex;
    gap: 30px;
    margin-right: 40px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

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

.nav-item:hover {
    color: var(--primary-color);
}

.nav-user {
    position: relative;
    cursor: pointer;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.user-avatar:hover {
    border-color: #667eea;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
}

.user-avatar:hover img {
    border-color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    min-width: 180px;
    display: none;
    z-index: 1001;
}

.nav-user:hover .user-dropdown {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: var(--bg-color);
}
.dropdown-item.active {
    background: #f0f0f0;
    color: #667eea;
}
.dropdown-item:last-child {
    border-bottom: none;
}

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

/* 轮播图 */
.carousel {
    margin: 30px 0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.carousel-item {
    position: relative;
    height: 300px;
}

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

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

.carousel-caption h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

/* 内容区块 */
.section {
    margin: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-more {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.section-more:hover {
    color: #764ba2;
}
/* 星球网格 */
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.planet-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.planet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.planet-cover {
    height: 160px;
    overflow: hidden;
}

.planet-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.planet-card:hover .planet-cover img {
    transform: scale(1.05);
}

.price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6b;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
}

.price-tag.free {
    color: #28a745;
}

.planet-info {
    padding: 20px;
}
.planet-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planet-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.planet-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planet-price {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 16px;
}

.planet-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.planet-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 12px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 13px;
}
.planet-creator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* 创作者网格 */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.creator-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.creator-card:hover {
    transform: translateY(-3px);
}

.creator-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-color);
    padding: 2px;
}

.creator-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.creator-bio {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.creator-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-light);
    font-size: 12px;
}

/* 帖子列表 */
.posts-feed {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.post-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

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

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.post-author {
    font-weight: bold;
}

.post-planet {
    color: var(--primary-color);
    font-size: 12px;
    background-color: rgba(24, 144, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}
.planet-creator span {
    font-size: 14px;
    color: #666;
}

.planet-actions {
    display: flex;
    gap: 10px;
}
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-block {
    display: block;
    width: 100%;
}


.post-time {
    color: var(--text-light);
    font-size: 12px;
    margin-left: auto;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.post-content {
    color: var(--text-color);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 14px;
}

.post-footer span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 页脚 */
.footer {
    background-color: var(--card-bg);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    font-size: 20px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    color: #333;
}
.modal-body {
    padding: 30px 20px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-wechat {
    background-color: #07C160;
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-wechat:hover {
    background-color: #06ad56;
}

.login-divider {
    text-align: center;
    position: relative;
}
/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.login-divider span {
    background-color: var(--card-bg);
    padding: 0 10px;
    color: var(--text-light);
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #1475d9;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 16px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar .container {
        padding: 10px 15px;
        height: auto;
        flex-wrap: wrap;
    }
    
    .nav-brand {
        margin-right: 20px;
    }
    
    .nav-search {
        order: 3;
        flex: 1 0 100%;
        margin: 15px 0 0;
        max-width: 100%;
    }
    
    .nav-menu {
        margin-right: 20px;
        gap: 20px;
    }
    
    .planets-grid,
    .creators-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .carousel-caption h2 {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .planets-grid,
    .creators-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-text {
        font-size: 20px;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 24px;
        margin-bottom: 0;
    }
}
