/* 文件路径：src/main/resources/static/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background-color: #1a1a1a;
    color: #fff;
    padding: 15px 0;
    border-bottom: 2px solid #333;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin: 0 15px;
}

.nav ul li a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #fff;
    background-color: #333;
}

.user-menu {
    color: #ccc;
}

.user-menu a {
    color: #ccc;
    text-decoration: none;
    margin: 0 5px;
}

.user-menu a:hover {
    color: #fff;
}

.welcome {
    margin-right: 10px;
}

/* 主要内容区域 */
.main {
    min-height: 600px;
    padding: 30px 0;
}

/* 页脚 */
.footer {
    background-color: #1a1a1a;
    color: #666;
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid #333;
}

/* 漫画网格布局 */
.comic-grid,
.comic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.comic-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.comic-item:hover {
    transform: translateY(-5px);
}

.comic-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.comic-cover {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.comic-cover img {
    width: 100%;
    height: 325px;
    object-fit: cover;
    transition: transform 0.3s;
}

.comic-item:hover .comic-cover img {
    transform: scale(1.05);
}

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.comic-info {
    padding: 10px;
    background-color: #2a2a2a;
    color: #ddd;
}

.comic-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
}

.comic-author,
.comic-category,
.comic-hits,
.comic-update {
    font-size: 12px;
    color: #999;
    margin: 3px 0;
}

/* 分类页面 */
.category-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    padding: 6px 12px;
    background-color: #333;
    color: #ccc;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.category-item:hover,
.category-item.active {
    background-color: #e74c3c;
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-prev,
.page-next,
.page-number {
    padding: 8px 15px;
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-number.active {
    background-color: #e74c3c;
    color: white;
}

.page-prev:hover,
.page-next:hover,
.page-number:hover:not(.active) {
    background-color: #444;
}

/* 漫画详情 */
.comic-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.comic-info h1 {
    font-size: 28px;
    color: #fff;
    margin-bottom: 20px;
}

.comic-meta {
    margin-bottom: 20px;
}

.comic-meta p {
    margin: 8px 0;
    color: #ccc;
}

.comic-meta .label {
    color: #999;
    display: inline-block;
    width: 80px;
}

.comic-content h3 {
    color: #fff;
    margin-bottom: 10px;
}

.comic-content p {
    color: #ccc;
    line-height: 1.8;
}

/* 分集列表 */
.episode-list {
    margin-top: 30px;
}

.section-title {
    font-size: 20px;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.episode-item {
    margin-bottom: 10px;
}

.episode-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #2a2a2a;
    color: #ccc;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.episode-item a:hover {
    background-color: #333;
}

.ep-num {
    width: 80px;
    color: #e74c3c;
}

.ep-name {
    flex: 1;
}

.ep-update {
    width: 100px;
    text-align: right;
    color: #999;
}

.coin-type {
    margin-left: 15px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.coin-type.vip {
    background-color: #ffd700;
    color: #333;
}

.coin-type.free {
    background-color: #27ae60;
    color: white;
}

/* 漫画阅读器 */
.episode-header {
    margin-bottom: 20px;
}

.episode-header h1 {
    color: #fff;
    margin-bottom: 15px;
}

.btn-back {
    display: inline-block;
    padding: 8px 15px;
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-back:hover {
    background-color: #444;
}

.comic-reader {
    margin-bottom: 20px;
}

.comic-page {
    margin-bottom: 20px;
    text-align: center;
}

.comic-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-number {
    color: #999;
    margin-top: 10px;
}

.reader-tools {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    padding: 10px 20px;
    background-color: #333;
    color: #ccc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #444;
}

/* 表单样式 */
.login-form,
.register-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background-color: #2a2a2a;
    border-radius: 8px;
}

.form-title {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #ccc;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #e74c3c;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-submit:hover {
    background-color: #c0392b;
}

.form-links {
    text-align: center;
    margin-top: 15px;
}

.form-links a {
    color: #e74c3c;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #c0392b;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success-message {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-group input {
    margin-right: 5px;
}

/* 更新列表 */
.update-list {
    list-style: none;
}

.update-list li {
    padding: 10px 0;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
}

.update-list li a {
    color: #ccc;
    text-decoration: none;
}

.update-list li a:hover {
    color: #e74c3c;
}

.update-time {
    color: #999;
}


/* 轮播图样式 */
.carousel-section {
    margin-bottom: 40px;
}

.comic-carousel {
    position: relative;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: #fff;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
}

.carousel-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-author,
.carousel-category {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 10px;
}

.carousel-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.carousel-hits,
.carousel-time {
    font-size: 14px;
    color: #ffd93d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.carousel-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.carousel-tag {
    background: rgba(255, 107, 107, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.carousel-indicator.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: #fff;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.carousel-control:hover {
    background: rgba(255, 107, 107, 0.8);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comic-carousel {
        height: 300px;
    }
    
    .carousel-content {
        padding: 20px;
    }
    
    .carousel-title {
        font-size: 24px;
    }
    
    .carousel-desc {
        display: none; /* 移动端隐藏描述 */
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .comic-carousel {
        height: 250px;
    }
    
    .carousel-title {
        font-size: 20px;
    }
    
    .carousel-author,
    .carousel-category {
        font-size: 14px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}



/* 轮播图响应式调整 */
@media (max-width: 1200px) {
    .carousel-content {
        max-width: 500px;
    }
    
    .carousel-title {
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .carousel-content {
        max-width: 400px;
        padding: 30px;
    }
    
    .carousel-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .comic-carousel {
        height: 350px;
    }
    
    .carousel-content {
        padding: 20px;
    }
    
    .carousel-title {
        font-size: 24px;
    }
    
    .carousel-author,
    .carousel-category,
    .carousel-desc {
        font-size: 14px;
    }
}

/* 轮播图动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.carousel-slide {
    animation: fadeIn 0.5s ease;
}

/* 轮播图指示器动画 */
.carousel-indicator {
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    transform: scale(1.2);
}

.carousel-indicator.active {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}