﻿body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.navbar-brand, .nav-link {
    color: #fff !important;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.nav-link {
    border-radius: 8px;
    transition: background 0.3s;
    margin: 2px 4px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
}

.main-container {
    max-width: 1400px;
}

.module-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.module-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.nav-pills .nav-link {
    color: #667eea !important;
    background: transparent;
    border: 1px solid #e9ecef;
    margin: 2px;
    font-weight: 500;
    padding: 8px 20px;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border-color: transparent;
}

.file-list-container {
    max-height: 500px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.2s;
    margin-bottom: 6px;
    background: #f8f9fa;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-item .file-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.file-item .file-name {
    font-weight: 500;
    color: #333;
}

.file-item .file-size {
    font-size: 0.85rem;
    color: #888;
}

.file-item .btn-sm {
    padding: 4px 12px;
    font-size: 0.85rem;
}

.qr-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
}

.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.qr-img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

.qr-wrapper-large {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.qr-img-large {
    width: 250px;
    height: 250px;
    border-radius: 8px;
}

.share-list .share-group {
    margin-bottom: 20px;
}

.share-list .share-date {
    font-weight: bold;
    color: #667eea;
    padding: 8px 12px;
    background: #f0f2ff;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-list .share-uploader {
    font-weight: 600;
    color: #495057;
    margin: 10px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-list .share-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.share-list .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.share-list .image-item {
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid #e9ecef;
}

.share-list .image-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-list .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-list .image-item .file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #667eea;
    font-size: 0.85rem;
    gap: 4px;
}

.share-list .image-item .file-placeholder i {
    font-size: 2rem;
}

.remaining-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 50px;
}

.remaining-list .name-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

.remaining-list .name-tag:hover {
    transform: scale(1.05);
}

.remaining-list .name-tag.removed {
    background: #e9ecef;
    color: #adb5bd;
    text-decoration: line-through;
}

.draw-card {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.draw-body {
    padding: 40px 20px;
}

.draw-display {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.draw-display .draw-placeholder {
    text-align: center;
    color: #adb5bd;
}

.draw-display .draw-placeholder i {
    font-size: 4rem;
}

.draw-display .draw-placeholder p {
    margin-top: 10px;
    font-size: 1.1rem;
}

.draw-display .winner-name {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #feca57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: winnerPop 0.6s ease;
    text-shadow: 0 0 30px rgba(245,87,108,0.3);
}

@keyframes winnerPop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.draw-display .rolling-name {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.btn-draw {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #feca57 100%);
    border: none;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 16px 50px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(245,87,108,0.4);
    letter-spacing: 4px;
}

.btn-draw:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245,87,108,0.5);
}

.btn-draw:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-draw .draw-text {
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.draw-history {
    max-height: 200px;
    overflow-y: auto;
}

.draw-history .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
    background: #f8f9fa;
    transition: background 0.2s;
}

.draw-history .history-item:hover {
    background: #e9ecef;
}

.draw-history .history-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.draw-history .history-name {
    font-weight: 600;
    color: #333;
}

.draw-history .history-time {
    font-size: 0.85rem;
    color: #888;
}

.image-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .qr-img, .qr-img-large {
        width: 150px;
        height: 150px;
    }
    .btn-draw {
        font-size: 1rem;
        padding: 12px 30px;
    }
    .draw-display {
        height: 140px;
    }
    .draw-display .winner-name {
        font-size: 2.5rem;
    }
    .draw-display .rolling-name {
        font-size: 2rem;
    }
}

.text-muted.small {
    font-size: 0.85rem;
}

