:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
}

/* 主体内容 */
main {
    padding: 30px 0;
}

/* 分类导航 */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--card-background);
    color: var(--text-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

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

/* 网站卡片网格 */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.website-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.website-thumbnail {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.website-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.website-card:hover .website-thumbnail img {
    transform: scale(1.05);
}

.website-info {
    padding: 20px;
}

.website-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.website-info .category {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.website-info .description {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.website-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.vote-actions {
    display: flex;
    gap: 10px;
}

.like-btn, .dislike-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--light-text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.like-btn:hover, .dislike-btn:hover {
    color: var(--primary-color);
}

.like-btn i, .dislike-btn i {
    margin-right: 5px;
}

.visit-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* 评论区域 */
.comment-section {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.comment-count {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-right: 10px;
}

.comment-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
}

.comments-container {
    margin-top: 15px;
}

.comments-list {
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.comment {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--light-text);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form input, .comment-form textarea {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.comment-form button {
    align-self: flex-end;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.comment-form button:hover {
    background-color: var(--primary-dark);
}

.no-comments {
    text-align: center;
    color: var(--light-text);
    padding: 10px;
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .websites-grid {
        grid-template-columns: 1fr;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* 无内容样式 */
.no-websites {
    text-align: center;
    padding: 50px;
    color: var(--light-text);
    grid-column: 1 / -1;
}