/* Google Reviews Filter - Indigo Gold 豪华版 */

:root {
    --grf-primary: #4f46e5;
    --grf-primary-dark: #3730a3;
    --grf-gold: #f59e0b;
    --grf-gold-light: #fbbf24;
    --grf-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --grf-shadow-hover: 0 25px 60px rgba(79, 70, 229, 0.35);
    --grf-radius: 24px;
    --grf-transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.grf-reviews-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==================== 轮播式 (Slider) ==================== */
.grf-style-slider {
    position: relative;
    padding: 30px 20px 80px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: var(--grf-radius);
    margin: 20px 0;
    overflow: hidden;
}

/* ==================== 商家信息头部 ==================== */
.grf-business-header {
    text-align: center;
    padding: 20px 20px 30px;
    position: relative;
    z-index: 5;
}

.grf-business-name {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.grf-business-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.grf-rating-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--grf-gold);
    text-shadow: 0 2px 15px rgba(245, 158, 11, 0.5);
    line-height: 1;
}

.grf-rating-star {
    font-size: 36px;
    color: var(--grf-gold);
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
}

.grf-rating-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    font-weight: 500;
}

.grf-total-reviews {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    margin: 0;
}

.grf-total-reviews strong {
    color: #ffffff;
    font-weight: 700;
}

/* 金色光晕装饰 */
.grf-style-slider::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    animation: grf-glow 8s ease-in-out infinite;
    pointer-events: none;
}

.grf-style-slider::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    animation: grf-glow 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes grf-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.grf-slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 20px 70px;
}

.grf-slider-track {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 轮播卡片 */
.grf-slide {
    position: absolute;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%) scale(0.85);
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
    border-radius: var(--grf-radius);
    padding: 28px 32px;
    box-shadow: var(--grf-shadow);
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.grf-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(251, 191, 36, 0.15);
}

.grf-slide.prev {
    opacity: 0.5;
    visibility: visible;
    transform: translateX(-120%) scale(0.75) rotateY(15deg);
    z-index: 5;
    filter: brightness(0.85);
}

.grf-slide.next {
    opacity: 0.5;
    visibility: visible;
    transform: translateX(20%) scale(0.75) rotateY(-15deg);
    z-index: 5;
    filter: brightness(0.85);
}

.grf-slide.active:hover {
    transform: translateX(-50%) scale(1.02);
    box-shadow: var(--grf-shadow-hover), 0 0 50px rgba(251, 191, 36, 0.2);
}

/* 卡片顶部金色装饰条 */
.grf-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 100%;
    animation: grf-gold-flow 3s linear infinite;
}

@keyframes grf-gold-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 卡片金色光泽 */
.grf-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
    pointer-events: none;
}

.grf-slide.active:hover::after {
    left: 150%;
}

/* 导航按钮 - 透明背景 */
.grf-slider-prev,
.grf-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: 2px solid var(--grf-gold);
    background: transparent;
    color: var(--grf-gold);
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--grf-transition);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grf-slider-prev { left: 15px; }
.grf-slider-next { right: 15px; }

.grf-slider-prev:hover,
.grf-slider-next:hover {
    background: var(--grf-gold);
    color: #1e1b4b;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.5);
}

/* 指示点 */
.grf-slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    position: relative;
    z-index: 5;
    flex-wrap: wrap;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.grf-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--grf-transition);
    position: relative;
}

.grf-dot:hover {
    background: rgba(251, 191, 36, 0.5);
    transform: scale(1.2);
}

.grf-dot.active {
    background: var(--grf-gold);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 进度条 */
.grf-autoplay-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 10;
}

.grf-autoplay-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--grf-gold), var(--grf-gold-light));
    width: 0%;
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* ==================== 评论头部 ==================== */
.grf-review-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.grf-author-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-right: 14px;
    object-fit: cover;
    border: 3px solid var(--grf-gold);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: var(--grf-transition);
    flex-shrink: 0;
}

.grf-slide:hover .grf-author-photo,
.grf-review-item:hover .grf-author-photo {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.grf-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--grf-primary) 0%, var(--grf-primary-dark) 100%);
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.grf-author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.grf-author-name {
    font-weight: 700;
    font-size: 17px;
    color: #1e1b4b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grf-review-time {
    font-size: 13px;
    color: #6b7280;
}

/* ==================== 星星评分 ==================== */
.grf-review-rating {
    margin-bottom: 14px;
    display: flex;
    gap: 3px;
}

.grf-star {
    font-size: 24px;
    color: #e5e7eb;
    transition: var(--grf-transition);
    display: inline-block;
}

.grf-star-filled {
    color: var(--grf-gold);
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
}

/* 星星跳动动画 */
.grf-slide:hover .grf-star-filled,
.grf-review-item:hover .grf-star-filled {
    animation: grf-star-bounce 0.6s ease;
}

@keyframes grf-star-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(-15deg); }
    50% { transform: scale(1.1) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
}

.grf-slide:hover .grf-star-filled:nth-child(1),
.grf-review-item:hover .grf-star-filled:nth-child(1) { animation-delay: 0s; }
.grf-slide:hover .grf-star-filled:nth-child(2),
.grf-review-item:hover .grf-star-filled:nth-child(2) { animation-delay: 0.08s; }
.grf-slide:hover .grf-star-filled:nth-child(3),
.grf-review-item:hover .grf-star-filled:nth-child(3) { animation-delay: 0.16s; }
.grf-slide:hover .grf-star-filled:nth-child(4),
.grf-review-item:hover .grf-star-filled:nth-child(4) { animation-delay: 0.24s; }
.grf-slide:hover .grf-star-filled:nth-child(5),
.grf-review-item:hover .grf-star-filled:nth-child(5) { animation-delay: 0.32s; }

