/* 直播环境增强样式 */

/* 增强对比度和可读性 */
.live-mode {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --accent-color: #ec4899;
    --text-primary: #111827;
    --text-secondary: #374151;
    --bg-card: rgba(255, 255, 255, 0.98);
}

/* 增强动画效果，让直播更生动 */
.live-mode .logo i {
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 4px 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(102, 126, 234, 0.3);
        transform: scale(1.05);
    }
}

/* 增强查询按钮的视觉效果 */
.live-mode .query-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.live-mode .query-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.live-mode .query-btn:hover::before {
    left: 100%;
}

/* 增强结果展示的视觉冲击力 */
.live-mode .result-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border: 2px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.live-mode .result-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border-left: 4px solid #4f46e5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-mode .result-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15);
    border-left-color: #ec4899;
}

/* 增强特色功能区域 */
.live-mode .feature-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-mode .feature-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.3);
}

.live-mode .feature-icon {
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 增强背景动画 */
.live-mode .shape {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
    animation: floatEnhanced 25s infinite linear;
}

@keyframes floatEnhanced {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-15px) rotate(90deg) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) rotate(180deg) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-15px) rotate(270deg) scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg) scale(1);
        opacity: 0.7;
    }
}

/* 增强输入框的视觉反馈 */
.live-mode .input-wrapper input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), 0 8px 25px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.live-mode .input-wrapper.valid input {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 8px 25px rgba(16, 185, 129, 0.1);
}

.live-mode .input-wrapper.invalid input {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15), 0 8px 25px rgba(239, 68, 68, 0.1);
    animation: inputShake 0.5s ease-in-out;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* 增强加载动画 */
.live-mode .loading-overlay {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(124, 58, 237, 0.9));
    backdrop-filter: blur(10px);
}

.live-mode .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: spinEnhanced 1s linear infinite;
}

@keyframes spinEnhanced {
    0% { 
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1);
    }
}

/* 增强状态指示器 */
.live-mode .status-indicator {
    animation: pulseEnhanced 2s infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

@keyframes pulseEnhanced {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.3);
    }
}

/* 增强操作按钮 */
.live-mode .action-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-mode .action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #3730a3, #6b21a8);
}

/* 增强页脚链接 */
.live-mode .footer-links a {
    transition: all 0.3s ease;
    position: relative;
}

.live-mode .footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #ec4899);
    transition: width 0.3s ease;
}

.live-mode .footer-links a:hover::after {
    width: 100%;
}

/* 增强错误和成功消息 */
.live-mode .error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    animation: slideDownEnhanced 0.5s ease-out;
}

.live-mode .success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    animation: slideDownEnhanced 0.5s ease-out;
}

@keyframes slideDownEnhanced {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式增强 */
@media (max-width: 768px) {
    .live-mode .logo span {
        font-size: 1.8rem;
    }
    
    .live-mode .logo i {
        font-size: 2.2rem;
    }
    
    .live-mode .query-card {
        padding: 20px;
    }
    
    .live-mode .feature-item {
        padding: 20px;
    }
}

/* 移动端性能优化 */
@media (max-width: 768px) {
    /* 简化或禁用复杂动画以提升性能 */
    .live-mode .logo i {
        animation: none; /* 禁用logo动画 */
    }
    
    .live-mode .shape {
        animation-duration: 40s; /* 减慢背景动画速度 */
        will-change: auto; /* 减少GPU使用 */
    }
    
    .live-mode .feature-icon {
        animation: none; /* 禁用图标浮动动画 */
    }
    
    /* 简化悬停效果 */
    .live-mode .result-item:hover {
        transform: none; /* 禁用3D变换 */
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1); /* 简化阴影 */
    }
    
    .live-mode .feature-item:hover {
        transform: none; /* 禁用3D变换 */
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15); /* 简化阴影 */
    }
    
    .live-mode .action-btn:hover {
        transform: none; /* 禁用3D变换 */
        box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3); /* 保持原始阴影 */
    }
    
    /* 优化渐变效果 */
    .live-mode .query-btn,
    .live-mode .action-btn {
        background: #4f46e5; /* 使用纯色替代渐变 */
    }
    
    .live-mode .result-card,
    .live-mode .result-item,
    .live-mode .feature-item {
        background: rgba(255, 255, 255, 0.95); /* 简化背景 */
    }
    
    /* 禁用光效动画 */
    .live-mode .query-btn::before {
        display: none;
    }
    
    /* 简化输入框焦点效果 */
    .live-mode .input-wrapper input:focus {
        transform: none; /* 禁用位移动画 */
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); /* 简化阴影 */
    }
    
    /* 优化加载动画 */
    .live-mode .spinner {
        animation: spin 1s linear infinite; /* 使用简单的旋转动画 */
        box-shadow: none; /* 移除阴影效果 */
    }
    
    /* 简化状态指示器 */
    .live-mode .status-indicator {
        animation: pulse 2s infinite; /* 使用简单的脉冲动画 */
        box-shadow: none; /* 移除阴影效果 */
    }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
    /* 完全禁用所有动画以获得最佳性能 */
    .live-mode * {
        animation: none !important;
        transition: none !important;
    }
    
    /* 移除所有复杂效果 */
    .live-mode .query-btn,
    .live-mode .action-btn,
    .live-mode .result-card,
    .live-mode .result-item,
    .live-mode .feature-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
    }
    
    /* 简化输入框样式 */
    .live-mode .input-wrapper input {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
    }
    
    .live-mode .input-wrapper input:focus {
        border-color: #4f46e5 !important;
        box-shadow: 0 0 0 1px #4f46e5 !important;
    }
}

/* 高对比度模式（适合某些直播场景） */
.live-mode.high-contrast {
    --primary-color: #1e40af;
    --secondary-color: #7c2d12;
    --accent-color: #be185d;
    --text-primary: #000000;
    --text-secondary: #1f2937;
}

.live-mode.high-contrast .query-card,
.live-mode.high-contrast .result-card,
.live-mode.high-contrast .feature-item {
    background: rgba(255, 255, 255, 1);
    border: 2px solid #1e40af;
}

/* 暗色主题（适合夜间直播） */
.live-mode.dark-theme {
    --primary-color: #60a5fa;
    --secondary-color: #a78bfa;
    --accent-color: #f472b6;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-card: rgba(17, 24, 39, 0.95);
}

.live-mode.dark-theme body {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.live-mode.dark-theme .query-card,
.live-mode.dark-theme .result-card,
.live-mode.dark-theme .feature-item {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #f9fafb;
}

.live-mode.dark-theme .result-item {
    background: rgba(31, 41, 55, 0.8);
    border-left-color: #60a5fa;
}

.live-mode.dark-theme .input-wrapper input {
    background: rgba(31, 41, 55, 0.8);
    color: #f9fafb;
    border-color: rgba(96, 165, 250, 0.3);
}

.live-mode.dark-theme .input-wrapper input::placeholder {
    color: #9ca3af;
}