/* Story Page Styles - Non-critical CSS */

/* Prevent text selection/caret on tap (mobile) — allow only in inputs */
.story-info,
.story-stats-bar,
.story-action-bar,
.story-description .section-title,
.chapter-header,
.chapter-item,
.related-section,
.comments-filters,
.comment-header,
.comment-actions,
.comments-empty,
.login-prompt,
.fab-menu,
.stat-item,
.breadcrumb,
.comment-username,
.comment-hint,
.comment-user-info,
.comment-author,
.comment-time,
.comment-form-hint,
.rating-modal-header,
.rating-input-title,
.rating-review-avatar,
.rating-review-stars,
.rating-review-time,
.story-status,
.story-tags,
.section-title,
.tab-btn,
.tab-count,
.toc-popup-btn,
.chapter-number,
.chapter-date,
.chapter-views,
.related-list-icon,
.story-tag,
.comments-modal-close,
.rating-modal-close,
.filter-btn,
.desc-toggle-btn,
.login-prompt-icon,
.login-prompt-text,
.fab-main,
.fab-action-btn,
.fab-label,
.rating-reviews-empty,
.rating-load-more,
.sort-btn,
.comment-action-btn,
.comment-owner-actions,
.stat-label,
.stat-value,
.stat-stars {
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

/* Breadcrumb - outside container, self-centering like production */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    background: transparent;
    border-bottom: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-muted);
    margin: 0 8px;
}

/* Action Bar - Shown on both desktop and mobile */
.story-action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.story-action-bar .btn-favorite {
    padding: 12px 28px;
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger, #f87171);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-action-bar .btn-favorite:hover {
    background: rgba(248, 113, 113, 0.25);
}

.story-action-bar .btn-favorite.active {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    color: #fff;
    border-color: transparent;
}

.story-action-bar .btn-read {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.story-action-bar .btn-read:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

/* Desktop: buttons share width evenly */
@media (min-width: 769px) {
    .story-action-bar .btn-favorite,
    .story-action-bar .btn-read {
        flex: 1;
    }
}

/* Description toggle button - Hidden on desktop */
.desc-toggle-btn {
    display: none;
}

/* Story Info Section */
.story-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    min-height: 320px;
}

.story-cover {
    width: 200px;
    height: 280px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    border: 1px solid var(--border);
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.story-details {
    display: flex;
    flex-direction: column;
}

/* Hide mobile-only author line on desktop (shown via story-meta instead) */
.story-details > .story-author {
    display: none;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text);
}

.author-link {
    color: var(--accent);
    font-weight: 600;
    transition: color 0.2s;
}

.author-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.meta-item .icon {
    font-size: 16px;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    text-decoration: none;
}

.story-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    width: fit-content;
}

.story-status.ongoing {
    background: rgba(74, 158, 255, 0.15);
    color: var(--accent);
}

.story-status.completed {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.story-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    text-decoration: none;
}

.btn-favorite {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    transition: all 0.2s ease;
}

.btn-favorite.active {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.btn-favorite:active:not(:disabled) {
    transform: scale(0.95);
}

/* Story Description */
.story-description {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 20px;
}

.description-content {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.description-content.hidden {
    display: none;
}

.story-description .section-title {
    cursor: pointer;
    transition: color 0.2s;
}

.story-description .section-title:hover {
    color: var(--primary);
}

.story-description .section-title .toggle-icon {
    font-size: 14px;
    transition: transform 0.3s;
}

.story-description.open .section-title .toggle-icon {
    transform: rotate(90deg);
}

/* Chapter List */
.chapter-section {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
}

.chapter-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.chapter-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.chapter-count strong {
    color: var(--primary);
}

.chapter-search {
    display: flex;
    gap: 8px;
}

.chapter-search input {
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    width: 200px;
}

.chapter-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.sort-btn {
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chapter-list {
    max-height: 600px;
    overflow-y: auto;
    min-height: 200px;
}

.chapter-list::-webkit-scrollbar {
    width: 6px;
}

.chapter-list::-webkit-scrollbar-track {
    background: var(--bg);
}

.chapter-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.chapter-item:hover {
    background: var(--bg-secondary);
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-number {
    width: 50px;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chapter-title {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.chapter-title a {
    color: var(--text);
}

.chapter-title a:hover {
    color: var(--primary);
}

.chapter-views {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.chapter-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 16px;
    white-space: nowrap;
}

.chapter-item.read .chapter-title a {
    color: var(--text-muted);
}

/* New chapters highlight */

/* Rating in story hero - hidden on desktop (shown in stats bar instead) */
.story-details .rating-section {
    display: none;
}

/* Rating */
.rating-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.star.active {
    color: #fbbf24;
}

.rating-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.rating-text strong {
    color: var(--primary);
    font-size: 18px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, 100%); opacity: 0; }
}

/* Stats Bar - Desktop */
.story-stats-bar {
    display: flex;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px 0;
    margin-bottom: 24px;
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
    padding: 0 16px;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-stars {
    font-size: 16px;
    color: #ffc107;
    letter-spacing: 2px;
    display: block;
    margin-top: 2px;
}

/* Rating form - modal overlay (both mobile and desktop) */
.rating-form-container.hidden {
    display: none;
}
.rating-form-container:not(.hidden) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}
.rating-form-container.modal-closing {
    animation: fadeOut 0.25s ease forwards;
}
.rating-form-container.modal-closing .rating-modal-card {
    animation: modalSlideDown 0.25s ease forwards;
}
.rating-modal-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0;
    max-width: 520px;
    width: 100%;
    animation: modalSlideUp 0.3s ease;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.rating-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.rating-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.rating-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.rating-modal-close:hover {
    background: var(--border);
}
.rating-modal-card .login-prompt {
    border-bottom: none;
    padding: 32px 20px;
}
.rating-modal-card .rating-input-container {
    padding: 20px;
}

/* Rating input title */
.rating-input-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

/* Star input */
.star-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}
.star-input span {
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer !important;
    transition: color 0.15s, transform 0.15s;
}
.star-input span:hover,
.star-input span:hover ~ span,
.star-input span.active {
    color: #fbbf24;
}
.star-input span:hover {
    transform: scale(1.15);
}

/* Rating textarea */
.rating-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 12px;
}
.rating-textarea:focus {
    border-color: var(--primary);
}

/* Rating submit button */
.rating-submit-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.rating-submit-btn:hover {
    background: var(--primary-dark);
}
.rating-submit-btn:active {
    transform: scale(0.97);
}
.rating-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reviews list inside rating modal */
.rating-reviews-list {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}
.rating-reviews-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
    font-size: 13px;
}
.rating-reviews-empty::before {
    content: '⭐';
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}
.rating-review-item {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rating-review-item:last-child {
    border-bottom: none;
}
.rating-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.rating-review-body {
    flex: 1;
    min-width: 0;
}
.rating-review-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.rating-review-stars {
    color: #fbbf24;
    font-size: 13px;
    letter-spacing: 1px;
}
.rating-review-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}
.rating-review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}
.rating-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.rating-load-more:hover {
    background: rgba(255,255,255,0.03);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalSlideDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(30px) scale(0.95); }
}

