/* 组件样式 */

/* 模态窗口样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: rgba(10, 13, 26, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.5);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 200, 255, 0.3);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 200, 255, 0.3);
}

.modal-header h3 {
    color: #00c8ff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    transform: rotate(90deg);
}

/* 区详情样式 */
.zone-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #00c8ff;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.detail-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.detail-value {
    color: #00ff9f;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

.detail-value.warning {
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.detail-value.normal {
    color: #00ff9f;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 200, 255, 0.3);
    border-top: 4px solid #00c8ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #00c8ff;
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: rgba(10, 13, 26, 0.95);
    border: 1px solid rgba(0, 200, 255, 0.5);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 180px;
    z-index: 1001;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 200, 255, 0.3);
    backdrop-filter: blur(20px);
    animation: contextMenuIn 0.3s ease-out;
}

.context-item {
    padding: 12px 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.context-item:hover {
    background: rgba(0, 200, 255, 0.1);
    color: #00c8ff;
    transform: translateX(5px);
}

@keyframes contextMenuIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.notification-success .notification-content {
    border-color: #00ff9f;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 159, 0.3);
}

.notification-warning .notification-content {
    border-color: #ffc107;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 193, 7, 0.3);
}

.notification-error .notification-content {
    border-color: #ff4757;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 71, 87, 0.3);
}

.notification-info .notification-content {
    border-color: #00c8ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 200, 255, 0.3);
}

.notification-icon {
    font-size: 24px;
}

.notification-message {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #00c8ff, #0080ff);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 200, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0080ff, #00c8ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 200, 255, 0.4);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #ffffff;
    border: 1px solid rgba(108, 117, 125, 0.5);
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 0.1);
    border-color: #6c757d;
    transform: translateY(-2px);
}

/* 设置样式 */
.settings-group {
    margin-bottom: 30px;
}

.settings-group h4 {
    color: #00c8ff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 200, 255, 0.3);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.setting-item input[type="checkbox"] {
    appearance: none;
    width: 50px;
    height: 25px;
    background: rgba(108, 117, 125, 0.3);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(108, 117, 125, 0.5);
}

.setting-item input[type="checkbox"]:checked {
    background: rgba(0, 200, 255, 0.1);
    border-color: #00c8ff;
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
}

.setting-item input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 19px;
    height: 19px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.setting-item input[type="checkbox"]:checked::after {
    transform: translateX(24px);
    background: #00c8ff;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.setting-item input[type="number"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
    width: 80px;
    transition: all 0.3s ease;
}

.setting-item input[type="number"]:focus {
    outline: none;
    border-color: #00c8ff;
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 200, 255, 0.3);
}

/* 粒子效果 */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00c8ff;
    border-radius: 50%;
    animation: particle-float 6s linear infinite;
    box-shadow: 0 0 6px rgba(0, 200, 255, 0.8);
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* 数字雨效果 */
.digital-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.rain-drop {
    position: absolute;
    color: #00ff9f;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    animation: rain-fall linear infinite;
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.8);
}

@keyframes rain-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 扫描线效果 */
.scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.scan-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00c8ff, transparent);
    animation: scan-line 4s linear infinite;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
}

@keyframes scan-line {
    0% {
        top: 0%;
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* 数字计数动画 */
.count-animation {
    animation: count-glow 0.6s ease-out;
}

@keyframes count-glow {
    0% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(0, 255, 159, 0.6);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(0, 255, 159, 0.9), 0 0 40px rgba(0, 255, 159, 0.6);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(0, 255, 159, 0.6);
    }
}

/* 滑入动画 */
.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 悬停发光效果 */
.hover-glow {
    transition: all 0.4s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.4);
}

/* 呼吸灯效果 */
.breathe {
    animation: breathe-light 3s ease-in-out infinite;
}

@keyframes breathe-light {
    0%, 100% {
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(0, 255, 159, 0.6);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 255, 159, 0.9);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 20px;
        max-width: calc(100% - 40px);
    }
    
    .zone-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .context-menu {
        min-width: 150px;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .detail-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .notification-content {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .notification-message {
        font-size: 14px;
    }
}

/* 性能优化 */
.gpu-accelerated {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .rain-drop,
    .scan-overlay::before {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: #00c8ff;
    }
}

/* 高分屏优化 */
@media (min-resolution: 300dpi) {
    .particle {
        width: 1px;
        height: 1px;
    }
    
    .rain-drop {
        font-size: 12px;
    }
}
