/**
 * Bento Grid 布局样式 - 炫酷现代化版本
 */

.bento-dashboard {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(120px, 200px);
    gap: 20px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    background: 
        radial-gradient(circle at 20% 20%, rgba(38, 87, 253, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 50% 50%; 
    }
    50% { 
        background-position: 100% 100%, 0% 0%, 80% 20%; 
    }
}

/* Bento Grid 项目基础样式 */
.bento-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 120px;
    max-height: 400px;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(38, 87, 253, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(38, 87, 253, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 网格布局尺寸 */
.bento-large {
    grid-column: span 8;
    grid-row: span 4;
}

.bento-medium {
    grid-column: span 4;
    grid-row: span 3;
}

.bento-small {
    grid-column: span 4;
    grid-row: span 2;
}

/* Bento 头部样式 */
.bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.bento-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bento-header i {
    color: #2657FD;
    font-size: 1.25rem;
}

/* 脉冲指示器 */
.pulse-indicator {
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.pulse-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #10B981;
    border-radius: 50%;
    animation: pulseRing 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.pulse-icon {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        color: #2657FD;
        text-shadow: 0 0 10px rgba(38, 87, 253, 0.5);
    }
    50% {
        color: #64B5F6;
        text-shadow: 0 0 20px rgba(38, 87, 253, 0.8);
    }
}

/* 实时数据流容器 */
.data-stream-container {
    background: linear-gradient(135deg, 
        rgba(38, 87, 253, 0.1) 0%, 
        rgba(16, 185, 129, 0.05) 100%);
    position: relative;
}

.data-stream-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #2657FD 50%, 
        transparent 100%);
    animation: dataFlow 3s linear infinite;
}

@keyframes dataFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.data-stream-wrapper {
    position: relative;
    height: calc(100% - 60px);
}

.data-stream-chart {
    width: 100%;
    height: 70%;
    border-radius: 12px;
}

.data-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2657FD;
    display: block;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(38, 87, 253, 0.3);
}

.metric-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AI状态容器 */
.ai-status-container {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(38, 87, 253, 0.05) 100%);
}

.ai-status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100% - 60px);
    justify-content: space-between;
}

.ai-core {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-core-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(38, 87, 253, 0.3);
    border-top: 3px solid #2657FD;
    border-radius: 50%;
    animation: aiSpin 3s linear infinite;
}

.ai-core-ring::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid rgba(38, 87, 253, 0.1);
    border-radius: 50%;
    animation: aiSpin 5s linear infinite reverse;
}

@keyframes aiSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-core-center {
    text-align: center;
    z-index: 2;
}

.ai-status-text {
    display: block;
    font-size: 0.875rem;
    color: #10B981;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-efficiency {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.ai-metrics {
    display: flex;
    gap: 24px;
    width: 100%;
    justify-content: space-around;
}

.ai-metric {
    text-align: center;
}

.ai-metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2657FD;
    margin-bottom: 4px;
}

.ai-metric-label {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* 统计球容器 */
.stats-sphere-container {
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.1) 0%, 
        rgba(239, 68, 68, 0.05) 100%);
}

.stats-sphere-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
}

.stats-sphere {
    flex: 1;
    max-height: 200px;
}

.sphere-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #D1D5DB;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* 快捷操作容器 */
.quick-actions-container {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        rgba(6, 182, 212, 0.05) 100%);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    height: calc(100% - 20px);
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(38, 87, 253, 0.3) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.quick-action-btn:hover::before {
    width: 200px;
    height: 200px;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(38, 87, 253, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2657FD, #64B5F6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    position: relative;
    z-index: 2;
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* 系统监控容器 */
.system-monitor-container {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.05) 100%);
}

.system-metrics {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(100% - 60px);
}

.metric-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.metric-ring {
    width: 80px;
    height: 80px;
}

.metric-ring-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 热力图容器 */
.heatmap-container {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.1) 0%, 
        rgba(245, 158, 11, 0.05) 100%);
}

.heatmap-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
}

.heatmap-canvas {
    flex: 1;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.heatmap-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 0.75rem;
    color: #9CA3AF;
}

.scale-gradient {
    flex: 1;
    height: 8px;
    margin: 0 16px;
    background: linear-gradient(90deg, 
        rgba(38, 87, 253, 0.2) 0%, 
        rgba(38, 87, 253, 0.8) 100%);
    border-radius: 4px;
}

/* 趋势预测容器 */
.trend-prediction-container {
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.1) 0%, 
        rgba(16, 185, 129, 0.05) 100%);
}

.trend-controls {
    display: flex;
    gap: 8px;
}

.trend-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #9CA3AF;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trend-btn.active,
.trend-btn:hover {
    background: #2657FD;
    border-color: #2657FD;
    color: white;
}

.trend-chart-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
}

.trend-chart {
    flex: 1;
    min-height: 200px;
}

.trend-insights {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.insight-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex: 1;
}

.insight-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.125rem;
}

.insight-icon.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.insight-icon.stable {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.insight-text {
    display: flex;
    flex-direction: column;
}

.insight-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.insight-label {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* 通知流容器 */
.notification-stream-container {
    background: linear-gradient(135deg, 
        rgba(168, 85, 247, 0.1) 0%, 
        rgba(236, 72, 153, 0.05) 100%);
}

.notification-stream {
    height: calc(100% - 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-item.success {
    border-left: 3px solid #10B981;
    color: #6EE7B7;
}

.notification-item.warning {
    border-left: 3px solid #F59E0B;
    color: #FCD34D;
}

.notification-item.info {
    border-left: 3px solid #3B82F6;
    color: #93C5FD;
}

.notification-item i {
    font-size: 1rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .bento-dashboard {
        grid-template-columns: repeat(8, 1fr);
        grid-auto-rows: minmax(100px, 180px);
        gap: 16px;
        padding: 16px;
    }

    .bento-large {
        grid-column: span 8;
        grid-row: span 3;
    }

    .bento-medium {
        grid-column: span 4;
        grid-row: span 2;
    }

    .bento-small {
        grid-column: span 4;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .bento-dashboard {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(120px, 200px);
        gap: 12px;
        padding: 12px;
        height: 100%;
    }

    .bento-large,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 120px;
        max-height: 200px;
    }

    .bento-item {
        padding: 16px;
        min-height: 120px;
        max-height: 200px;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .system-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .trend-insights {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .data-overlay {
        grid-template-columns: 1fr;
        gap: 8px;
        bottom: 8px;
        right: 8px;
    }

    .metric-card {
        padding: 8px;
        min-width: auto;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.bento-item:nth-child(1) { animation-delay: 0.1s; }
.bento-item:nth-child(2) { animation-delay: 0.2s; }
.bento-item:nth-child(3) { animation-delay: 0.3s; }
.bento-item:nth-child(4) { animation-delay: 0.4s; }
.bento-item:nth-child(5) { animation-delay: 0.5s; }
.bento-item:nth-child(6) { animation-delay: 0.6s; }
.bento-item:nth-child(7) { animation-delay: 0.7s; }
.bento-item:nth-child(8) { animation-delay: 0.8s; } 