/* ==================== 评论内容 ==================== */
.grf-review-text {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 16px;
    position: relative;
    padding-left: 24px;
}

.grf-review-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 50px;
    color: var(--grf-gold);
    opacity: 0.4;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ==================== Google链接 ==================== */
.grf-google-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #6b7280;
    font-size: 13px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 25px;
    transition: var(--grf-transition);
    border: 1px solid transparent;
}

.grf-google-link:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: var(--grf-gold);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.grf-google-logo {
    height: 18px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

/* ==================== 卡片式 (Cards) ==================== */
.grf-style-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    padding: 20px 0;
}

.grf-style-cards .grf-review-item {
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
    border-radius: var(--grf-radius);
    padding: 28px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: var(--grf-transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.grf-style-cards .grf-review-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--grf-primary), var(--grf-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.grf-style-cards .grf-review-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.15), 0 0 30px rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.grf-style-cards .grf-review-item:hover::before {
    transform: scaleX(1);
}

/* ==================== 列表式 (List) ==================== */
.grf-style-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grf-style-list .grf-review-item {
    background: linear-gradient(90deg, #ffffff 0%, #fffbeb 100%);
    border-radius: 18px;
    padding: 25px 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: var(--grf-transition);
    border-left: 5px solid transparent;
    position: relative;
}

.grf-style-list .grf-review-item:hover {
    border-left-color: var(--grf-gold);
    transform: translateX(10px);
    box-shadow: 0 10px 35px rgba(79, 70, 229, 0.12);
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
}

/* ==================== 无评论提示 ==================== */
.grf-no-reviews {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    font-size: 18px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: var(--grf-radius);
}

/* ==================== 手机端响应式 ==================== */
@media (max-width: 768px) {
    .grf-style-slider {
        padding: 20px 10px 70px;
        border-radius: 16px;
    }
    
    /* 商家信息头部 - 手机端 */
    .grf-business-header {
        padding: 15px 15px 20px;
    }
    
    .grf-business-name {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .grf-business-rating {
        gap: 6px;
    }
    
    .grf-rating-score {
        font-size: 36px;
    }
    
    .grf-rating-star {
        font-size: 28px;
    }
    
    .grf-rating-text {
        font-size: 16px;
    }
    
    .grf-total-reviews {
        font-size: 13px;
    }
    
    .grf-slider-wrapper {
        padding: 15px 5px;
    }
    
    .grf-slider-track {
        min-height: auto;
        width: 100%;
    }
    
    /* 卡片宽度85% */
    .grf-slide {
        position: relative;
        left: auto;
        transform: none;
        width: 85%;
        max-width: none;
        margin: 0 auto;
        padding: 20px;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .grf-slide.active {
        display: block;
        transform: none;
    }
    
    .grf-slide.prev,
    .grf-slide.next {
        display: none;
    }
    
    /* 透明箭头按钮 */
    .grf-slider-prev,
    .grf-slider-next {
        width: 44px;
        height: 44px;
        font-size: 22px;
        background: transparent;
        border: 2px solid var(--grf-gold);
        color: var(--grf-gold);
        box-shadow: none;
    }
    
    .grf-slider-prev { left: 5px; }
    .grf-slider-next { right: 5px; }
    
    .grf-slider-prev:hover,
    .grf-slider-next:hover {
        background: rgba(245, 158, 11, 0.2);
        transform: translateY(-50%) scale(1.05);
    }
    
    /* 指示点缩小 */
    .grf-slider-dots {
        gap: 8px;
        margin-top: 20px;
    }
    
    .grf-dot {
        width: 8px;
        height: 8px;
    }
    
    .grf-dot.active {
        transform: scale(1.2);
    }
    
    /* 头像和字体调整 */
    .grf-author-photo {
        width: 46px;
        height: 46px;
        margin-right: 12px;
    }
    
    .grf-author-name {
        font-size: 15px;
    }
    
    .grf-review-time {
        font-size: 12px;
    }
    
    .grf-star {
        font-size: 20px;
    }
    
    .grf-review-text {
        font-size: 14px;
        line-height: 1.6;
        padding-left: 20px;
    }
    
    .grf-review-text::before {
        font-size: 40px;
    }
    
    .grf-google-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .grf-google-logo {
        height: 16px;
        width: auto;
    }
    
    /* 卡片式 */
    .grf-style-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .grf-style-cards .grf-review-item {
        padding: 20px;
    }
    
    /* 进度条 */
    .grf-autoplay-progress {
        width: 100px;
        bottom: 15px;
    }
}

/* 更小的手机 */
@media (max-width: 400px) {
    .grf-slide {
        width: 90%;
        padding: 16px;
    }
    
    .grf-slider-prev,
    .grf-slider-next {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    
    .grf-author-photo {
        width: 40px;
        height: 40px;
    }
}

/* ==================== 深色模式 ==================== */
@media (prefers-color-scheme: dark) {
    .grf-style-slider {
        background: linear-gradient(135deg, #0f0d24 0%, #1e1b4b 50%, #312e81 100%);
    }
    
    .grf-slide,
    .grf-style-cards .grf-review-item,
    .grf-style-list .grf-review-item {
        background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
        border-color: rgba(251, 191, 36, 0.2);
    }
    
    .grf-author-name {
        color: #f9fafb;
    }
    
    .grf-review-text {
        color: #d1d5db;
    }
    
    .grf-review-time {
        color: #9ca3af;
    }
    
    .grf-google-link {
        background: rgba(255, 255, 255, 0.1);
        color: #9ca3af;
    }
    
    .grf-google-link:hover {
        background: rgba(251, 191, 36, 0.2);
    }
}