/* ===== Toast 通知 ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-msg {
    min-width: 280px;
    max-width: 400px;
    padding: 14px 20px;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease;
    pointer-events: auto;
}

.toast-msg.toast-success { background: linear-gradient(135deg, #28a745, #20c997); }
.toast-msg.toast-error { background: linear-gradient(135deg, #dc3545, #e74c3c); }
.toast-msg.toast-info { background: linear-gradient(135deg, #17a2b8, #667eea); }
.toast-msg.toast-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); color: #333; }

.toast-msg.fade-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* ===== 全屏 Loading 遮罩 ===== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #f0f2f5;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #667eea;
}

.loading-overlay p {
    margin-top: 15px;
    color: #667eea;
    font-weight: 500;
}

/* ===== 鉴权 Overlay ===== */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 48px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: authPop 0.4s ease;
}
@keyframes authPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-logo {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}
.auth-title {
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 6px;
}
.auth-subtitle {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 22px;
}
.auth-input-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.auth-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
}
.auth-submit {
    padding: 0 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.auth-submit:hover { opacity: 0.92; }
.auth-submit:active { transform: scale(0.96); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-error {
    color: #e53e3e;
    font-size: 0.85rem;
    min-height: 20px;
    margin-top: 4px;
}
.auth-hint {
    color: #a0aec0;
    font-size: 0.78rem;
    margin-top: 8px;
}

/* ===== 文件类型图标颜色 ===== */
.file-icon.icon-pdf { color: #dc3545; }
.file-icon.icon-word { color: #2b579a; }
.file-icon.icon-excel { color: #217346; }
.file-icon.icon-ppt { color: #d24726; }
.file-icon.icon-image { color: #e83e8c; }
.file-icon.icon-default { color: #667eea; }

/* ===== 文件名溢出省略 ===== */
.file-item .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.share-list .image-item .file-placeholder span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    text-align: center;
}

/* ===== name-tag 光标 ===== */
.remaining-list .name-tag {
    cursor: default;
}

/* ===== 抽签进度动画 ===== */
.draw-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #f093fb, #f5576c, #feca57);
    border-radius: 2px;
    animation: progressFill 5s linear;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

.btn-draw:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-draw.btn-finished {
    background: #adb5bd;
    box-shadow: none;
}

.btn-draw.btn-finished:hover {
    transform: none !important;
}

/* ===== 图片弹窗下载按钮 ===== */
.image-modal .download-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.image-modal .download-btn:hover {
    background: #fff;
    transform: translateX(-50%) translateY(-2px);
}

/* ===== 学员分享左侧固定 ===== */
.share-left-col {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

/* ===== 自定义确认弹窗 ===== */
.confirm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.confirm-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from { transform: scale(0.7) translateY(-20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.confirm-modal .modal-icon {
    text-align: center;
    padding: 28px 20px 8px;
}

.confirm-modal .modal-icon i {
    font-size: 3rem;
    color: #f5576c;
    display: inline-block;
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.confirm-modal .modal-body {
    padding: 8px 24px 20px;
    text-align: center;
}

.confirm-modal .modal-body p {
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.confirm-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.confirm-modal .modal-footer button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal .btn-cancel {
    background: #e9ecef;
    color: #495057;
}

.confirm-modal .btn-cancel:hover {
    background: #dee2e6;
}

.confirm-modal .btn-confirm {
    background: linear-gradient(135deg, #f5576c, #dc3545);
    color: #fff;
}

.confirm-modal .btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ===== 抽签炫酷效果 ===== */

/* 滚动中的发光文字 */
.rolling-name {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #667eea, #f5576c, #feca57, #667eea);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 1.5s linear infinite, shake 0.1s linear infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.4));
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes shake {
    0% { transform: translateX(-2px) scale(1); }
    50% { transform: translateX(2px) scale(1.02); }
    100% { transform: translateX(-2px) scale(1); }
}

/* 中奖者文字爆发效果 */
.winner-name {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #feca57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: winnerPulse 0.8s ease-out, winnerGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(245, 87, 108, 0.6));
}

@keyframes winnerPulse {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes winnerGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(245, 87, 108, 0.5)); }
    50% { filter: drop-shadow(0 0 50px rgba(254, 202, 87, 0.8)); }
}

/* 粒子爆炸 */
.confetti-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    animation: confettiBurst 1.5s ease-out forwards;
}

@keyframes confettiBurst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot));
        opacity: 0;
    }
}

/* 闪光圆环 */
.burst-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid #feca57;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringBurst 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes ringBurst {
    0% { width: 20px; height: 20px; opacity: 1; border-width: 3px; }
    100% { width: 300px; height: 300px; opacity: 0; border-width: 1px; }
}

/* 抽签区域背景闪光 */
.draw-display-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.draw-display-wrapper.drawing {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(245, 87, 108, 0.05));
    animation: bgPulse 1s ease-in-out infinite;
}

.draw-display-wrapper.winner {
    background: radial-gradient(circle, rgba(254, 202, 87, 0.15), transparent 70%);
    animation: winnerBg 2s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { box-shadow: inset 0 0 30px rgba(102, 126, 234, 0.1); }
    50% { box-shadow: inset 0 0 60px rgba(245, 87, 108, 0.2); }
}

@keyframes winnerBg {
    0%, 100% { box-shadow: inset 0 0 30px rgba(254, 202, 87, 0.2); }
    50% { box-shadow: inset 0 0 80px rgba(245, 87, 108, 0.3); }
}

/* 音效控制按钮 */
.sound-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #667eea;
    transition: all 0.2s;
    z-index: 20;
}

.sound-toggle:hover {
    background: #fff;
    transform: scale(1.1);
}

.sound-toggle.muted {
    color: #adb5bd;
}

/* ==================== 在线评分模块 ==================== */

/* 当前评分项目大号字体 */
.rating-project-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: #495057;
    background: linear-gradient(135deg, #eef2ff 0%, #f3e8ff 100%);
    border-radius: 12px;
    padding: 12px 16px;
    border-left: 4px solid #667eea;
    word-break: break-all;
    min-height: 52px;
}

/* 进度列表 */
.rating-progress-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
}

.rating-progress-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.15s;
}

.rating-progress-item:hover {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.08);
    border-color: #667eea;
}

.rating-target-name {
    font-weight: 600;
    color: #212529;
    font-size: 15px;
}

.rating-count-badge {
    font-size: 11px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

.rating-count-badge:empty, .rating-count-badge:only-child {
    display: none;
}

.rating-avg {
    font-size: 18px;
    font-weight: 700;
    color: #495057;
}

/* 进度条形图 */
.rating-bar-bg {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease, background 0.3s ease;
    min-width: 2px;
}

/* 自动刷新按钮激活态 */
#ratingAutoRefreshBtn.active {
    animation: spinBtn 2s linear infinite;
}

@keyframes spinBtn {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== 评分详情弹窗（紫色渐变主题 v2）===== */
.rating-detail-modal .confirm-modal {
    max-width: 640px;
    width: calc(100% - 32px);
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 80px rgba(102, 126, 234, 0.35);
}

/* 头部 — 紫色渐变 + 装饰光晕 */
.rating-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 28px 32px 32px;
    position: relative;
    overflow: hidden;
}

/* 头部装饰光晕（右上和左下两个彩色光斑） */
.rating-detail-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rating-detail-header::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rating-detail-header h5 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.rating-detail-header h5 i {
    font-size: 1.3rem;
    animation: starPulse 2.5s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.rating-detail-header .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
    position: relative;
    z-index: 1;
}

.rating-detail-header strong {
    color: #fff;
    font-weight: 600;
}

/* 平均分大字 — 带发光效果 */
.rating-avg-big {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 1;
}

.rating-avg-big .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0;
    margin-left: 2px;
}

