/* Modern Hi-Tech Product Reviews CSS - Save as /css/media-reviews.css */

/* Main container with glassmorphism effect */
.product-media-reviews {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.product-media-reviews::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #007cba, #ff6b6b, #4ecdc4);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Reviews header section */
.reviews-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.reviews-title {
    font-size: 28px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.reviews-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.summary-rating {
    text-align: center;
}

.big-rating {
    font-size: 48px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.summary-stars {
    margin: 10px 0;
    font-size: 20px;
}

.review-count {
    opacity: 0.9;
    font-size: 14px;
}

.rating-metrics {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-label {
    min-width: 50px;
    font-size: 14px;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff8f00);
    border-radius: 4px;
    transition: width 1s ease;
}

.metric-value {
    min-width: 35px;
    font-weight: 600;
}

/* Individual review cards */
.media-review-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    border: 1px solid rgba(0,124,186,0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.media-review-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.media-review-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #00d4ff, #007cba);
    border-radius: 0 2px 2px 0;
}

.media-review-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(0,124,186,0.15),
        inset 0 1px 0 rgba(255,255,255,0.8);
    border-color: rgba(0,124,186,0.4);
}

/* Review header with modern layout */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,124,186,0.1);
    position: relative;
}

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

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007cba, #00d4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.reviewer-details {
    flex: 1;
}

.reviewer-info strong {
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #007cba, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.review-date {
    color: #666;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-date::before {
    content: '📅';
    font-size: 12px;
}

.verified-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* Modern rating display */
.review-ratings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,124,186,0.08);
    padding: 8px 15px;
    border-radius: 25px;
    border: 1px solid rgba(0,124,186,0.15);
    transition: all 0.3s ease;
}

.rating-item:hover {
    background: rgba(0,124,186,0.12);
    transform: scale(1.02);
}

.rating-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    min-width: 45px;
    text-align: right;
}

.rating-stars {
    color: #ffc107;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(255,193,7,0.5);
    letter-spacing: 2px;
}

/* Review text with better typography */
.review-text {
    margin-bottom: 20px;
    line-height: 1.7;
}

.review-text p {
    color: #444;
    font-size: 16px;
    margin: 0;
    text-align: justify;
    position: relative;
    padding: 20px;
    background: rgba(247,250,252,0.6);
    border-radius: 12px;
    border-left: 4px solid #00d4ff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.review-text p::before {
    content: '"';
    position: absolute;
    top: -5px;
    left: 10px;
    font-size: 40px;
    color: rgba(0,124,186,0.3);
    font-family: serif;
}

/* Media gallery with grid layout */
.review-media {
    margin-bottom: 20px;
}

.review-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.review-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.review-image:hover {
    transform: scale(1.05) rotate(1deg);
    border-color: #00d4ff;
    box-shadow: 
        0 8px 25px rgba(0,212,255,0.3),
        0 0 20px rgba(0,212,255,0.2);
}

/* Video player styling */
.review-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.review-video {
    width: 100%;
    max-height: 250px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.review-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Review actions */
.review-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,124,186,0.1);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid rgba(0,124,186,0.2);
    background: rgba(0,124,186,0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: rgba(0,124,186,0.1);
    transform: translateY(-1px);
}

.action-btn.clicked {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* Lightbox for images */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,212,255,0.5);
}

.close-lightbox {
    position: absolute;
    top: -50px;
    right: -10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238,90,82,0.4);
}

.close-lightbox:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
}

/* Overall rating display */
.product-rating-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
    position: relative;
    overflow: hidden;
}

.product-rating-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overall-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.overall-rating .stars {
    display: flex;
    gap: 4px;
}

.overall-rating .star {
    font-size: 24px;
    filter: drop-shadow(0 0 10px rgba(255,193,7,0.8));
}

.overall-rating .star.filled {
    color: #ffc107;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.overall-rating .star.empty {
    color: rgba(255,255,255,0.3);
}

.rating-text {
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Detailed ratings breakdown */
.detailed-ratings {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.rating-breakdown {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.rating-breakdown:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.criterion {
    font-weight: 600;
    font-size: 14px;
}

.rating-value {
    font-weight: 700;
    font-size: 16px;
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255,193,7,0.5);
}

/* Responsive design */
@media (max-width: 768px) {
    .product-media-reviews {
        padding: 20px;
        margin: 20px 0;
        border-radius: 16px;
    }
    
    .media-review-item {
        padding: 20px;
    }
    
    .review-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .reviewer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .reviewer-avatar {
        margin: 0 0 10px 0;
    }
    
    .review-ratings {
        align-items: flex-start;
        width: 100%;
    }
    
    .overall-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .detailed-ratings {
        flex-direction: column;
        gap: 10px;
    }
    
    .rating-breakdown {
        justify-content: space-between;
        width: 100%;
    }
    
    .review-images {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .review-videos {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .reviews-summary {
        flex-direction: column;
        gap: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .product-media-reviews {
        background: linear-gradient(135deg, rgba(30,30,30,0.9), rgba(20,20,20,0.8));
        border-color: rgba(255,255,255,0.1);
    }
    
    .media-review-item {
        background: linear-gradient(145deg, rgba(40,40,40,0.9), rgba(30,30,30,0.8));
        border-color: rgba(0,124,186,0.3);
        color: #e0e0e0;
    }
    
    .reviewer-info strong {
        color: #e0e0e0;
    }
    
    .review-text p {
        background: rgba(40,40,40,0.6);
        color: #d0d0d0;
    }
    
    .rating-item {
        background: rgba(0,124,186,0.15);
        border-color: rgba(0,124,186,0.25);
    }
}