/* Comments section - hidden by default, only shown as modal */
.comments-section-wrapper {
    display: none;
}

/* Desktop: Facebook-style centered modal with dark backdrop */
.comments-section-wrapper.modal-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s ease;
}

.comments-section-wrapper.modal-closing {
    animation: fadeOut 0.25s ease forwards;
}

.comments-section-wrapper.modal-closing .comments-section {
    animation: modalSlideDown 0.25s ease forwards;
}

/* The inner card */
.comments-section-wrapper.modal-open .comments-section {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Modal header - sticky inside card */
.comments-section-wrapper.modal-open .chapter-header {
    display: flex;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.comments-section-wrapper.modal-open .chapter-header .section-title {
    font-size: 18px;
}

.comments-section-wrapper.modal-open .comments-modal-close {
    display: flex;
}

.comments-modal-close {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.comments-modal-close:hover {
    background: var(--border);
}

/* Restore pointer cursor for interactive elements */
.tab-btn,
.toc-popup-btn,
.filter-btn,
.desc-toggle-btn,
.fab-main,
.fab-action-btn,
.sort-btn,
.comment-action-btn,
.comments-modal-close,
.rating-modal-close,
.rating-load-more {
    cursor: pointer !important;
}

/* Scrollable content area inside card */
.comments-section-wrapper.modal-open .comments-inner {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Comment form styling */
.comment-form {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

.comment-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-textarea:focus {
    border-color: var(--primary);
}

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.comment-form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-submit-btn {
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.comment-submit-btn:hover {
    background: var(--primary-dark);
}

.comment-submit-btn:active {
    transform: scale(0.97);
}

/* Login prompt */
.login-prompt {
    text-align: center;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.login-prompt-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.login-prompt-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.login-prompt-btn {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.login-prompt-btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: #fff;
}

/* Filters bar */
.comments-filters {
    display: flex;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
}

.filter-btn {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer !important;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg);
    border-color: var(--border);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Comments list */
.comments-list {
    padding: 8px 0;
}

/* Facebook-style comment items */
.comment-item {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    transition: background 0.15s;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.comment-item .comment-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.comment-item .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
    flex-shrink: 0;
}

.comment-meta {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.comment-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
    margin-left: 42px;
    margin-top: 2px;
}

.comment-content p {
    margin: 0;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Comment actions row (like, reply) */
.comment-actions {
    display: flex;
    gap: 12px;
    margin-left: 42px;
    margin-top: 4px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn:hover {
    color: var(--primary);
}

.comment-action-btn.liked {
    color: var(--primary);
    font-weight: 600;
}

.comment-owner-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Edit textarea */
.comment-edit-textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    margin-top: 6px;
}

.comment-edit-textarea:focus {
    border-color: var(--primary);
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* Empty state */
.comments-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.comments-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
    animation: emptyBounce 2s ease infinite;
}

@keyframes emptyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.comments-empty-text {
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.comments-empty-hint {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Load more button */
#loadMoreComments {
    display: block;
    margin: 12px auto 16px;
}

/* Comment skeleton loading */
.comment-skeleton {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
}

.skeleton-line {
    height: 14px;
    background: var(--bg-secondary);
    border-radius: 8px;
    animation: skeletonPulse 1.5s ease infinite;
}

.skeleton-line.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Responsive - Mobile styles in story-mobile.css */

/* Related Stories Sections */
.related-section {
    background: var(--bg-card);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

.related-header {
    padding: 20px 24px 0;
}

.related-content {
    padding: 0;
}

/* Related stories list style (matching homepage) */
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.related-list-item:last-child {
    border-bottom: none;
}

.related-list-item:hover {
    background: var(--bg-secondary);
}

.related-list-icon {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.related-list-title {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.related-list-title:hover {
    color: var(--primary);
}

.related-list-item .story-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
