/* Shared styles for all detail pages (News, Game, Peripheral) */

/* Unified Page Container for all detail pages */
.page-container {
    max-width: var(--detail-width) !important;
    /* Match the game detail page width */
    margin: 30px auto !important;
    background-color: #fff !important;
    border-radius: 8px !important;
    /* Consistent border radius */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    box-sizing: border-box !important;
}

/* Shared Article/Content Styles */
.article-title {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #1c1c1c;
}

.article-meta {
    color: #666;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}

.article-content p {
    line-height: 1.7;
    margin-bottom: 1.2em;
}

.article-content img,
.seo-initial-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 760px) {
    .article-content img,
    .seo-initial-body img {
        max-width: 95%;
    }
}

/* review-card-image 的移动端样式已移至 detail-pages.css 统一管理 */

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.4;
}

.article-content h2 {
    font-size: 1.8em;
}

.article-content h3 {
    font-size: 1.5em;
}

.article-content a,
.article-content a:link,
.article-content a:visited,
.article-content a:hover,
.article-content a:active {
    color: blue;
    text-decoration: underline;
}

/* Skeleton Loader Styles */
.skeleton {
    background-color: #e0e0e0;
    border-radius: 4px;
    animation: shimmer 1.5s infinite linear;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f0f0f0 40px, #e0e0e0 80px);
    background-size: 600px 100%;
}

@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton-title {
    width: 70%;
    height: 2.2em;
    margin-bottom: 0.7em;
}

.skeleton-meta {
    width: 40%;
    height: 1em;
    margin-bottom: 1.5em;
}

.skeleton-text {
    width: 100%;
    height: 1.2em;
    margin-bottom: 1.2em;
}

/* 详情页卡片容器定位 */
.review-card {
    position: relative;
}

.share-button {
    background-color: rgba(0, 123, 255, 0.9) !important;
    color: white !important;
    border: none !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 0.85em !important;
    transition: all 0.3s ease;
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    backdrop-filter: blur(4px);
}

/* 标题容器调整 - 确保标题不被分享按钮遮挡 */
.title-share-container {
    justify-content: flex-start !important;
    position: relative !important;
}

.title-share-container .review-card-title {
    margin-right: 100px !important;
    /* 为分享按钮预留足够空间 */
    flex-grow: 1 !important;
    max-width: calc(100% - 120px) !important;
    /* 确保标题不会太宽 */
}

.title-share-container .share-button {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    /* 覆盖内联样式 */
    flex-shrink: 0 !important;
}

/* 基础标题样式 - 使用更具体的选择器避免冲突 */
.detail-page .review-card-title {
    width: 100%;
    margin: 0;
}

.share-button:hover {
    background-color: rgba(0, 86, 179, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* 确保主图区域有足够的空间给分享按钮 */
.review-card-image {
    position: relative;
    /* 移除固定的最小高度，让图片自然显示 */
}

/* 确保分享按钮不被其他元素遮挡 */
.share-button {
    white-space: nowrap;
    min-width: auto;
}

/* 如果主图很小，确保按钮仍然可见 */
@media (max-width: 480px) {
    .share-button {
        top: 8px !important;
        right: 8px !important;
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
}

.comment-form-actions {
    display: flex !important;
    /* Use !important to override conflicting styles */
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
    /* Increased gap for better spacing */
}

#comment-form .comment-form-actions button,
.comment-form-actions .share-button {
    display: inline-block;
    width: auto;
    margin-left: 0;
}

/* Hide default file input */
.comment-form-actions input[type="file"] {
    display: none;
}

/* Image Preview Styles for Comment Form */
.image-preview-container {
    position: relative;
    margin-bottom: 10px;
    display: none;
}

.image-preview-container img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.remove-image-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Comment Image Display Styles */
.comment-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Button Styles for Image Upload */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* 评论头部布局 */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.comment-header p {
    margin: 0;
    flex-grow: 1;
}

/* 删除评论按钮样式 */
.delete-comment-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #dc3545;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.delete-comment-btn:hover {
    opacity: 1;
    background-color: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.delete-comment-btn:active {
    transform: scale(0.95);
}

/* 移动端删除按钮优化 */
@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .delete-comment-btn {
        align-self: flex-end;
        margin-top: 0.5rem;
        margin-left: 0;
        font-size: 1.1rem;
        padding: 6px;
    }
}

/* 评论回复系统样式 */
.comment-thread {
    margin-bottom: 2rem;
    border-left: 3px solid #f0f0f0;
    padding-left: 0;
}

.comment-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    position: relative;
}

.comment-item:last-child {
    border-bottom: none;
}

/* 回复样式 */
.comment-replies {
    margin-left: 2rem;
    margin-top: 1rem;
    border-left: 2px solid #e9ecef;
    padding-left: 1rem;
}

.reply-item {
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 3px solid #007bff;
    position: relative;
}

.reply-to-info {
    color: #007bff;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.reply-to-info::before {
    content: "↳ 回复 ";
}

/* 回复按钮样式 */
.reply-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.reply-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #0056b3;
}

