﻿.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* 移动端触摸优化 - 消除300ms点击延迟 */
button, a, .btn, input[type="button"], input[type="submit"], .clickable {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

.vip-avatar {
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
    animation: glow 2s infinite !important;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5) !important;
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8) !important;
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5) !important;
    }
}

/* 主页VIP标识样式 - 确保底部右角位置 */
.vip-badge-main {
    position: absolute !important;
    bottom: -8px !important;
    right: -8px !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* 用户管理页面VIP标识样式 - 确保底部右角位置 */
.vip-badge-users {
    position: absolute !important;
    bottom: -6px !important;
    right: -6px !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

@keyframes vipBadgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }
}

@keyframes crownFloat {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* ========== 玩家名字分数等级显示动画 ========== */

/* 金色发光动画 */
@keyframes goldGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.3);
    }
}

/* 彩虹文字动画 */
@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 传奇脉冲动画 */
@keyframes legendaryPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    }
    100% {
        transform: scale(1.02);
        text-shadow: 0 0 25px rgba(255, 107, 107, 1), 0 0 35px rgba(255, 107, 107, 0.5);
    }
}

/* 图标动画 */
@keyframes starTwinkle {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

@keyframes fireFlicker {
    0% { opacity: 0.8; transform: scale(1) rotate(-2deg); }
    100% { opacity: 1; transform: scale(1.05) rotate(2deg); }
}

@keyframes crownShine {
    0% { opacity: 0.8; transform: scale(1); text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    100% { opacity: 1; transform: scale(1.1); text-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}

/* ========== 毛玻璃效果 (Glassmorphism) ========== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
}

.glass-card-dark {
    background: rgba(30, 30, 40, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

.glass-button {
    background: rgba(7, 193, 96, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.glass-button:hover {
    background: rgba(7, 193, 96, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.glass-input {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(7, 193, 96, 0.5);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
    outline: none;
}

/* ========== 微交互动画 ========== */
.micro-bounce {
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.micro-bounce:active {
    transform: scale(0.95);
}

.micro-float {
    animation: microFloat 3s ease-in-out infinite;
}

@keyframes microFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.micro-pulse {
    animation: microPulse 2s ease-in-out infinite;
}

@keyframes microPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.micro-shake:hover {
    animation: microShake 0.5s ease-in-out;
}

@keyframes microShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-scale {
    animation: fadeInScale 0.3s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== 优化的骨架屏样式 ========== */
.skeleton-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.skeleton-header {
    height: 60px;
    background: linear-gradient(90deg, #e8ebef 25%, #f0f3f6 37%, #e8ebef 63%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-card {
    height: 120px;
    background: linear-gradient(90deg, #e8ebef 25%, #f0f3f6 37%, #e8ebef 63%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: skeletonWave 1.6s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@keyframes skeletonWave {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 荣誉榜专用骨架屏 */
.skeleton-honor-card {
    height: 180px;
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.5), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(8px);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}

.skeleton-honor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeletonWave 1.8s ease-in-out infinite;
}

.skeleton-honor-title {
    width: 80px;
    height: 18px;
    background: #e8d9a8;
    border-radius: 9px;
}

.skeleton-honor-value {
    width: 60px;
    height: 36px;
    background: #ddd;
    border-radius: 8px;
}

.skeleton-honor-row {
    width: 100%;
    height: 32px;
    background: #eee;
    border-radius: 8px;
    margin-top: 8px;
}

/* 骨架屏动画延迟 */
.skeleton-card:nth-child(1) { animation-delay: 0s; }
.skeleton-card:nth-child(2) { animation-delay: 0.1s; }
.skeleton-card:nth-child(3) { animation-delay: 0.2s; }
.skeleton-card:nth-child(4) { animation-delay: 0.3s; }

.skeleton-honor-card:nth-child(1) { animation-delay: 0s; }
.skeleton-honor-card:nth-child(2) { animation-delay: 0.1s; }
.skeleton-honor-card:nth-child(3) { animation-delay: 0.15s; }
.skeleton-honor-card:nth-child(4) { animation-delay: 0.2s; }
.skeleton-honor-card:nth-child(5) { animation-delay: 0.25s; }
.skeleton-honor-card:nth-child(6) { animation-delay: 0.3s; }

/* ========== 卡片悬停效果 ========== */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.card-hover-glow {
    transition: all 0.3s ease;
}

.card-hover-glow:hover {
    box-shadow: 0 0 20px rgba(7, 193, 96, 0.2), 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ========== 渐变背景 ========== */
.gradient-bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.gradient-bg-warm {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-sunrise {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.gradient-bg-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========== 平滑过渡工具类 ========== */
.transition-fast { transition: all 0.15s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow { transition: all 0.5s ease; }
.transition-bounce { transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }

/* ========== 移动端优化样式 ========== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
    }
    
    .card {
        margin-bottom: 0.75rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .glass-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    /* 移动端减少动画以提升性能 */
    .micro-float {
        animation: none;
    }
}

/* ========== 减少动画偏好设置 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
 

/* ========== VIP等级动画效果 ========== */

/* VIP2 发光动画 */
@keyframes vip2Glow {
    0% {
        box-shadow: 0 0 8px rgba(79, 195, 247, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(79, 195, 247, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
    }
}

/* VIP3 彩虹背景动画 */
@keyframes vip3Rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* VIP3 脉冲动画 */
@keyframes vip3Pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(255, 107, 107, 0.8), 0 2px 6px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 18px rgba(255, 107, 107, 1), 0 3px 8px rgba(0, 0, 0, 0.5);
    }
}

/* VIP4 火焰动画 */
@keyframes vip4Flame {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(142, 68, 173, 0.9), 0 3px 8px rgba(0, 0, 0, 0.5);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 22px rgba(231, 76, 60, 1), 0 4px 10px rgba(0, 0, 0, 0.6);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(142, 68, 173, 0.9), 0 3px 8px rgba(0, 0, 0, 0.5);
    }
}

/* VIP4 旋转动画 */
@keyframes vip4Rotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* VIP5 钻石闪耀动画 */
@keyframes vip5Diamond {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 18px rgba(0, 210, 255, 1), 0 0 30px rgba(58, 123, 213, 0.6), 0 4px 10px rgba(0, 0, 0, 0.5);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(58, 123, 213, 1), 0 0 40px rgba(0, 210, 255, 0.8), 0 5px 12px rgba(0, 0, 0, 0.6);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 18px rgba(0, 210, 255, 1), 0 0 30px rgba(58, 123, 213, 0.6), 0 4px 10px rgba(0, 0, 0, 0.5);
    }
}

/* VIP5 光芒闪烁动画 */
@keyframes vip5Shine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

/* VIP6 至尊彩虹动画 */
@keyframes vip6Supreme {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 25% 50%;
    }
    50% {
        background-position: 50% 50%;
    }
    75% {
        background-position: 75% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* VIP6 脉冲动画 */
@keyframes vip6Pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(245, 87, 108, 1), 0 0 35px rgba(79, 172, 254, 0.8), 0 0 50px rgba(255, 215, 0, 0.6), 0 5px 12px rgba(0, 0, 0, 0.6);
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 30px rgba(245, 87, 108, 1), 0 0 50px rgba(79, 172, 254, 1), 0 0 70px rgba(255, 215, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.7);
    }
}

/* VIP6 旋转动画 */
@keyframes vip6Rotate {
    0% {
        filter: hue-rotate(0deg) saturate(1.2);
    }
    100% {
        filter: hue-rotate(360deg) saturate(1.2);
    }
}


/* ========== 记分弹窗响应式样式 ========== */
/* 小屏幕上的记分弹窗自适应 */
@media (max-width: 576px) {
    #score-modal .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    #score-modal .modal-content {
        max-height: calc(100vh - 1rem) !important;
        border-radius: 12px;
    }
    
    #score-modal .modal-header {
        padding: 10px 12px !important;
        flex-shrink: 0;
    }
    
    #score-modal .modal-header h5 {
        font-size: 0.95rem !important;
    }
    
    #score-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        padding: 12px !important;
    }
    
    #score-modal .modal-footer {
        flex-shrink: 0;
        padding: 8px 0 0 0 !important;
    }
    
    /* 分数输入框响应式 */
    #score-input {
        font-size: 1rem !important;
        padding: 8px 10px !important;
        height: 44px !important;
    }
    
    /* 操作按钮响应式 */
    #cannon-btn,
    #global-select-btn,
    #add-minus-btn,
    #submit-score-btn {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        height: 40px !important;
        min-width: 50px !important;
    }
    
    /* 数字键盘响应式 */
    .number-key-btn {
        font-size: 0.95rem !important;
        padding: 8px 6px !important;
        max-width: 50px !important;
    }
    
    /* 胡息计算器按钮响应式 */
    #toggle-huxi-calculator {
        font-size: 0.9rem !important;
        max-width: 50px !important;
    }
    
    /* 胡息选择按钮响应式 */
    .huzi-btn,
    .xing-btn,
    .multiplier-btn,
    .pengpenghu-btn,
    .haidi-btn,
    .type-btn {
        font-size: 0.75rem !important;
        padding: 6px 8px !important;
    }
    
    /* 快捷记分按钮响应式 */
    .quick-score-btn {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        min-width: 45px !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    #score-modal .modal-dialog {
        margin: 0.25rem !important;
        max-width: calc(100% - 0.5rem) !important;
    }
    
    #score-modal .modal-content {
        max-height: calc(100vh - 0.5rem) !important;
    }
    
    #score-modal .modal-header {
        padding: 8px 10px !important;
    }
    
    #score-modal .modal-header h5 {
        font-size: 0.9rem !important;
    }
    
    #score-modal .modal-body {
        padding: 10px !important;
    }
    
    /* 分数输入框超小屏幕优化 */
    #score-input {
        font-size: 0.95rem !important;
        padding: 6px 8px !important;
        height: 40px !important;
    }
    
    /* 操作按钮超小屏幕优化 */
    #cannon-btn,
    #global-select-btn,
    #add-minus-btn,
    #submit-score-btn {
        font-size: 0.75rem !important;
        padding: 5px 6px !important;
        height: 36px !important;
        min-width: 45px !important;
    }
    
    /* 数字键盘超小屏幕优化 */
    .number-key-btn {
        font-size: 0.9rem !important;
        padding: 6px 4px !important;
        max-width: 45px !important;
    }

    #clear-number-btn {
        font-size: 0.85rem !important;
        max-width: 45px !important;
    }
    
    /* 胡息计算器按钮超小屏幕优化 */
    #toggle-huxi-calculator {
        font-size: 0.85rem !important;
        max-width: 45px !important;
    }
    
    /* 胡息选择按钮超小屏幕优化 */
    .huzi-btn,
    .xing-btn,
    .multiplier-btn,
    .pengpenghu-btn,
    .haidi-btn,
    .type-btn {
        font-size: 0.7rem !important;
        padding: 5px 6px !important;
    }
    
    /* 快捷记分按钮超小屏幕优化 */
    .quick-score-btn {
        font-size: 0.75rem !important;
        padding: 5px 6px !important;
        min-width: 40px !important;
    }
}


