/* Custom365D Reviews - Frontend Styles */

/* Form Messages */
.review-form-message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.review-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.review-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.review-form-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Main Reviews Section */
.custom365d-reviews-section {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Review List Page Styles */
.custom365d-review-list-page {
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.custom365d-review-list-page .reviews-stats {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.custom365d-review-list-page .stats-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.custom365d-review-list-page .overall-rating {
    flex: 1;
    min-width: 250px;
}

.custom365d-review-list-page .rating-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.custom365d-review-list-page .rating-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: #00d4aa;
}

.custom365d-review-list-page .stars {
    display: flex;
    gap: 3px;
}

.custom365d-review-list-page .star {
    color: #ddd;
    font-size: 1.8rem;
}

.custom365d-review-list-page .star.filled {
    color: #00d4aa;
}

.custom365d-review-list-page .rating-text {
    color: #cccccc;
    font-size: 1rem;
}

.custom365d-review-list-page .rating-breakdown {
    flex: 2;
    min-width: 350px;
}

.custom365d-review-list-page .rating-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.custom365d-review-list-page .rating-label {
    min-width: 80px;
    font-size: 0.9rem;
    color: #cccccc;
}

.custom365d-review-list-page .bar-container {
    flex: 1;
    height: 10px;
    background: #333333;
    border-radius: 5px;
    overflow: hidden;
}

.custom365d-review-list-page .bar-fill {
    height: 100%;
    background: #00d4aa;
    transition: width 0.3s ease;
}

.custom365d-review-list-page .rating-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: #cccccc;
}

.custom365d-review-list-page .reviews-list {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
}

.custom365d-review-list-page .reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444444;
}

.custom365d-review-list-page .reviews-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.custom365d-review-list-page .reviews-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.custom365d-review-list-page .review-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.custom365d-review-list-page .review-item:hover {
    border-color: #00d4aa;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.1);
}

.custom365d-review-list-page .review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.custom365d-review-list-page .reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom365d-review-list-page .reviewer-avatar {
    width: 50px;
    height: 50px;
    background: #00d4aa;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.custom365d-review-list-page .reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.custom365d-review-list-page .reviewer-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
}

.custom365d-review-list-page .review-rating {
    display: flex;
    gap: 3px;
}

.custom365d-review-list-page .review-rating .star {
    color: #ddd;
    font-size: 1.1rem;
}

.custom365d-review-list-page .review-rating .star.filled {
    color: #00d4aa;
}

.custom365d-review-list-page .review-date {
    color: #999999;
    font-size: 0.9rem;
}

.custom365d-review-list-page .review-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
}

.custom365d-review-list-page .review-content {
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 15px;
}

.custom365d-review-list-page .review-media {
    margin: 20px 0;
}

.custom365d-review-list-page .media-item {
    border-radius: 8px;
    overflow: hidden;
    background: #333333;
}

.custom365d-review-list-page .media-item img,
.custom365d-review-list-page .media-item video {
    width: 100%;
    height: auto;
    display: block;
}

.custom365d-review-list-page .media-item video {
    max-height: 200px;
    object-fit: cover;
}

.custom365d-review-list-page .review-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333333;
}

.custom365d-review-list-page .btn-helpful {
    background: none;
    border: 1px solid #555555;
    color: #999999;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.custom365d-review-list-page .btn-helpful:hover {
    border-color: #00d4aa;
    color: #00d4aa;
}

.custom365d-review-list-page .btn-helpful.active {
    background: #00d4aa;
    border-color: #00d4aa;
    color: #ffffff;
}

/* PC端分页样式 - 圆形按钮 */
.custom365d-review-list-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.custom365d-review-list-page .pagination a,
.custom365d-review-list-page .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid #333;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.custom365d-review-list-page .pagination a:hover {
    background: #333;
    border-color: #555;
    transform: translateY(-2px);
}

