
.comment-page-wrapper {
    padding: 30px 0 60px;
    background: #f8fafc;
    min-height: 100vh;
}

.comment-header {
    text-align: center;
    padding: 20px 0 30px;
}
.comment-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.comment-header-desc {
    color: #64748b;
    font-size: 15px;
}

.comment-publish-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid #eef2f7;
}

.publish-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.publish-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}
.publish-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.publish-avatar svg {
    width: 100%;
    height: 100%;
    padding: 8px;
    color: #94a3b8;
}

.publish-input-area {
    flex: 1;
}

.publish-input-area textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: vertical;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 10px;
    color: #0f172a;
    min-height: 80px;
	background:#f3f4f6;
	border-radius:8px
}
.publish-input-area textarea::placeholder {
    color: #94a3b8;
}
@media (max-width: 768px) {
.publish-input-area textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: vertical;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 10px;
    color: #0f172a;
    height: 100px;
	background:#f3f4f6;
	border-radius:8px
}
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}
.toolbar-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.char-counter {
    font-size: 13px;
    color: #94a3b8;
}
.char-counter #charCount {
    font-weight: 600;
}

.publish-submit-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    padding: 8px 28px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.publish-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

@media (max-width: 768px) {
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}
.publish-submit-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

}
.publish-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.publish-login-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    color: #78716c;
    font-size: 14px;
}
.publish-login-tip svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.publish-login-tip a {
    color: #f97316;
    font-weight: 600;
    text-decoration: none;
}
.publish-login-tip a:hover {
    text-decoration: underline;
}

.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: visible; 
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #f1f5f9;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.preview-remove:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.15);
}

.comment-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-count {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}
.comment-count span {
    font-weight: 400;
    color: #64748b;
}


.sort-options {
    display: flex;
    gap: 6px;
	float:left
}
.sort-btn {
    padding: 6px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.sort-btn:hover {
    border-color: #f97316;
    color: #fff;
	   background: #f97316;
}
.sort-btn.active {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 14px;
    background: #ffffff;
    padding: 18px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}
.comment-item:hover {
    border-color: #e2e8f0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-avatar svg {
    width: 100%;
    height: 100%;
    padding: 6px;
    color: #94a3b8;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 4px;
}
.comment-username {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}
.comment-time {
    font-size: 12px;
    color: #94a3b8;
}
.comment-location {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 20px;
}

.comment-content {
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
    word-break: break-word;
    margin: 4px 0 8px;
}

/* ===== ÐÞ¸Ä£ºÍ¼Æ¬ºáÏòÅÅÁÐ ===== */
.comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
    max-width: 100%;
}

/* ÆÕÍ¨Í¼Æ¬ */
.comment-images img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eef2f7;
    transition: all 0.2s;
    cursor: pointer;
}

/* ÊÓÆµËõÂÔÍ¼ÈÝÆ÷ */
.comment-images .video-thumb {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
    border: 1px solid #eef2f7;
}

.comment-images .video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-images .video-thumb .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 32px;
    opacity: 0.9;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    transition: all 0.3s;
}

.comment-images .video-thumb:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.comment-images img:hover,
.comment-images .video-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}
.like-btn svg {
    width: 18px;
    height: 18px;
}
.like-btn:hover {
    background: #f1f5f9;
    color: #ef4444;
}
.like-btn.liked {
    color: #ef4444;
}
.like-btn.liked svg {
    fill: #ef4444;
}
.like-count {
    font-size: 13px;
}

.delete-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

