/* 基础样式 */
* {
    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;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: #2563eb;
}

/* Main */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Features */
.features {
    margin: 3rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-item h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

/* Articles */
.recent-articles {
    margin: 3rem 0;
}

.recent-articles h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.article-image-link {
    display: block;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
}

.article-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-preview-image {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.5rem;
}

.article-card h3 {
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    color: #333;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #2563eb;
}

.article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.article-meta span {
    margin-right: 1rem;
}

.city-tag, .category-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #2563eb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.article-excerpt {
    color: #666;
    line-height: 1.6;
}

/* Article List */
.article-list h1 {
    margin-bottom: 2rem;
}

.article-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.article-item-content {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
}

.article-item-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f4f6;
}

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

.article-item:hover .article-item-image img {
    transform: scale(1.05);
}

.article-item-text {
    flex: 1;
}

.article-item h2, .article-item h3 {
    margin-bottom: 0.5rem;
}

.article-item h2 a, .article-item h3 a {
    color: #333;
    text-decoration: none;
}

.article-item h2 a:hover, .article-item h3 a:hover {
    color: #2563eb;
}

.article-description {
    color: #666;
    margin-top: 0.5rem;
}

/* Article Detail */
.article-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin: 1.5rem 0 1rem;
    color: #2563eb;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.breadcrumb {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #666;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

/* GEO Page */
.geo-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.geo-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.geo-info {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.city-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.city-card:hover {
    transform: translateY(-5px);
}

.city-card h3 a {
    color: #2563eb;
    text-decoration: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.more-link {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer a {
    color: #93c5fd;
    text-decoration: none;
}

.footer a:hover {
    color: #60a5fa;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 3rem 0;
}

.error-page h1 {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

/* Novel Styles - 小说样式 */
.novel-home {
    max-width: 1200px;
    margin: 0 auto;
}

.novel-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.novel-cover {
    flex-shrink: 0;
    width: 200px;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.novel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.novel-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2563eb;
}

.novel-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.novel-description {
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

.novel-stats {
    display: flex;
    gap: 2rem;
    font-size: 1.1rem;
    color: #2563eb;
}

.volumes-section {
    margin: 3rem 0;
}

.volumes-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.volumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.volume-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.volume-number {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.volume-card h3 {
    margin-bottom: 1rem;
}

.volume-card h3 a {
    color: #333;
    text-decoration: none;
}

.volume-card h3 a:hover {
    color: #2563eb;
}

.volume-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.volume-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-read {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-read:hover {
    background: #1d4ed8;
}

.latest-chapters {
    margin: 3rem 0;
}

.latest-chapters h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.chapters-list {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-volume {
    background: #e0e7ff;
    color: #2563eb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.chapter-item a {
    flex: 1;
    color: #333;
    text-decoration: none;
}

.chapter-item a:hover {
    color: #2563eb;
}

.chapter-date {
    color: #666;
    font-size: 0.9rem;
}

/* 卷目录页样式 */
.novel-volume {
    max-width: 1000px;
    margin: 0 auto;
}

.volume-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.volume-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2563eb;
}

.volume-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.volume-description {
    line-height: 1.8;
    color: #333;
}

.chapters-section {
    margin: 2rem 0;
}

.chapters-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.chapter-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.chapter-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.chapter-content {
    flex: 1;
}

.chapter-content h3 {
    margin-bottom: 0.5rem;
}

.chapter-content h3 a {
    color: #333;
    text-decoration: none;
}

.chapter-content h3 a:hover {
    color: #2563eb;
}

.chapter-topic {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.chapter-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.chapter-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.volume-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.btn-nav {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-nav:hover {
    background: #4b5563;
}

/* 章节阅读页样式 */
.novel-chapter {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-nav-top {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: #2563eb;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: #e0e7ff;
}

.nav-chapters {
    display: flex;
    gap: 1rem;
}

.chapter-header {
    margin-bottom: 2rem;
}

.chapter-info {
    text-align: center;
    padding: 2rem 0;
}

.volume-badge {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.chapter-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.chapter-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.chapter-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.chapter-content h2 {
    margin: 2rem 0 1rem;
    color: #2563eb;
}

.chapter-content h3 {
    margin: 1.5rem 0 1rem;
    color: #2563eb;
}

.chapter-content p {
    margin-bottom: 1rem;
}

.chapter-nav-bottom {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
}

.chapter-nav-bottom .nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
}

.btn-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-nav:hover {
    background: #1d4ed8;
}

.btn-prev {
    justify-content: flex-start;
}

.btn-next {
    justify-content: flex-end;
}

.btn-index {
    justify-content: center;
}

.nav-arrow {
    font-size: 1.2rem;
}

.nav-info {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-title {
    font-weight: bold;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Auth Pages - 登录注册页面样式 */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
}

.auth-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
}

.code-input-group {
    display: flex;
    gap: 0.5rem;
}

.code-input-group input {
    flex: 1;
}

.code-input-group .btn-secondary {
    flex-shrink: 0;
    white-space: nowrap;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: #2563eb;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Profile Page - 用户中心样式 */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.profile-info {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    width: 120px;
    font-weight: 500;
    color: #666;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: #333;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-edit {
    padding: 0.4rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: #1d4ed8;
}

.avatar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.profile-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.user-link {
    color: #2563eb !important;
    font-weight: 500;
}

/* Modal - 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .article-item-content {
        flex-direction: column;
    }

    .article-item-image {
        width: 100%;
        height: 200px;
    }

    .article-preview-image {
        height: 180px;
    }

    .novel-header {
        flex-direction: column;
    }

    .novel-cover {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .volumes-grid {
        grid-template-columns: 1fr;
    }

    .chapter-card {
        flex-direction: column;
    }

    .chapter-number {
        width: 50px;
        height: 50px;
    }

    .chapter-nav-bottom .nav-container {
        grid-template-columns: 1fr;
    }

    .nav-title {
        max-width: 150px;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .code-input-group {
        flex-direction: column;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .info-label {
        width: 100%;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }
}