.custom365d-review-list-page .pagination .current {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

/* 导航按钮样式 */
.custom365d-review-list-page .pagination a[href*="First"],
.custom365d-review-list-page .pagination a[href*="Previous"],
.custom365d-review-list-page .pagination a[href*="Next"],
.custom365d-review-list-page .pagination a[href*="Last"] {
    border-radius: 20px;
    min-width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 省略号样式 */
.custom365d-review-list-page .pagination-dots {
    color: #666;
    font-size: 1.2rem;
    padding: 0 8px;
}

.custom365d-review-list-page .no-reviews {
    text-align: center;
    color: #999999;
    font-style: italic;
    padding: 40px;
}

/* Reviews Stats */
.reviews-stats {
    background: #1a1a1a;
    color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.reviews-stats h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.stats-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.overall-rating {
    flex: 1;
    min-width: 200px;
}

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

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #00d4aa;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.star.filled {
    color: #00d4aa;
}

.rating-text {
    color: #cccccc;
    font-size: 0.9rem;
}

.rating-breakdown {
    flex: 2;
    min-width: 300px;
}

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

.rating-label {
    min-width: 60px;
    font-size: 0.9rem;
    color: #cccccc;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #333333;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #00d4aa;
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.9rem;
    color: #cccccc;
}

.write-review-btn {
    flex: 0 0 auto;
}

.btn-write-review {
    background: #00d4aa;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-write-review:hover {
    background: #00b894;
}

/* Review Form */
.review-form-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.custom365d-review-form h4 {
    color: #333333;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #00d4aa;
}

.star-rating-input {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
}

.star-rating-input .star {
    color: #ddd;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
    color: #00d4aa;
}

.btn-submit-review {
    background: #00d4aa;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit-review:hover {
    background: #00b894;
}

/* Reviews List */
.reviews-list {
    margin-top: 2rem;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.reviews-header h4 {
    color: #333333;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.reviews-sort {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
}

.reviews-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.no-reviews {
    text-align: center;
    color: #666666;
    font-style: italic;
    padding: 2rem;
}

/* Single Review Item */
.review-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: #00d4aa;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reviewer-name {
    font-weight: 600;
    color: #333333;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .star {
    color: #ddd;
    font-size: 1rem;
}

.review-rating .star.filled {
    color: #00d4aa;
}

.review-date {
    color: #666666;
    font-size: 0.9rem;
}

.review-title {
    color: #333333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.review-content {
    color: #555555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Review Media */
.review-media {
    margin: 1rem 0;
}

.media-item {
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    display: block;
}

.media-item video {
    max-height: 200px;
    object-fit: cover;
}

/* Review Actions */
.review-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.btn-helpful {
    background: none;
    border: 1px solid #ddd;
    color: #666666;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-helpful:hover {
    border-color: #00d4aa;
    color: #00d4aa;
}

.btn-helpful.active {
    background: #00d4aa;
    border-color: #00d4aa;
    color: #ffffff;
}

/* Review Stats Shortcode */
.custom365d-review-stats {
    background: #1a1a1a;
    color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.custom365d-review-stats .overall-rating {
    text-align: center;
    margin-bottom: 1.5rem;
}

.custom365d-review-stats .rating-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00d4aa;
    display: block;
    margin-bottom: 0.5rem;
}

.custom365d-review-stats .stars {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.custom365d-review-stats .total-reviews {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Review List Shortcode */
.custom365d-review-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Review Form Shortcode */
.custom365d-review-form-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
}

/* Reviews Page Shortcode */
.custom365d-reviews-page {
    margin: 2rem 0;
}

.reviews-list-section {
    margin-top: 2rem;
}

.reviews-list-section h4 {
    color: #333333;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .rating-breakdown {
        min-width: 100%;
    }
    
    .review-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .reviewer-info {
        flex-direction: column;
        text-align: center;
    }
    
    .review-media {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Loading States */
.review-form-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.review-form-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #00d4aa;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.review-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
}

.review-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.review-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* New Layout Styles for Shortcode */
.custom365d-reviews-page {
    background: #1a1a1a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Theme 0: Dark theme (default) */
.custom365d-reviews-page[data-theme="0"] {
    background: #1a1a1a;
    color: #ffffff;
}

/* Theme 1: Light theme */
.custom365d-reviews-page[data-theme="1"] {
    background: transparent;
    color: #000000;
}

/* Override any theme container restrictions */
.custom365d-reviews-page * {
    box-sizing: border-box;
}

/* Force full width - override WordPress theme containers */
.custom365d-reviews-page {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Override WordPress theme container styles */
.wp-block-group .custom365d-reviews-page,
.wp-block-column .custom365d-reviews-page,
.entry-content .custom365d-reviews-page,
.entry .custom365d-reviews-page,
main .custom365d-reviews-page,
article .custom365d-reviews-page {
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding: 0 !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
}

/* Use WordPress theme standard width and center display */
.custom365d-reviews-page {
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Override WordPress is-layout-constrained styles to use theme standard */
.is-layout-constrained .custom365d-reviews-page,
.is-layout-constrained > .custom365d-reviews-page {
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Additional overrides for WordPress block editor constraints */
.wp-block-group.is-layout-constrained .custom365d-reviews-page,
.wp-block-group.is-layout-constrained > .custom365d-reviews-page,
.wp-block-column.is-layout-constrained .custom365d-reviews-page,
.wp-block-column.is-layout-constrained > .custom365d-reviews-page {
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Override any WordPress theme content width restrictions */
:where(.wp-block-group.is-layout-constrained) .custom365d-reviews-page,
:where(.wp-block-group.is-layout-constrained) > .custom365d-reviews-page {
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

.custom365d-reviews-page .stats-section {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid #333;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Theme-specific styles */
.custom365d-reviews-page[data-theme="0"] .stats-section {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffffff;
}

.custom365d-reviews-page[data-theme="1"] .stats-section {
    background: #ffffff;
    border: 1px solid #ddd;
    color: #000000;
}

.custom365d-reviews-page .rating-overview {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

.custom365d-reviews-page .overall-rating {
    text-align: center;
}

.custom365d-reviews-page .stars {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 15px;
}

.custom365d-reviews-page .star {
    color: #00d4aa;
    font-size: 1.8rem;
}

.custom365d-reviews-page .rating-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
}

.custom365d-reviews-page .rating-subtitle {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Theme-specific text colors */
.custom365d-reviews-page[data-theme="0"] .rating-number,
.custom365d-reviews-page[data-theme="0"] .rating-count,
.custom365d-reviews-page[data-theme="0"] .reviewer-name,
.custom365d-reviews-page[data-theme="0"] .review-title,
.custom365d-reviews-page[data-theme="0"] .review-text {
    color: #ffffff;
}

.custom365d-reviews-page[data-theme="0"] .rating-subtitle,
.custom365d-reviews-page[data-theme="0"] .review-date {
    color: #cccccc;
}

.custom365d-reviews-page[data-theme="1"] .rating-number,
.custom365d-reviews-page[data-theme="1"] .rating-count,
.custom365d-reviews-page[data-theme="1"] .reviewer-name,
.custom365d-reviews-page[data-theme="1"] .review-title,
.custom365d-reviews-page[data-theme="1"] .review-text {
    color: #000000;
}

.custom365d-reviews-page[data-theme="1"] .rating-subtitle,
.custom365d-reviews-page[data-theme="1"] .review-date {
    color: #666666;
}

.custom365d-reviews-page .rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom365d-reviews-page .rating-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom365d-reviews-page .rating-stars {
    display: flex;
    gap: 2px;
    min-width: 80px;
}

.custom365d-reviews-page .rating-stars .star {
    color: #00d4aa;
    font-size: 1.2rem;
}

.custom365d-reviews-page .rating-progress {
    flex: 1;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

.custom365d-reviews-page .rating-fill {
    height: 100%;
    background: #00d4aa;
    transition: width 0.3s ease;
}

.custom365d-reviews-page .rating-count {
    min-width: 40px;
    font-size: 1rem;
    color: #ffffff;
    font-weight: bold;
    text-align: right;
}

.custom365d-reviews-page .write-review-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom365d-reviews-page .write-review-btn {
    background: #00d4aa;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom365d-reviews-page .write-review-btn:hover {
    background: #00b894;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.3);
}

.custom365d-reviews-page .reviews-section {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #333;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Theme-specific reviews section */
.custom365d-reviews-page[data-theme="0"] .reviews-section {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffffff;
}

.custom365d-reviews-page[data-theme="1"] .reviews-section {
    background: #ffffff;
    border: 1px solid #ddd;
    color: #000000;
}

.custom365d-reviews-page .reviews-list {
    display: grid;
    gap: 20px;
}

.custom365d-reviews-page .review-item {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #444;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom365d-reviews-page .review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.1);
}

/* Theme-specific review items */
.custom365d-reviews-page[data-theme="0"] .review-item {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #ffffff;
}

.custom365d-reviews-page[data-theme="1"] .review-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #000000;
}

.custom365d-reviews-page .review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.custom365d-reviews-page .reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4aa, #00a8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #ffffff;
}

.custom365d-reviews-page .reviewer-info {
    flex: 1;
}

.custom365d-reviews-page .reviewer-name {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.custom365d-reviews-page .review-date {
    color: #888;
    font-size: 0.9rem;
}

.custom365d-reviews-page .review-rating {
    display: flex;
    gap: 2px;
}

.custom365d-reviews-page .review-rating .star {
    color: #ffd700;
    font-size: 1.2rem;
}

.custom365d-reviews-page .review-content {
    margin-bottom: 15px;
}

.custom365d-reviews-page .review-title {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.custom365d-reviews-page .review-text {
    color: #cccccc;
    line-height: 1.6;
}

.custom365d-reviews-page .review-media {
    margin-top: 15px;
}

.custom365d-reviews-page .media-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 15px 0;
    scroll-behavior: smooth;
}

.custom365d-reviews-page .media-grid::-webkit-scrollbar {
    height: 6px;
}

.custom365d-reviews-page .media-grid::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.custom365d-reviews-page .media-grid::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

.custom365d-reviews-page .media-grid::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.custom365d-reviews-page .media-item {
    border-radius: 8px;
    overflow: hidden;
    background: #333;
    flex-shrink: 0;
    min-width: 150px;
    max-width: 200px;
}

.custom365d-reviews-page .media-item img,
.custom365d-reviews-page .media-item video {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
    cursor: pointer !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

.custom365d-reviews-page .media-item img:hover,
.custom365d-reviews-page .media-item video:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.custom365d-reviews-page .review-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.custom365d-reviews-page .helpful-button {
    background: #333;
    border: 1px solid #555;
    color: #cccccc;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.custom365d-reviews-page .helpful-button:hover {
    background: #00d4aa;
    color: #ffffff;
    border-color: #00d4aa;
}

.custom365d-reviews-page .helpful-button.helpful {
    background: #00d4aa;
    color: #ffffff;
    border-color: #00d4aa;
}

.custom365d-reviews-page .helpful-count {
    color: #888;
    font-size: 0.9rem;
}

/* Mobile Responsive for Shortcode */
@media (max-width: 768px) {
    /* 防止内容超出屏幕 */
    .custom365d-reviews-page {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .custom365d-reviews-page * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .custom365d-reviews-page .rating-overview {
        grid-template-columns: 1fr;
        gap: 25px;
        align-items: center;
    }
    
    .custom365d-reviews-page .overall-rating {
        order: 1;
        text-align: center;
    }
    
    .custom365d-reviews-page .rating-number {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .custom365d-reviews-page .stars {
        margin-bottom: 12px;
    }
    
    .custom365d-reviews-page .star {
        font-size: 1.6rem;
        margin: 0 2px;
    }
    
    /* 平板端分页样式 */
    .custom365d-reviews-page .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin: 20px 0;
        padding: 0 15px;
    }
    
    .custom365d-reviews-page .pagination-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 6px 10px;
        border: 2px solid #333;
        border-radius: 50%;
        background: #1a1a1a;
        color: #fff;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.3s ease;
        text-align: center;
        line-height: 1;
    }
    
    .custom365d-reviews-page .pagination-btn:hover {
        background: #333;
        border-color: #555;
        transform: translateY(-1px);
    }
    
    .custom365d-reviews-page .pagination-btn.active {
        background: #007cba;
        border-color: #007cba;
        color: #fff;
    }
    
    .custom365d-reviews-page .pagination-nav {
        border-radius: 20px;
        min-width: auto;
        padding: 6px 14px;
        font-size: 0.9rem;
    }
    
    .custom365d-reviews-page .pagination-dots {
        color: #666;
        font-size: 1.1rem;
        padding: 0 6px;
    }
    
    .custom365d-reviews-page .pagination-info {
        text-align: center;
        margin-top: 15px;
        color: #888;
        font-size: 0.9rem;
    }
    
    .custom365d-reviews-page .rating-breakdown {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .custom365d-reviews-page .rating-bar {
        gap: 12px;
    }
    
    .custom365d-reviews-page .rating-stars {
        min-width: 70px;
    }
    
    .custom365d-reviews-page .rating-stars .star {
        font-size: 1.1rem;
    }
    
    .custom365d-reviews-page .rating-progress {
        height: 8px;
    }
    
    .custom365d-reviews-page .rating-count {
        min-width: 35px;
        font-size: 0.9rem;
    }
    
    .custom365d-reviews-page .write-review-section {
        order: 3;
    }
    
    .custom365d-reviews-page .write-review-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .custom365d-reviews-page .review-header {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .custom365d-reviews-page .reviewer-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .custom365d-reviews-page .reviewer-info {
        flex: 1;
        min-width: 0;
    }
    
    .custom365d-reviews-page .reviewer-name {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .custom365d-reviews-page .review-date {
        font-size: 0.9rem;
    }
    
    .custom365d-reviews-page .review-rating {
        flex-shrink: 0;
    }
    
    .custom365d-reviews-page .review-rating .star {
        font-size: 1.1rem;
    }
    
    .custom365d-reviews-page .review-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .custom365d-reviews-page .review-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .custom365d-reviews-page .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        margin-top: 15px;
    }
    
    .custom365d-reviews-page .media-item img,
    .custom365d-reviews-page .media-item video {
        height: 120px;
        border-radius: 8px;
    }
    
    .custom365d-reviews-page .review-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .custom365d-reviews-page .helpful-button {
        padding: 10px 20px;
        font-size: 1rem;
        border-radius: 25px;
    }
    
    .custom365d-reviews-page .helpful-count {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    /* 防止内容超出屏幕 */
    .custom365d-reviews-page {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 10px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .custom365d-reviews-page * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .custom365d-reviews-page .rating-number {
        font-size: 1.4rem;
    }
    
    .custom365d-reviews-page .star {
        font-size: 1.4rem;
    }
    
    .custom365d-reviews-page .rating-stars .star {
        font-size: 1rem;
    }
    
    .custom365d-reviews-page .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .custom365d-reviews-page .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .custom365d-reviews-page .media-item img,
    .custom365d-reviews-page .media-item video {
        height: 100px;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 防止文本和内容溢出 */
    .custom365d-reviews-page .review-content,
    .custom365d-reviews-page .review-title,
    .custom365d-reviews-page .reviewer-name,
    .custom365d-reviews-page .review-date {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    .custom365d-reviews-page .review-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    .custom365d-reviews-page .write-review-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    /* 手机端分页样式优化 */
    .custom365d-reviews-page .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin: 20px 0;
        padding: 0 10px;
    }
    
    .custom365d-reviews-page .pagination-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 44px;
        padding: 8px 12px;
        border: 2px solid #333;
        border-radius: 50%;
        background: #1a1a1a;
        color: #fff;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.3s ease;
        text-align: center;
        line-height: 1;
    }
    
    .custom365d-reviews-page .pagination-btn:hover {
        background: #333;
        border-color: #555;
        transform: translateY(-2px);
    }
    
    .custom365d-reviews-page .pagination-btn.active {
        background: #007cba;
        border-color: #007cba;
        color: #fff;
    }
    
    .custom365d-reviews-page .pagination-nav {
        border-radius: 22px;
        min-width: auto;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .custom365d-reviews-page .pagination-dots {
        color: #666;
        font-size: 1.2rem;
        padding: 0 8px;
    }
    
    .custom365d-reviews-page .pagination-info {
        text-align: center;
        margin-top: 15px;
        color: #888;
        font-size: 0.9rem;
    }
}

/* PC端分页样式 - 圆形按钮 */
.custom365d-reviews-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.custom365d-reviews-page .pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid #333;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.custom365d-reviews-page .pagination-btn:hover {
    background: #333;
    border-color: #555;
    transform: translateY(-2px);
}

.custom365d-reviews-page .pagination-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.custom365d-reviews-page .pagination-nav {
    border-radius: 20px;
    min-width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.custom365d-reviews-page .pagination-dots {
    color: #666;
    font-size: 1.2rem;
    padding: 0 8px;
}

.custom365d-reviews-page .pagination-info {
    text-align: center;
    margin-top: 15px;
    color: #888;
    font-size: 0.9rem;
}

/* 评论表单样式 - 深色主题，现代化设计 */
.custom365d-review-form-container {
    display: none;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.custom365d-review-form-container h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

.custom365d-review-form .form-group {
    margin-bottom: 25px;
}

.custom365d-review-form .form-group label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.custom365d-review-form .form-group input,
.custom365d-review-form .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.custom365d-review-form .form-group input:focus,
.custom365d-review-form .form-group textarea:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.custom365d-review-form .form-group input::placeholder,
.custom365d-review-form .form-group textarea::placeholder {
    color: #999;
}

/* 星级评分样式 */
.custom365d-review-form .star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.custom365d-review-form .star-rating .star {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.custom365d-review-form .star-rating .star:hover,
.custom365d-review-form .star-rating .star.active,
.custom365d-review-form .star-rating .star.preview {
    color: #ffd700;
}

/* 文件上传区域 */
.custom365d-review-form .media-upload {
    border: 2px dashed #555;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom365d-review-form .media-upload:hover {
    border-color: #00d4aa;
    background: #f0f8f6;
}

.custom365d-review-form .media-upload input[type="file"] {
    display: none;
}

.custom365d-review-form .media-upload .upload-icon {
    font-size: 2rem;
    color: #999;
    margin-bottom: 10px;
}

.custom365d-review-form .media-upload .upload-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.custom365d-review-form .media-upload .upload-hint {
    color: #999;
    font-size: 0.85rem;
}

/* 表单按钮 */
.custom365d-review-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.custom365d-review-form .btn-submit,
.custom365d-review-form .btn-cancel {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.custom365d-review-form .btn-submit {
    background: #00d4aa;
    color: #000;
}

.custom365d-review-form .btn-submit:hover {
    background: #00b894;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.custom365d-review-form .btn-cancel {
    background: #666;
    color: #fff;
    border: 1px solid #555;
}

.custom365d-review-form .btn-cancel:hover {
    background: #777;
    border-color: #666;
}

/* 必填字段标识 */
.custom365d-review-form .form-group label.required::after {
    content: " *";
    color: #ff6b6b;
}

/* 数据使用说明 */
.custom365d-review-form .data-usage {
    margin-top: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    border-left: 3px solid #00d4aa;
}

.custom365d-review-form .data-usage p {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.custom365d-review-form .data-usage a {
    color: #00d4aa;
    text-decoration: none;
}

.custom365d-review-form .data-usage a:hover {
    text-decoration: underline;
}

/* 文件预览样式 */
.custom365d-review-form .media-preview {
    margin-top: 15px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
}

.custom365d-review-form .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.custom365d-review-form .preview-title {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

.custom365d-review-form .clear-files-btn {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.custom365d-review-form .clear-files-btn:hover {
    background: #ff5252;
}

.custom365d-review-form .preview-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.custom365d-review-form .preview-item {
    position: relative;
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #444;
}

.custom365d-review-form .preview-content {
    position: relative;
    padding: 8px;
}

.custom365d-review-form .preview-image,
.custom365d-review-form .preview-video {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.custom365d-review-form .preview-icon {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #333;
    border-radius: 4px;
}

.custom365d-review-form .file-info {
    margin-top: 5px;
}

.custom365d-review-form .file-name {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom365d-review-form .file-size {
    color: #999;
    font-size: 0.7rem;
    margin-top: 2px;
}

.custom365d-review-form .remove-file-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.custom365d-review-form .remove-file-btn:hover {
    background: rgba(255, 82, 82, 1);
}

/* 文件上传区域增强样式 */
.custom365d-review-form .media-upload {
    position: relative;
    transition: all 0.3s ease;
}

.custom365d-review-form .media-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
}

.custom365d-review-form .media-upload.dragover {
    border-color: #00d4aa;
    background: #f0f8f6;
    transform: scale(1.02);
}

/* 拖拽上传功能 */
.custom365d-review-form .media-upload {
    cursor: pointer;
}

.custom365d-review-form .media-upload.drag-active {
    border-color: #00d4aa;
    background: #f0f8f6;
}

/* 上传反馈提示 */
.custom365d-review-form .upload-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10;
    animation: fadeInOut 3s ease-in-out;
}

.custom365d-review-form .upload-feedback.success {
    background: rgba(0, 212, 170, 0.9);
    color: #fff;
    border: 1px solid #00d4aa;
}

.custom365d-review-form .upload-feedback.error {
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    border: 1px solid #ff6b6b;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* 表单消息样式 */
.custom365d-review-form .form-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.custom365d-review-form .form-message.success {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.custom365d-review-form .form-message.error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.custom365d-review-form .form-message.info {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

@keyframes slideInDown {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 图片点击放大功能 */
.custom365d-reviews-page .media-item img {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.custom365d-reviews-page .media-item img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Lightbox 样式 */
.custom365d-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.custom365d-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.custom365d-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom365d-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.custom365d-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.custom365d-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.custom365d-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    user-select: none;
}

.custom365d-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.custom365d-lightbox-prev {
    left: -70px;
}

.custom365d-lightbox-next {
    right: -70px;
}

.custom365d-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 手机端 lightbox 优化 */
@media (max-width: 768px) {
    .custom365d-lightbox-content {
        max-width: 95%;
        max-height: 95%;
        padding: 20px;
    }
    
    .custom365d-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .custom365d-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .custom365d-lightbox-prev {
        left: 10px;
    }
    
    .custom365d-lightbox-next {
        right: 10px;
    }
    
    .custom365d-lightbox-counter {
        bottom: 10px;
        font-size: 0.9rem;
    }
}
