/**
 * AIMangaMaker.com - Project Details Styles
 * Styling for the individual manga/manhwa project view
 */

/* Main Container */
.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* Project Header with Cover Background */
.project-header {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 8px 8px;
    margin-bottom: 30px;
}

.project-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 8px 8px;
}

.project-header-content {
    width: 100%;
    padding: 30px;
    color: #fff;
}

.project-title-section {
    max-width: 800px;
}

.project-title {
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 15px;
}

.project-meta i {
    margin-right: 5px;
}

.project-rating-badge {
    margin-bottom: 20px;
}

.rating-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 5px;
}

.rating-stars.large {
    font-size: 24px;
}

.rating-stars i {
    color: #ffc107;
}

.rating-text {
    font-size: 16px;
    font-weight: 600;
}

.rating-count {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.8;
}

.project-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.genre-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.genre-tag:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.project-actions .btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
}

.project-actions i {
    margin-right: 8px;
}

/* Project Content Layout */
.project-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding: 0 20px;
}

/* Main Content Area */
.project-main {
    background: var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Tabs Navigation */
.project-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background-color: var(--gray-300);
}

.tab-button {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--light-color);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--text-color);
    background-color: var(--gray-200);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--gray-200);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* About Tab */
.project-description {
    line-height: 1.6;
}

.description-text {
    color: var(--light-color);
    white-space: pre-line;
}

/* Chapters Tab */
.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chapter-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.chapter-info {
    flex: 1;
}