/* 回复表单样式 */
.reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    display: none;
}

.reply-form.active {
    display: block;
}

.reply-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    box-sizing: border-box;
}

.reply-form-actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.reply-form-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-reply-btn {
    background: #007bff;
    color: white;
}

.submit-reply-btn:hover {
    background: #0056b3;
}

.cancel-reply-btn {
    background: #6c757d;
    color: white;
}

.cancel-reply-btn:hover {
    background: #545b62;
}

/* 回复层级指示 */
.comment-replies .reply-item {
    position: relative;
}

.comment-replies .reply-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #007bff, #dee2e6);
}

/* 移动端回复样式优化 */
@media (max-width: 768px) {
    .comment-replies {
        margin-left: 1rem;
        padding-left: 0.8rem;
    }
    
    .reply-item {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .reply-form {
        padding: 0.8rem;
    }
    
    .reply-btn {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* Game detail card alignment hotfix */
#game-detail-container .review-card {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 22px !important;
    margin-bottom: 20px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: linear-gradient(155deg, rgba(16, 21, 29, 0.96) 0%, rgba(27, 34, 44, 0.95) 42%, rgba(20, 26, 35, 0.98) 100%) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -18px 32px rgba(0, 0, 0, 0.16) !important;
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    position: relative !important;
    overflow: hidden !important;
}

#game-detail-container .review-card::before {
    content: '' !important;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 16%, rgba(255, 255, 255, 0.01) 36%, rgba(255, 255, 255, 0) 54%) !important;
    opacity: 0.9;
    pointer-events: none;
}

#game-detail-container .review-card::after {
    content: '' !important;
    position: absolute;
    top: -28%;
    right: -10%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 174, 114, 0.16) 0%, rgba(255, 174, 114, 0.05) 34%, rgba(255, 174, 114, 0) 70%) !important;
    pointer-events: none;
    filter: blur(10px);
}

#game-detail-container .review-card-content-wrapper {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: 100% !important;
    min-height: auto !important;
}

#game-detail-container .review-card-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding-left: 10px !important;
}

#game-detail-container .review-card-title {
    margin: 0 !important;
    color: #f5f7fa !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

#game-detail-container .review-card-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    color: #b7c0cb !important;
    font-size: 14px !important;
}

#game-detail-container .review-card-meta .meta-item {
    display: block !important;
    margin: 0 !important;
    color: inherit !important;
}

#game-detail-container .review-card-actions {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    justify-content: flex-end !important;
    margin: 0 0 0 auto !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
}

#game-detail-container .share-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 145, 77, 0.34) !important;
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.16) 0%, rgba(255, 107, 53, 0.12) 100%) !important;
    color: #ffd8c2 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

#game-detail-container .share-button:hover {
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.24) 0%, rgba(255, 107, 53, 0.18) 100%) !important;
    color: #fff1e8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(255, 122, 69, 0.18) !important;
}

@media (max-width: 768px) {
    #game-detail-container .review-card {
        padding: 18px !important;
        border-radius: 18px !important;
        gap: 14px !important;
    }

    #game-detail-container .review-card-content-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    #game-detail-container .review-card-info {
        padding-left: 0 !important;
    }

    #game-detail-container .review-card-title {
        font-size: 24px !important;
        color: #f5f7fa !important;
    }

    #game-detail-container .review-card-meta,
    #game-detail-container .review-card-meta .meta-item {
        color: #a7b1be !important;
    }

    #game-detail-container .review-card-actions {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
    }

    #game-detail-container .share-button {
        width: 100% !important;
        min-height: 46px !important;
        padding: 0 18px !important;
    }
}

