* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8em;
}

header nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

.hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2em;
    opacity: 0.9;
}

.categories {
    padding: 60px 0;
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.category-content {
    padding: 30px;
}

.category-content h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #667eea;
}

.category-content p {
    margin-bottom: 20px;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #764ba2;
}

.recent-chapters {
    padding: 60px 0;
    background: white;
}

.recent-chapters h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.chapter-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.chapter-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chapter-item h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.chapter-meta {
    color: #999;
    font-size: 0.9em;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.auth-page {
    padding: 60px 0;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form button:hover {
    background: #764ba2;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
}

.chapter-detail {
    padding: 40px 0;
}

.chapter-header {
    margin-bottom: 30px;
}

.chapter-header h2 {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 15px;
}

.chapter-body {
    background: white;
    padding: 30px;
    border-radius: 8px;
    line-height: 1.8;
}

.comments-section {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: #667eea;
}

#commentText {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: #667eea;
}

.comment-time {
    color: #999;
    font-size: 0.9em;
}

.comment-content {
    color: #666;
}

@media (min-width: 768px) {
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    header nav {
        margin-top: 0;
    }
    
    .categories .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}