/* Novel Page Specific Styles */

.novel-container {
    max-width: 1100px;
    padding: 25px;
    background-color: #1f1f1f;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Novel Header and Content */
.post-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #ffcc00;
}

.post-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.post-left {
    flex: 1;
    min-width: 280px;
}

.post-featured-image {
    margin-bottom: 25px;
}

.post-featured-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.post-tags h3 {
    color: #ffcc00;
    margin-bottom: 15px;
}

.post-tags ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}

.post-tags ul li {
    background-color: #333333;
    color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background-color 0.2s;
}

.post-tags ul li:hover {
    transform: translateY(-2px);
    background-color: #444444;
}

.post-tags ul li a {
    color: #e0e0e0;
    text-decoration: none;
}

.post-tags ul li a:hover {
    color: #ffcc00;
}

.post-right {
    flex: 2;
    min-width: 280px;
}

.post-meta {
    margin-bottom: 25px;
    font-size: 0.95em;
    color: #cccccc;
}

.post-meta p {
    margin-bottom: 8px;
}

.post-meta .category a,
.post-meta .date {
    color: #ffcc00;
}

.post-content {
    position: relative;
}

.description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #e0e0e0;
    overflow: hidden;
}

/* Override general paragraph styling for description paragraphs */
.description p {
    margin-bottom: 15px;
    font-size: 1em; /* More controlled size */
    font-weight: 400;
    color: #e0e0e0;
}

.chapters-container {
    margin-top: 30px;
    clear: both;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #333333;
    padding-bottom: 10px;
}

.chapters-container h2 {
    font-size: 24px;
    color: #ffcc00;
    margin: 0;
}

.chapters-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #333333;
    border-radius: 4px;
    background-color: #1f1f1f;
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #333333;
    padding: 15px; /* Margem interna aumentada */
}

.chapters-list::-webkit-scrollbar {
    width: 8px;
}

.chapters-list::-webkit-scrollbar-track {
    background: #333333;
    border-radius: 4px;
}

.chapters-list::-webkit-scrollbar-thumb {
    background-color: #ffcc00;
    border-radius: 4px;
    border: 2px solid #333333;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px; /* Espaçamento entre os cards aumentado */
    width: 100%;
}

.chapter-card {
    background-color: #252525;
    border-radius: 4px;
    border: 1px solid #333333;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 5px; /* Margem inferior adicional */
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-color: #ffcc00;
}

.chapter-card a {
    display: flex;
    flex-direction: column;
    padding: 12px;
    color: #e0e0e0;
    text-decoration: none;
    height: 100%;
}

.chapter-number {
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.chapter-title {
    color: #e0e0e0;
    font-size: 0.95em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.error {
    color: #e74c3c;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

.chapters-controls {
    display: flex;
}

.toggle-order-btn {
    background-color: #252525;
    color: #e0e0e0;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.toggle-order-btn:hover {
    background-color: #333333;
    border-color: #ffcc00;
    color: #ffcc00;
}

.toggle-order-btn .icon {
    font-size: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .chapters-list {
        padding: 12px; /* Menos padding em telas menores, mas ainda suficiente */
        margin-right: 5px; /* Margem adicional para scroll */
    }
    
    .chapters-header {
        flex-direction: row;
        align-items: center;
    }
    
    .chapters-container h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .chapters-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .chapter-card a {
        padding: 10px;
    }
    
    .chapters-list {
        padding: 10px; /* Padding reduzido mas ainda confortável para mobile */
        margin-right: 8px; /* Margem adicional para facilitar o scroll */
    }
    
    .chapters-header {
        flex-direction: row;
        align-items: center;
    }
    
    .chapters-container h2 {
        font-size: 18px;
    }
    
    .toggle-order-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .toggle-order-btn .icon {
        font-size: 18px;
    }
}
/* See More Button */
.see-more {
    display: none;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #ffcc00;
    color: #1f1f1f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s, transform 0.2s;
}

.see-more:hover {
    background-color: #e6b800;
    transform: translateY(-2px);
}

/* Chapters Section */
.chapters-container {
    margin-top: 30px;
    clear: both;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #333333;
    padding-bottom: 10px;
}

.chapters-container h2 {
    font-size: 24px;
    color: #ffcc00;
    margin: 0;
}

.chapters-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #333333;
    border-radius: 4px;
    background-color: #1f1f1f;
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #333333;
    padding: 15px;
}

.chapters-list::-webkit-scrollbar {
    width: 8px;
}

.chapters-list::-webkit-scrollbar-track {
    background: #333333;
    border-radius: 4px;
}

.chapters-list::-webkit-scrollbar-thumb {
    background-color: #ffcc00;
    border-radius: 4px;
    border: 2px solid #333333;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    width: 100%;
}

.chapter-card {
    background-color: #252525;
    border-radius: 4px;
    border: 1px solid #333333;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 5px;
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-color: #ffcc00;
}

.chapter-card a {
    display: flex;
    flex-direction: column;
    padding: 12px;
    color: #e0e0e0;
    text-decoration: none;
    height: 100%;
}

.chapter-number {
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.chapter-title {
    color: #e0e0e0;
    font-size: 0.95em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.error {
    color: #e74c3c;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

.chapters-controls {
    display: flex;
}

.toggle-order-btn {
    background-color: #252525;
    color: #e0e0e0;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.toggle-order-btn:hover {
    background-color: #333333;
    border-color: #ffcc00;
    color: #ffcc00;
}

.toggle-order-btn .icon {
    font-size: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .novel-container {
        margin-top: 80px;
        padding: 15px;
    }
    
    .post-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .post-left, 
    .post-right {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .post-featured-image {
        max-width: 280px;
        margin: 0 auto 20px;
    }
    
    .chapters-table th, 
    .chapters-table td {
        padding: 10px;
    }
    
    .chapters-table td:first-child {
        width: 20%;
    }

    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .chapters-list {
        padding: 12px;
        margin-right: 5px;
    }
    
    .chapters-header {
        flex-direction: row;
        align-items: center;
    }
    
    .chapters-container h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .chapters-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .chapter-card a {
        padding: 10px;
    }
    
    .chapters-list {
        padding: 10px;
        margin-right: 8px;
    }
    
    .chapters-header {
        flex-direction: row;
        align-items: center;
    }
    
    .chapters-container h2 {
        font-size: 18px;
    }
    
    .toggle-order-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .toggle-order-btn .icon {
        font-size: 18px;
    }
}
