/* 全局样式扩展 */

/* Header样式优化 */
header {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.95) 0%, rgba(5, 5, 13, 1) 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 204, 255, 0.1);
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.5), transparent);
}

header img {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(0, 204, 255, 0.3));
}

header img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 0 12px rgba(0, 204, 255, 0.5));
}

header h1 {
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #00ccff, #00ffcc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

header .text-primary {
    color: #00ccff;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

/* 3D效果增强 - 黑色科技风 */
.three-d-effect {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.6s ease;
}

/* Footer样式优化 */
footer {
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.95) 0%, rgba(5, 5, 13, 1) 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.5), transparent);
}

footer img {
    transition: transform 0.3s ease;
}

footer img:hover {
    transform: scale(1.05);
}

footer p {
    margin: 0;
    line-height: 1.4;
  }

.three-d-effect:hover {
    transform: perspective(1000px) rotateX(-2deg) rotateY(-2deg);
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.2);
}

/* 波浪背景动画 - 黑色科技风 */
.wave-background {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #050508 0%, #0a0a1a 50%, #050508 100%);
}

.wave-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 204, 255, 0.15) 50%,
        transparent 100%
    );
    animation: waveAnimation 8s linear infinite;
}

@keyframes waveAnimation {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 发光边框动画 - 增强科技感 */
.glow-animation {
    position: relative;
}

.glow-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    background: linear-gradient(45deg, #00CCFF, #00FFCC, #0066CC, #00CCFF)
        border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGlow 3s linear infinite;
    filter: blur(2px);
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 数字显示动画 - 增强科技感 */
.number-display {
    position: relative;
    display: inline-block;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.number-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        transparent 0%,
        rgba(0, 204, 255, 0.2) 50%,
        transparent 100%
    );
    animation: numberGlow 2s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 表格行悬停效果增强 - 黑色科技风 */
.data-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.data-table tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 204, 255, 0.15), transparent);
    transition: width 0.5s ease;
    z-index: 0;
}

.data-table tbody tr:hover::before {
    width: 100%;
}

.data-table tbody tr:hover {
    background: rgba(0, 204, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.1);
}

.data-table tbody tr td {
    position: relative;
    z-index: 1;
}

/* 进度圈增强效果 - 黑色科技风 */
.progress-circle {
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    border-radius: 50%;
    background: linear-gradient(45deg, #00CCFF, #00FFCC, #0066CC, #00CCFF);
    z-index: -1;
    animation: rotate 3s linear infinite;
    filter: blur(3px);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮效果 - 增强科技感 */
.futuristic-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.futuristic-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 204, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.futuristic-button:hover::before {
    width: 300px;
    height: 300px;
}

.futuristic-button:hover {
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
    border-color: rgba(0, 204, 255, 0.5);
}

/* 加载动画 */
.loading-spinner {
    border: 2px solid rgba(0, 204, 255, 0.2);
    border-top: 2px solid #00CCFF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数据更新指示器 */
.update-indicator {
    position: relative;
}

.update-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00FFCC;
    box-shadow: 0 0 10px #00FFCC;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* 滚动条美化 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 204, 255, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 204, 255, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 204, 255, 0.6);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .lg\:col-span-2,
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
}

@media (max-width: 480px) {
    .grid-cols-5 {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 200px !important;
    }
}

/* 科技风网格背景 */
.grid-bg {
    background-image: radial-gradient(rgba(0, 204, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 文本发光效果 */
.text-glow {
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

/* AI思考动画容器 */
.ai-thinking-container {
    position: relative;
    overflow: hidden;
    background: rgba(8, 8, 16, 0.9);
    border: 1px solid rgba(0, 204, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.1);
}

/* 打字机效果 */
.typewriter-text {
    overflow: hidden;
    border-right: 2px solid rgba(0, 204, 255, 0.7);
    white-space: nowrap;
    margin: 0 auto;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: rgba(0, 204, 255, 0.7); }
}

/* 数据流动效果 */
.data-flow {
    position: relative;
}

.data-flow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 204, 255, 0.05) 50%,
        transparent 100%
    );
    animation: dataFlowAnimation 3s linear infinite;
}

@keyframes dataFlowAnimation {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 悬浮卡片效果 */
.float-card {
    transition: all 0.4s ease;
}

.float-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(0, 204, 255, 0.2);
}

/* 滚动消息样式 */
.marquee-container {
    overflow: hidden;
    position: relative;
    height: 36px; /* 固定高度以减少屏幕占用 */
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.8) 0%, rgba(5, 5, 13, 0.9) 100%);
    border: 1px solid rgba(0, 204, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 204, 255, 0.1);
}

.marquee-content {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: marquee 20s linear infinite;
    align-items: center;
}

.marquee-content > div {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3rem;
    min-width: 100%;
    padding: 0 1rem;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .marquee-container {
        height: 32px;
    }
    
    .marquee-content > div {
        gap: 1.5rem;
    }
    
    @keyframes marquee {
        0% {
            transform: translateX(100%);
        }
        100% {
            transform: translateX(-100%);
        }
    }
}

@media (max-width: 480px) {
    .marquee-container {
        height: 28px;
    }
    
    .marquee-content > div {
        gap: 1rem;
    }
}

/* 今日统计区域样式优化 */
.stats-section {
    padding: 3px !important;
    margin-bottom: 1rem !important;
    background: linear-gradient(145deg, rgba(10, 10, 26, 0.9) 0%, rgba(5, 5, 13, 0.95) 100%);
}

/* 滚动消息文字和图标样式 */
.text-announcement-text {
    color: orangered;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.text-announcement-highlight {
    color: #00ccff;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

/* Footer样式优化 */
footer {
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.95) 0%, rgba(5, 5, 13, 1) 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.5), transparent);
}

footer img {
    transition: transform 0.3s ease;
}

footer img:hover {
    transform: scale(1.05);
}

footer p {
    margin: 0;
    line-height: 1.4;
}