.comment-load-more {
    text-align: center;
    padding: 30px 0 10px;
}
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 40px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.load-more-btn:hover {
    background: #e2e8f0;
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-load-more {
    text-align: center;
    padding: 30px 0 10px;
    width: 100%;
}

.load-more-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f1f5f9;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.load-end-msg {
    color: #94a3b8;
    font-size: 14px;
    padding: 10px 0;
}

.image-lightbox {
  display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.image-lightbox img {
    max-width: 98%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
	 margin: 0 auto;

}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.lightbox-close:hover {
    opacity: 1;
}

.comment-toast {
    position: fixed;
    top:49%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 14px;
    z-index: 9998;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.my-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.my-comment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}
.my-comment-item:hover {
    border-color: #e2e8f0;
}
.my-comment-text {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
}
.my-comment-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
.my-comment-likes {
    color: #ef4444;
}
.my-comment-delete {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.my-comment-delete:hover {
    background: #fef2f2;
    color: #ef4444;
}

@media (max-width: 768px) {
    .comment-page-wrapper {
        padding: 16px 0 40px;
    }
    .comment-header h1 {
        font-size: 24px;
    }
    .comment-publish-box {
        padding: 14px;
        border-radius: 14px;
    }
    .publish-header {
        gap: 10px;
    }
    .publish-avatar {
        width: 36px;
        height: 36px;
    }
    .publish-input-area textarea {
        font-size: 14px;
        min-height: 50px;
    }
    .publish-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .publish-submit-btn {
        padding: 6px 20px;
        font-size: 13px;
    }
    .comment-item {
        padding: 14px;
        border-radius: 12px;
        gap: 10px;
    }
    .comment-avatar {
        width: 34px;
        height: 34px;
    }
    .comment-content {
        font-size: 14px;
    }
	  .comment-images {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .comment-images img,
    .comment-images .video-thumb {
     width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    .comment-sort-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .sort-options {
        justify-content: flex-start;
    }
    .sort-btn {
        padding: 4px 14px;
        font-size: 13px;
    }
    .my-comment-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .my-comment-delete {
        align-self: flex-end;
    }
}






.publish-textarea-wrapper {
    position: relative;
}
.publish-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    position: relative; 
}

.emoji-picker-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    z-index: 10011111111111;
}

.emoji-picker {
    display: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 12px;
    width: 430px;
    max-height: 220px;
    overflow-y: auto;
}

.emoji-picker::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 16px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
    z-index: 101;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
}

.emoji-item {
    font-size: 22px;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    transition: all 0.15s;
    user-select: none;
}
.emoji-item:hover {
    background: #f1f5f9;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .emoji-picker {
        width: 280px;
        max-height: 180px;
        left: -10px;
    }
    .emoji-picker::before {
        left: 26px;
    }
    .emoji-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    .emoji-item {
        font-size: 18px;
        padding: 3px;
    }
}

.media-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.video-preview {
  position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: visible; 
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #f1f5f9;
}
.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-preview .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 28px;
    opacity: 0.8;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.video-preview .preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.video-preview .preview-remove:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.15);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
}
.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-thumb .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 36px;
    opacity: 0.9;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.video-thumb:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}


.video-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.video-lightbox video {
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    background: #000;
}
.video-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}
.video-lightbox .lightbox-close:hover {
    opacity: 1;
}

.toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}
.toolbar-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.toolbar-btn svg {
    width: 20px;
    height: 20px;
}






.comment-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.comment-left {
    flex: 1;
    min-width: 0;
}

.comment-right {
    width: 280px;
    flex-shrink: 0;
}

.recommend-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    position: sticky;
    top: 20px;
}

.recommend-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 14px;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 14px;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



@media (max-width: 1024px) {
    .comment-layout {
        flex-direction: column;
    }
    
    .comment-right {
        display: none;
        width: 100%;
    }
    
    .comment-left {
        flex: none;
        width: 100%;
    }
    
    .recommend-box {
        position: static;
    }
}




.my-comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
}

.my-comment-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eef2f7;
    cursor: pointer;
    transition: all 0.2s;
}

.my-comment-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.my-comment-images .my-video-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
    border: 1px solid #eef2f7;
    flex-shrink: 0;
}

.my-comment-images .my-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-comment-images .my-video-thumb .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 28px;
    opacity: 0.9;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.my-comment-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .my-comment-images {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .my-comment-images img,
    .my-comment-images .my-video-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
    }
}










.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 32px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-nav:focus {
    outline: none;
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.9);
}

.gallery-prev {
    left: 20px;
}
.gallery-next {
    right: 20px;
}
@media (max-width: 768px) {
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 22px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}
}

