/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 400;
    color: #333;
}

.logo-icon {
    width: 65px;
    height: 40px;
    background-image: url('logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-item:hover {
    color: #333;
    background-color: #f5f5f5;
}

.nav-item.active {
    color: #ff6b6b;
    background-color: #fff5f5;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

.login-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-1px);
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 20px;
}

/* 左侧边栏 */
.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #ff6b6b;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
}

.category-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    font-size: 14px;
}

.category-item:hover {
    background-color: #f5f5f5;
    color: #333;
}

.category-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.footer-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.footer-links a {
    display: block;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #666;
}

/* 主内容区域 */
.main-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.publish-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.publish-btn:hover {
    transform: translateY(-1px);
}

/* 文章列表 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    display: flex;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

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

.article-thumbnail {
    width: 120px;
    height: 90px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.article-thumbnail::before {
    content: "原创保护中";
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.article-thumbnail .sport-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.article-thumbnail .sport-text {
    font-size: 12px;
    text-align: center;
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-price {
    background: #ff4757;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 12px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.author-name {
    font-size: 14px;
    color: #666;
}

.verified-badge {
    background: #ffd93d;
    color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.article-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.comments-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
}

.comments-icon {
    color: #ffd93d;
}

.article-badge {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e1e5e9;
}

.article-detail-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.article-detail-price {
    background: #ff4757;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
}

.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-detail-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #333;
}

.article-detail-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 12px 0;
    color: #333;
}

.article-detail-content p {
    margin-bottom: 15px;
}

.article-detail-content ul, .article-detail-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-detail-content li {
    margin-bottom: 8px;
}

.pay-wall {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
}

.pay-wall h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.pay-wall p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.pay-btn {
    background: #ffd93d;
    color: #333;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.pay-btn:hover {
    transform: translateY(-2px);
}

/* 发布文章页面样式 */
.publish-form {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #ff6b6b;
}

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

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

.submit-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