@media (max-width: 576px) {
    #game-detail-container .review-card {
        padding: 16px !important;
    }

    #game-detail-container .review-card-title {
        font-size: 22px !important;
    }
}


/* News detail glass card */
#news-detail-container .review-card {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 22px !important;
    margin-bottom: 34px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: linear-gradient(155deg, rgba(16, 21, 29, 0.96) 0%, rgba(27, 34, 44, 0.95) 42%, rgba(20, 26, 35, 0.98) 100%) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -14px 24px rgba(0, 0, 0, 0.14) !important;
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    position: relative !important;
    overflow: hidden !important;
}

#news-detail-container .review-card::before {
    content: '' !important;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 16%, rgba(255, 255, 255, 0.01) 36%, rgba(255, 255, 255, 0) 54%) !important;
    opacity: 0.9;
    pointer-events: none;
}

#news-detail-container .review-card::after {
    content: '' !important;
    position: absolute;
    top: -28%;
    right: -10%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 174, 114, 0.16) 0%, rgba(255, 174, 114, 0.05) 34%, rgba(255, 174, 114, 0) 70%) !important;
    pointer-events: none;
    filter: blur(10px);
}

#news-detail-container .review-card-image {
    margin-right: 24px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

#news-detail-container .review-card-image img {
    border-radius: 12px !important;
}

#news-detail-container .review-card-content {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    z-index: 1 !important;
}

#news-detail-container .review-card-title {
    margin: 0 !important;
    color: #f5f7fa !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    text-shadow: none !important;
}

#news-detail-container .article-content {
    position: relative !important;
    z-index: 1 !important;
    background: #ffffff !important;
    padding-top: 2px !important;
}

#news-detail-container .review-card-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    color: #b7c0cb !important;
    font-size: 14px !important;
}

#news-detail-container .review-card-meta .meta-item {
    display: block !important;
    margin: 0 !important;
    color: inherit !important;
}

#news-detail-container .review-card-actions {
    position: static !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    margin: 0 0 0 auto !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
}

#news-detail-container .share-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 145, 77, 0.34) !important;
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.16) 0%, rgba(255, 107, 53, 0.12) 100%) !important;
    color: #ffd8c2 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

#news-detail-container .share-button:hover {
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.24) 0%, rgba(255, 107, 53, 0.18) 100%) !important;
    color: #fff1e8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(255, 122, 69, 0.18) !important;
}

@media (max-width: 768px) {
    #news-detail-container .review-card {
        padding: 18px !important;
        border-radius: 18px !important;
        gap: 14px !important;
        margin-bottom: 28px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #news-detail-container .review-card-content {
        width: 100% !important;
        padding-left: 0 !important;
    }

    #news-detail-container .review-card-title {
        font-size: 24px !important;
        color: #f5f7fa !important;
    }

    #news-detail-container .review-card-meta,
    #news-detail-container .review-card-meta .meta-item {
        color: #a7b1be !important;
    }

    #news-detail-container .review-card-actions {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
    }

    #news-detail-container .share-button {
        width: 100% !important;
        min-height: 46px !important;
        padding: 0 18px !important;
    }
}

@media (max-width: 576px) {
    #news-detail-container .review-card {
        padding: 16px !important;
    }

    #news-detail-container .review-card-title {
        font-size: 22px !important;
    }
}


/* Daily detail shared share alignment */
#detail-content .review-card-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

#detail-content .review-card-content > .title-share-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 10px !important;
}

#detail-content .review-card-content > .title-share-container .review-card-title {
    margin: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

#detail-content .review-card-content > .title-share-container .share-button {
    margin-left: 16px !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 145, 77, 0.34) !important;
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.16) 0%, rgba(255, 107, 53, 0.12) 100%) !important;
    color: #ffd8c2 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

#detail-content .review-card-content > .title-share-container .share-button:hover {
    background: linear-gradient(180deg, rgba(255, 145, 77, 0.24) 0%, rgba(255, 107, 53, 0.18) 100%) !important;
    color: #fff1e8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(255, 122, 69, 0.18) !important;
}

@media (max-width: 768px) {
    #detail-content .review-card-content > .title-share-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    #detail-content .review-card-content > .title-share-container .share-button {
        width: 100% !important;
        margin-left: 0 !important;
        min-height: 46px !important;
        padding: 0 18px !important;
    }
}