.chapter-number {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.chapter-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.chapter-meta {
    font-size: 14px;
    color: var(--light-color);
}

.chapter-meta span {
    margin-right: 15px;
}

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

.chapter-actions .btn {
    white-space: nowrap;
}

/* Characters Tab */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.character-card {
    background-color: var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.character-image {
    height: 200px;
    background-color: #eee;
    position: relative;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.character-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #ddd;
    color: var(--light-color);
    font-size: 48px;
}

.character-info {
    padding: 15px;
}

.character-name {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.character-description {
    margin: 0;
    font-size: 14px;
    color: var(--light-color);
    line-height: 1.5;
    max-height: 126px; /* 6 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

/* Reviews Tab */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.reviews-summary {
    margin-bottom: 30px;
    background-color: var(--gray-300);
    border-radius: 8px;
    padding: 20px;
}

.rating-overview {
    display: flex;
    gap: 30px;
}

.average-rating {
    text-align: center;
    padding-right: 30px;
    border-right: 1px solid #ddd;
}

.big-rating {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-color);
    margin-bottom: 10px;
}

.total-ratings {
    font-size: 14px;
    color: var(--light-color);
    margin-top: 5px;
}

.rating-bars {
    flex: 1;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    width: 50px;
    text-align: right;
    margin-right: 10px;
    font-size: 14px;
    color: var(--light-color);
}

.rating-bar {
    flex: 1;
    height: 12px;
    background-color: var(--gray-300);
    border-radius: 6px;
    overflow: hidden;
    margin-right: 10px;
}

.rating-fill {
    height: 100%;
    background-color: #ffc107;
    border-radius: 6px;
}

.rating-count {
    width: 40px;
    font-size: 14px;
    color: var(--light-color);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    background-color: var(--gray-300);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

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

.reviewer-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.review-date {
    font-size: 14px;
    color: var(--light-color);
    margin-top: 5px;
}

.review-rating {
    color: #ffc107;
}

.review-rating i {
    margin-left: 2px;
}

.review-rating i.filled {
    color: #ffc107;
}

.review-comment {
    color: var(--light-color);
    line-height: 1.6;
    white-space: pre-line;
}

.reviews-footer {
    margin-top: 20px;
    text-align: center;
}

/* Sidebar */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background-color: var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.sidebar-section h3 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.creator-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.creator-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.creator-stats {
    color: var(--light-color);
    font-size: 14px;
}

.creator-stat {
    margin-bottom: 5px;
}

.creator-stat i {
    color: var(--primary-color);
    margin-right: 5px;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background-color: var(--gray-200);
    color: var(--text-color);
    border-color: #bbb;
}

.similar-projects {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.similar-project {
    display: flex;
    gap: 10px;
}

.similar-project-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.similar-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.similar-project-info {
    flex: 1;
}

.similar-project-info h4 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 500;
}

.similar-project-info h4 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.similar-project-info h4 a:hover {
    color: var(--primary-color);
}

.similar-project-stats {
    font-size: 13px;
    color: var(--light-color);
}

.similar-project-stats span {
    margin-right: 10px;
}

.similar-project-stats i {
    color: var(--primary-color);
    margin-right: 3px;
}

.similar-project-stats i.fa-star {
    color: #ffc107;
}

/* Empty States */
.no-content-message {
    text-align: center;
    padding: 50px 0;
    color: var(--light-color);
}

.no-content-message.small {
    padding: 20px 0;
}

.no-content-message i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.no-content-message p {
    font-size: 18px;
    margin: 0;
}

.no-content-message.small i {
    font-size: 24px;
    margin-bottom: 10px;
}

.no-content-message.small p {
    font-size: 14px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 50px 20px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--modal-bg);
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--light-color);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--white);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Rating Form */
.rating-select {
    margin-bottom: 20px;
}

.rating-select p {
    margin-bottom: 10px;
    font-weight: 500;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label.active {
    color: #ffc107;
}

.star-rating label:hover {
    color: #ffc107;
}

.rating-comment {
    margin-bottom: 20px;
}

.rating-comment label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.rating-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.rating-submit {
    text-align: center;
}

/* Chapter Preview */
.chapter-preview-loading {
    text-align: center;
    padding: 40px;
    color: var(--light-color);
}

.chapter-preview-loading i {
    font-size: 30px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.chapter-preview-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.preview-page {
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preview-page img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-page-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Share Modal */
.share-url {
    display: flex;
    margin-bottom: 20px;
}

.share-url input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.share-url button {
    white-space: nowrap;
    border-radius: 0 4px 4px 0;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-button {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.share-button:hover {
    opacity: 0.9;
}

.share-button i {
    margin-right: 8px;
}

.share-button.facebook {
    background-color: #3b5998;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.reddit {
    background-color: #ff4500;
}

/* Copy Success */
.copy-success {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    animation: fadeInOut 2s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .project-content {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        display: grid;
        gap: 20px;
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 20px;
    }
    
    .average-rating {
        padding-right: 0;
        padding-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .project-header {
        height: auto;
        min-height: 350px;
    }
    
    .project-title {
        font-size: 30px;
    }
    
    .project-header-content {
        padding: 20px;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .chapter-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chapter-actions {
        width: 100%;
        margin-top: 15px;
    }
    
    .chapter-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .reviews-header .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .project-title {
        font-size: 24px;
    }
    
    .characters-grid {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
    }
    
    .project-sidebar {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        padding: 10px;
        font-size: 14px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .tab-content h2 {
        font-size: 20px;
    }
}

/* Novel Chapter Styles */
.novel-chapters-list {
    margin-top: 20px;
}

.novel-chapter-item {
    background: var(--modal-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.novel-chapter-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.novel-chapter-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--gray-300);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.novel-chapter-info {
    flex: 1;
}

.novel-chapter-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.novel-chapter-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
}

.novel-chapter-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.novel-chapter-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #aaa;
}

.novel-chapter-meta i {
    color: var(--primary-color);
    font-size: 12px;
}

.novel-chapter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.novel-chapter-content {
    padding: 0;
    background: var(--modal-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-text {
    padding: 30px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    max-width: none;
}

.chapter-text h1, .chapter-text h2, .chapter-text h3, .chapter-text h4 {
    color: #2c3e50;
    margin: 30px 0 20px 0;
    font-weight: 700;
}

.chapter-text h1 {
    font-size: 28px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.chapter-text h2 {
    font-size: 24px;
}

.chapter-text h3 {
    font-size: 20px;
}

.chapter-text h4 {
    font-size: 18px;
}

.chapter-text p {
    margin: 16px 0;
    text-align: justify;
}

.chapter-text strong {
    font-weight: 700;
    color: #2c3e50;
}

.chapter-text em {
    font-style: italic;
    color: #5a6c7d;
}

.chapter-text br {
    line-height: 1.8;
}

/* Novel Chapter Responsive Design */
@media (max-width: 768px) {
    .novel-chapter-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .novel-chapter-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .novel-chapter-actions {
        justify-content: center;
    }
    
    .chapter-text {
        padding: 20px;
        font-size: 15px;
        line-height: 1.7;
    }
    
    .chapter-text h1 {
        font-size: 24px;
    }
    
    .chapter-text h2 {
        font-size: 20px;
    }
}