/* Story Page Specific Styles */

.logo a {
    color: white;
    text-decoration: none;
}

.story-header {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.story-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.story-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.story-breadcrumb a:hover {
    color: #764ba2;
}

.story-breadcrumb span {
    color: #999;
}

.current-story {
    color: #333;
    font-weight: 500;
}

.story-main {
    padding: 2rem 0;
}

.story-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Story Sidebar */
.story-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.story-info-card,
.chapter-list-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.story-cover {
    text-align: center;
    margin-bottom: 1.5rem;
}

.story-cover img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.story-rating {
    margin-top: 1rem;
}

.stars {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.story-rating span {
    font-size: 0.9rem;
    color: #666;
}

.story-details h1 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.story-meta p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.story-meta strong {
    color: #333;
    width: 80px;
    display: inline-block;
}

.story-meta a {
    color: #667eea;
    text-decoration: none;
}

.story-meta a:hover {
    text-decoration: underline;
}

.status {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.completed {
    background: #d4edda;
    color: #155724;
}

.status.ongoing {
    background: #d1ecf1;
    color: #0c5460;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #4ecdc4;
    color: white;
}

.btn-secondary:hover {
    background: #38b2ac;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Chapter List */
.chapter-list-card h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chapter-search {
    margin-bottom: 1rem;
}

.chapter-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

.chapter-search input:focus {
    border-color: #667eea;
}

.chapter-list {
    max-height: 400px;
    overflow-y: auto;
}

.chapter-item {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 5px;
    margin-bottom: 0.3rem;
}

.chapter-item:hover {
    background: #f8f9fa;
}

.chapter-item.active {
    background: #667eea;
    color: white;
}

.chapter-title {
    display: block;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.chapter-date {
    font-size: 0.8rem;
    color: #999;
}

.chapter-item.active .chapter-date {
    color: rgba(255,255,255,0.8);
}

/* Story Content */
.story-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reading-settings {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.settings-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group label {
    font-weight: 500;
    color: #333;
}

.btn-setting {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-setting:hover,
.btn-setting.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.bg-white { background: white !important; }
.bg-sepia { background: #f4f3e8 !important; }
.bg-dark { background: #2c3e50 !important; }

.settings-group select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    outline: none;
}

.chapter-navigation {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.chapter-info h2 {
    color: #333;
    font-size: 1.3rem;
    text-align: center;
}

.chapter-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chapter-text {
    padding: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.chapter-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    text-indent: 2rem;
}

.chapter-text strong {
    color: #667eea;
    font-weight: 600;
}

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

/* Comments Section */
.comments-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comments-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    outline: none;
    margin-bottom: 1rem;
}

.comment-form textarea:focus {
    border-color: #667eea;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 500;
    color: #333;
}

.comment-time {
    font-size: 0.8rem;
    color: #999;
}

.comment-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.comment-actions button:hover {
    background: #f8f9fa;
}

/* Reading Themes */
.reading-theme-white {
    background: white;
    color: #333;
}

.reading-theme-sepia {
    background: #f4f3e8;
    color: #5c4f2f;
}

.reading-theme-dark {
    background: #2c3e50;
    color: #ecf0f1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .story-layout {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .story-layout {
        grid-template-columns: 1fr;
    }
    
    .story-sidebar {
        order: 2;
    }
    
    .story-content {
        order: 1;
    }
    
    .reading-settings {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .settings-group {
        justify-content: space-between;
    }
    
    .chapter-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .chapter-text {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .story-main {
        padding: 1rem 0;
    }
    
    .chapter-text {
        padding: 1rem;
    }
    
    .chapter-text p {
        text-indent: 1rem;
    }
}