/* SweetAlert2 响应式样式 */
.swal2-popup {
    max-height: 85vh !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.swal2-html-container {
    max-height: calc(85vh - 180px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px !important;
    font-size: 0.95rem !important;
    flex: 1 1 auto !important;
}

.swal2-actions {
    flex-shrink: 0 !important;
    margin-top: 10px !important;
}

/* 小屏幕优化 */
@media (max-width: 576px) {
    .swal2-popup {
        width: calc(100% - 30px) !important;
        margin: 15px !important;
        border-radius: 12px !important;
        max-height: 85vh !important;
    }
    
    .swal2-title {
        font-size: 1.2rem !important;
        padding: 10px !important;
    }
    
    .swal2-html-container {
        font-size: 0.9rem !important;
        padding: 8px !important;
        max-height: calc(85vh - 180px) !important;
    }
    
    .swal2-actions {
        gap: 8px !important;
        padding: 10px !important;
        flex-shrink: 0 !important;
    }
    
    .swal2-actions button {
        font-size: 0.9rem !important;
        padding: 8px 12px !important;
        min-width: auto !important;
    }
    
    /* 表单元素响应式 */
    .form-select, .form-control {
        font-size: 0.9rem !important;
        padding: 6px 8px !important;
    }
    
    /* 进度条响应式 */
    .progress {
        height: 4px !important;
    }
    
    /* 文本响应式 */
    .small {
        font-size: 0.8rem !important;
    }
    
    /* 间距响应式 */
    .mb-1 {
        margin-bottom: 0.4rem !important;
    }
    
    .mb-2 {
        margin-bottom: 0.6rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.8rem !important;
    }
    
    .p-2 {
        padding: 0.6rem !important;
    }
    
    .p-3 {
        padding: 0.8rem !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .swal2-popup {
        width: calc(100% - 20px) !important;
        margin: 10px !important;
    }
    
    .swal2-title {
        font-size: 1rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.85rem !important;
        max-height: calc(85vh - 180px) !important;
    }
    
    .form-select, .form-control {
        font-size: 0.85rem !important;
        padding: 4px 6px !important;
    }
}

