/* 
 * Main Styles for FanFiction Site
 * Custom styles for enhancing the Bootstrap framework
 */

/* Theme Support and Variables */
:root {
    --story-card-bg: #fff;
    --story-card-border: rgba(0, 0, 0, 0.125);
    --progress-bar-bg: #e9ecef;
    --progress-bar-fill: #007bff;
    --quote-bg: #f8f9fa;
    --quote-border: #dee2e6;
}

[data-bs-theme="dark"] {
    --story-card-bg: #212529;
    --story-card-border: rgba(255, 255, 255, 0.125);
    --progress-bar-bg: #343a40;
    --progress-bar-fill: #0d6efd;
    --quote-bg: #2b3035;
    --quote-border: #495057;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

.notification-dropdown {
    width: 300px;
    max-height: 350px;
    overflow-y: auto;
}

/* Header & Footer */
header {
    margin-bottom: 1rem;
}

footer {
    margin-top: auto;
    padding: 2rem 0;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Cards & Shadows */
.card {
    border-radius: 0.5rem;
    border: none;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card-header {
    border-bottom: 1px solid var(--story-card-border);
    background-color: var(--story-card-bg);
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

.card-footer {
    border-top: 1px solid var(--story-card-border);
    background-color: var(--story-card-bg);
    border-bottom-left-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
}

/* Profile Styles */
.profile-header {
    overflow: hidden;
}

.profile-cover {
    background-position: center;
    background-size: cover;
    background-color: #e9ecef;
    position: relative;
}

.profile-avatar img {
    object-fit: cover;
}

.profile-card .card-body {
    padding: 1.5rem;
}

/* Story Cards */
.story-cover-container {
    position: relative;
    overflow: hidden;
    height: 150px;
}

.story-cover {
    transition: transform 0.3s ease;
    background-position: center;
    background-size: cover;
    background-color: #e9ecef;
}

.story-description-truncate, 
.description-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

a:hover .story-cover {
    transform: scale(1.05);
}

/* Chapter Content */
.chapter-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.chapter-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

div.chapter-content blockquote {
    background-color: var(--quote-bg);
    border-left: 2px solid var(--quote-border);
    padding: 1rem;
    margin: 1rem 0;
    
}

/* Comment Section */
.comments-list .comment {
    position: relative;
}

.comment-content, 
.reply-content {
    word-break: break-word;
}

.replies {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--quote-border);
}

/* Dashboard */
.dashboard-stat {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--story-card-bg);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.dashboard-stat .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #007bff;
}

/* Notification styles */
.badge {
    padding: 0.25em 0.6em;
    font-size: 75%;
}

/* Form Styles */
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Rich Text Editor Customizations */
.tox-tinymce {
    border-radius: 0.25rem !important;
}

.tox .tox-toolbar {
    background-color: var(--quote-bg) !important;
}

/* Token Display */
.token-display {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 193, 7, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .profile-header .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .profile-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .replies {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .chapter-content {
        font-size: 1rem;
        line-height: 1.6;
    }
}