.rating-detail-modal .confirm-modal {
    position: relative;
}

/* 关闭按钮 */
.rating-detail-modal .btn-close-modal {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 7px 9px;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.rating-detail-modal .btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 记录列表区域 */
.rating-detail-records {
    max-height: 420px;
    overflow-y: auto;
    padding: 20px 24px 24px;
    background: linear-gradient(180deg, #f5f7ff 0%, #faf8ff 100%);
}

/* 滚动条美化 */
.rating-detail-records::-webkit-scrollbar {
    width: 6px;
}
.rating-detail-records::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 3px;
}
.rating-detail-records::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

/* 单条记录卡片 */
.rating-detail-record {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px 16px 22px;
    margin-bottom: 12px;
    border: 1px solid #eef0f8;
    border-left: 4px solid #c7d2fe;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.rating-detail-record:hover {
    border-color: #a5b4fc;
    border-left-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.rating-detail-record:last-child {
    margin-bottom: 0;
}

.rating-detail-record .fw-bold {
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 600;
}

.rating-detail-record .text-muted {
    font-size: 0.8rem;
    color: #94a3b8 !important;
}

/* ===== 自定义评分徽章颜色（替代 Bootstrap 原生颜色）===== */
.rating-detail-record .badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    border: none;
}

/* >= 8.5 分：紫色渐变 */
.badge-purple {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 7 - 8.5 分：蓝紫色渐变 */
.badge-blue {
    background: linear-gradient(135deg, #818cf8, #6366f1) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

/* 5 - 7 分：青绿色渐变 */
.badge-green {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

/* 3 - 5 分：琥珀色渐变 */
.badge-orange {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

/* < 3 分：玫红色渐变 */
.badge-red {
    background: linear-gradient(135deg, #f5576c, #ef4444) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

/* 默认灰色 */
.badge-secondary {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    color: #fff !important;
}

/* 评论区 */
.rating-detail-comment {
    margin-top: 12px;
    color: #4a5568;
    font-size: 0.88rem;
    background: linear-gradient(135deg, #f5f7ff, #faf5ff);
    border-radius: 10px;
    padding: 12px 16px;
    border-left: 3px solid #667eea;
    line-height: 1.6;
}

/* 空状态美化 */
.rating-detail-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.rating-detail-empty i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 12px;
}

.rating-detail-empty p {
    font-size: 0.95rem;
    margin: 0;
}