/* ========================================
   CYBER COMPONENTS - 科技感组件样式
   专门适配现有系统组件的科技风格
   ======================================== */

/* ========================================
   移动端主界面容器
   ======================================== */

.lambda-app-container {
    background: var(--bg-base, #0e0e0f);
    min-height: 100vh;
    position: relative;
    color: var(--text-primary, #e6e8eb);
}

.lambda-app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 231, 111, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 231, 111, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   TabBar 底部导航栏优化
   ======================================== */

.tarbar {
    background: rgba(21, 22, 23, 0.95) !important;
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(34, 231, 111, 0.15);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.tarbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(34, 231, 111, 0.3) 20%,
        rgba(34, 231, 111, 0.8) 50%,
        rgba(34, 231, 111, 0.3) 80%,
        transparent 100%);
    animation: tabBarGlow 5s ease-in-out infinite;
}

@keyframes tabBarGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

.tarbar ul li {
    position: relative;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tarbar ul li:hover {
    background: rgba(34, 231, 111, 0.1);
    transform: translateY(-2px);
}

.tarbar ul li.active,
.tarbar ul li.isselect {
    background: linear-gradient(135deg, rgba(34, 231, 111, 0.2) 0%, rgba(34, 231, 111, 0.1) 100%);
    border: 1px solid rgba(34, 231, 111, 0.4);
    color: #22e76f;
    box-shadow: 0 0 8px rgba(34, 231, 111, 0.4);
    text-shadow: 0 0 6px rgba(34, 231, 111, 0.3);
}

/* TabBar图标样式 */
.tarbar ul li .tab-icon {
    filter: brightness(1.2);
    transition: all 0.3s ease;
}

.tarbar ul li.active .tab-icon,
.tarbar ul li.isselect .tab-icon {
    filter: brightness(1.5) drop-shadow(0 0 4px rgba(34, 231, 111, 0.6));
}

/* ========================================
   按钮和交互元素
   ======================================== */

/* 主要按钮 */
.btn, .button, .lambda-btn {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 24px;
    border: 1px solid rgba(34, 231, 111, 0.3);
    border-radius: 8px;
    background: rgba(21, 22, 23, 0.8);
    color: #e6e8eb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn::before, .button::before, .lambda-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 231, 111, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover, .button:hover, .lambda-btn:hover {
    border-color: rgba(34, 231, 111, 0.6);
    box-shadow: 0 0 8px rgba(34, 231, 111, 0.4), 0 0 16px rgba(34, 231, 111, 0.2);
    color: #22e76f;
    text-shadow: 0 0 6px rgba(34, 231, 111, 0.3);
    transform: translateY(-2px);
}

.btn:hover::before, .button:hover::before, .lambda-btn:hover::before {
    left: 100%;
}

/* 主要操作按钮 */
.btn-primary, .button-primary {
    background: linear-gradient(135deg, rgba(34, 231, 111, 0.2) 0%, rgba(34, 231, 111, 0.1) 100%);
    border-color: rgba(34, 231, 111, 0.4);
    color: #22e76f;
}

.btn-primary:hover, .button-primary:hover {
    background: linear-gradient(135deg, rgba(34, 231, 111, 0.3) 0%, rgba(34, 231, 111, 0.2) 100%);
    box-shadow: 0 0 12px rgba(34, 231, 111, 0.6), 0 0 24px rgba(34, 231, 111, 0.3);
}

/* ========================================
   卡片和面板
   ======================================== */

.card, .panel, .lambda-card {
    background: rgba(21, 22, 23, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(34, 231, 111, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card::before, .panel::before, .lambda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 231, 111, 0.06) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover, .panel:hover, .lambda-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 12px rgba(34, 231, 111, 0.2);
    border-color: rgba(34, 231, 111, 0.3);
}

.card:hover::before, .panel:hover::before, .lambda-card:hover::before {
    opacity: 1;
}

/* 卡片内容 */
.card-body, .panel-body, .card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.card-title, .panel-title {
    font-family: 'Orbitron', 'Exo 2', sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #e6e8eb;
    text-shadow: 0 0 6px rgba(34, 231, 111, 0.3);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

/* ========================================
   输入框和表单元素
   ======================================== */

.form-control, .input, .lambda-input, input[type="text"], input[type="password"], input[type="email"], textarea, select {
    background: rgba(21, 22, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #e6e8eb;
    font-family: 'Exo 2', sans-serif;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus, .input:focus, .lambda-input:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #22e76f;
    box-shadow: 0 0 0 2px rgba(34, 231, 111, 0.15), 0 0 8px rgba(34, 231, 111, 0.3);
    background: rgba(21, 22, 23, 0.8);
}

.form-control::placeholder, .input::placeholder, .lambda-input::placeholder, input::placeholder, textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* ========================================
   网格和列表
   ======================================== */

.grid-container, .lambda-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* 列表项 */
.list-item, .lambda-list-item {
    background: rgba(21, 22, 23, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.list-item:hover, .lambda-list-item:hover {
    background: rgba(21, 22, 23, 0.8);
    border-color: rgba(34, 231, 111, 0.2);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   图标和图片
   ======================================== */

.icon, .lambda-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(34, 231, 111, 0.1);
    color: #22e76f;
    transition: all 0.3s ease;
    position: relative;
}

.icon:hover, .lambda-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(34, 231, 111, 0.4), 0 0 16px rgba(34, 231, 111, 0.2);
    background: rgba(34, 231, 111, 0.2);
}

/* 头像样式 */
.avatar, .user-avatar {
    border-radius: 50%;
    border: 2px solid rgba(34, 231, 111, 0.4);
    box-shadow: 0 0 8px rgba(34, 231, 111, 0.2);
    transition: all 0.3s ease;
}

.avatar:hover, .user-avatar:hover {
    border-color: rgba(34, 231, 111, 0.8);
    box-shadow: 0 0 12px rgba(34, 231, 111, 0.6), 0 0 24px rgba(34, 231, 111, 0.3);
    transform: scale(1.05);
}

/* ========================================
   加载和状态指示器
   ======================================== */

.loading, .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(34, 231, 111, 0.1);
    border-top: 3px solid #22e76f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-online {
    color: #22e76f;
    text-shadow: 0 0 4px rgba(34, 231, 111, 0.4);
}

.status-offline {
    color: #ef4444;
    text-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.status-warning {
    color: #f59e0b;
    text-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

/* ========================================
   模态框和弹出层
   ======================================== */

.modal, .popup, .overlay {
    background: rgba(14, 14, 15, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(34, 231, 111, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal-header, .popup-header {
    border-bottom: 1px solid rgba(34, 231, 111, 0.15);
    padding: 1.5rem;
}

.modal-title, .popup-title {
    font-family: 'Orbitron', 'Exo 2', sans-serif;
    font-weight: 700;
    color: #e6e8eb;
    text-shadow: 0 0 6px rgba(34, 231, 111, 0.3);
    margin: 0;
}

.modal-body, .popup-body {
    padding: 1.5rem;
}

.modal-footer, .popup-footer {
    border-top: 1px solid rgba(34, 231, 111, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ========================================
   通知和提示
   ======================================== */

.notification, .alert, .message {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.notification::before, .alert::before, .message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.notification.success, .alert.success, .message.success {
    background: rgba(34, 231, 111, 0.1);
    border-left-color: #22e76f;
    color: #22e76f;
}

.notification.warning, .alert.warning, .message.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #f59e0b;
}

.notification.error, .alert.error, .message.error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #ef4444;
}

.notification.info, .alert.info, .message.info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    color: #3b82f6;
}

/* ========================================
   响应式调整
   ======================================== */

@media (max-width: 576px) {
    .card-body, .panel-body, .card-content {
        padding: 1rem;
    }

    .btn, .button, .lambda-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .modal, .popup {
        margin: 1rem;
        border-radius: 8px;
    }

    .grid-container, .lambda-grid {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

/* ========================================
   暗色模式优化
   ======================================== */

@media (prefers-color-scheme: dark) {
    .form-control, .input, .lambda-input, input, textarea, select {
        background: rgba(14, 14, 15, 0.8);
        border-color: rgba(34, 231, 111, 0.1);
    }

    .list-item, .lambda-list-item {
        background: rgba(14, 14, 15, 0.6);
    }

    .card, .panel, .lambda-card {
        background: rgba(14, 14, 15, 0.9);
    }
}