/* 智能控制系统 - 赛博朋克风格公共样式 */

/* ==================== 基础样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 媒体与表单自适应 - 防止移动端溢出 */
img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

input, select, textarea {
    max-width: 100%;
}

/* ==================== 赛博朋克全局样式 ==================== */
body {
    font-family: 'Orbitron', 'Courier New', 'Segoe UI', monospace;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #00ffff;
    overflow-x: hidden;
    position: relative;
}

/* 简化的赛博朋克网格背景 - 减少性能消耗 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* 简化的赛博朋克效果 - 减少动画提升性能 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    z-index: 1000;
    pointer-events: none;
    opacity: 0.5;
}

/* ==================== 赛博朋克按钮样式系统 ==================== */
.btn {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ffff;
    border: 2px solid #00ffff;
    padding: 12px 24px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 700;
    font-family: 'Orbitron', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin: 4px;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 50%, #0a0a0a 100%);
    border-color: #ff0080;
    color: #ff0080;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.8);
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.5),
        inset 0 0 20px rgba(255, 0, 128, 0.1);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 赛博朋克按钮变体 */
.btn-danger {
    border-color: #ff0040;
    color: #ff0040;
    box-shadow: 
        0 0 10px rgba(255, 0, 64, 0.4),
        inset 0 0 10px rgba(255, 0, 64, 0.1);
    text-shadow: 0 0 5px rgba(255, 0, 64, 0.6);
}

.btn-danger:hover {
    border-color: #ff4080;
    color: #ff4080;
    box-shadow: 
        0 0 20px rgba(255, 64, 128, 0.6),
        inset 0 0 20px rgba(255, 64, 128, 0.2);
    text-shadow: 0 0 10px rgba(255, 64, 128, 0.8);
}

.btn-success {
    border-color: #00ff80;
    color: #00ff80;
    box-shadow: 
        0 0 10px rgba(0, 255, 128, 0.4),
        inset 0 0 10px rgba(0, 255, 128, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 128, 0.6);
}

.btn-success:hover {
    border-color: #40ff80;
    color: #40ff80;
    box-shadow: 
        0 0 20px rgba(64, 255, 128, 0.6),
        inset 0 0 20px rgba(64, 255, 128, 0.2);
    text-shadow: 0 0 10px rgba(64, 255, 128, 0.8);
}

.btn-warning {
    border-color: #ffff00;
    color: #ffff00;
    box-shadow: 
        0 0 10px rgba(255, 255, 0, 0.4),
        inset 0 0 10px rgba(255, 255, 0, 0.1);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.6);
}

.btn-warning:hover {
    border-color: #ffff80;
    color: #ffff80;
    box-shadow: 
        0 0 20px rgba(255, 255, 128, 0.6),
        inset 0 0 20px rgba(255, 255, 128, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 128, 0.8);
}

.btn-info {
    border-color: #0080ff;
    color: #0080ff;
    box-shadow: 
        0 0 10px rgba(0, 128, 255, 0.4),
        inset 0 0 10px rgba(0, 128, 255, 0.1);
    text-shadow: 0 0 5px rgba(0, 128, 255, 0.6);
}

.btn-info:hover {
    border-color: #4080ff;
    color: #4080ff;
    box-shadow: 
        0 0 20px rgba(64, 128, 255, 0.6),
        inset 0 0 20px rgba(64, 128, 255, 0.2);
    text-shadow: 0 0 10px rgba(64, 128, 255, 0.8);
}

/* 特殊赛博朋克按钮 */
.btn-wakeup {
    border-color: #ff8000;
    color: #ff8000;
    box-shadow: 
        0 0 10px rgba(255, 128, 0, 0.4),
        inset 0 0 10px rgba(255, 128, 0, 0.1);
    text-shadow: 0 0 5px rgba(255, 128, 0, 0.6);
    animation: cyber-pulse 2s infinite;
}

.btn-wakeup:hover {
    border-color: #ff8040;
    color: #ff8040;
    box-shadow: 
        0 0 20px rgba(255, 128, 64, 0.6),
        inset 0 0 20px rgba(255, 128, 64, 0.2);
    text-shadow: 0 0 10px rgba(255, 128, 64, 0.8);
}

.btn-stealth {
    border-color: #808080;
    color: #808080;
    box-shadow: 
        0 0 10px rgba(128, 128, 128, 0.4),
        inset 0 0 10px rgba(128, 128, 128, 0.1);
    text-shadow: 0 0 5px rgba(128, 128, 128, 0.6);
    position: relative;
    overflow: hidden;
}

.btn-stealth:hover {
    border-color: #a0a0a0;
    color: #a0a0a0;
    box-shadow: 
        0 0 20px rgba(160, 160, 160, 0.6),
        inset 0 0 20px rgba(160, 160, 160, 0.2);
    text-shadow: 0 0 10px rgba(160, 160, 160, 0.8);
}

.btn-stealth.active {
    border-color: #ff0040;
    color: #ff0040;
    box-shadow: 
        0 0 20px rgba(255, 0, 64, 0.6),
        inset 0 0 20px rgba(255, 0, 64, 0.2);
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.8);
    animation: cyber-stealth-pulse 2s infinite;
}

/* 按钮尺寸变体 */
.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    min-width: auto;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.2em;
    min-width: 160px;
}

.btn-full {
    width: 100%;
    min-width: auto;
}

/* ==================== 赛博朋克表单控件样式 ==================== */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #00ffff;
    border-radius: 0;
    font-size: 16px;
    font-family: 'Orbitron', 'Courier New', monospace;
    transition: all 0.3s ease;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    color: #00ffff;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.2),
        inset 0 0 10px rgba(0, 255, 255, 0.05);
    clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
}

.form-control:focus {
    outline: none;
    border-color: #ff0080;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.4),
        inset 0 0 20px rgba(255, 0, 128, 0.1);
    background: rgba(10, 10, 10, 0.9);
    color: #ff0080;
    text-shadow: 0 0 5px rgba(255, 0, 128, 0.5);
}

.form-control::placeholder {
    color: rgba(0, 255, 255, 0.5);
    font-style: italic;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #00ffff;
    font-weight: 700;
    font-size: 0.9em;
    font-family: 'Orbitron', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* ==================== 赛博朋克卡片容器样式 ==================== */
.card {
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #00ffff;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(20px);
    clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
    position: relative;
}

/* 移除卡片扫描动画以提升性能 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    opacity: 0.6;
}

.card-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ffff;
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid #00ffff;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #ff0080;
    box-shadow: 0 0 10px #ff0080;
}

.card-header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Orbitron', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.card-header p {
    opacity: 0.8;
    font-size: 1.1em;
    font-weight: 400;
    color: rgba(0, 255, 255, 0.8);
    font-family: 'Orbitron', 'Courier New', monospace;
}

.card-body {
    padding: 40px;
    background: rgba(10, 10, 10, 0.8);
}

/* ==================== 赛博朋克消息提示样式 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.toast {
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #00ffff;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    margin-bottom: 15px;
    padding: 16px 20px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    backdrop-filter: blur(10px);
}

/* 移除toast扫描动画以提升性能 */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    opacity: 0.6;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-success {
    border-color: #00ff80;
    box-shadow: 
        0 0 20px rgba(0, 255, 128, 0.4),
        inset 0 0 20px rgba(0, 255, 128, 0.1);
}

.toast-error {
    border-color: #ff0040;
    box-shadow: 
        0 0 20px rgba(255, 0, 64, 0.4),
        inset 0 0 20px rgba(255, 0, 64, 0.1);
}

.toast-warning {
    border-color: #ffff00;
    box-shadow: 
        0 0 20px rgba(255, 255, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 0, 0.1);
}

.toast-info {
    border-color: #0080ff;
    box-shadow: 
        0 0 20px rgba(0, 128, 255, 0.4),
        inset 0 0 20px rgba(0, 128, 255, 0.1);
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toast-title {
    font-weight: 700;
    color: #00ffff;
    font-size: 14px;
    font-family: 'Orbitron', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.toast-close {
    background: none;
    border: 1px solid #00ffff;
    font-size: 14px;
    color: #00ffff;
    cursor: pointer;
    padding: 2px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Orbitron', 'Courier New', monospace;
    font-weight: bold;
}

.toast-close:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #ff0080;
    border-color: #ff0080;
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

.toast-body {
    color: rgba(0, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
    font-family: 'Orbitron', 'Courier New', monospace;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #ff0080);
    animation: toast-progress 5s linear forwards;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==================== 赛博朋克动画效果 ==================== */
@keyframes cyber-pulse {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 128, 0, 0.4),
            inset 0 0 10px rgba(255, 128, 0, 0.1),
            0 0 0 0 rgba(255, 128, 0, 0.7);
    }
    70% {
        box-shadow: 
            0 0 20px rgba(255, 128, 0, 0.6),
            inset 0 0 20px rgba(255, 128, 0, 0.2),
            0 0 0 15px rgba(255, 128, 0, 0);
    }
    100% {
        box-shadow: 
            0 0 10px rgba(255, 128, 0, 0.4),
            inset 0 0 10px rgba(255, 128, 0, 0.1),
            0 0 0 0 rgba(255, 128, 0, 0);
    }
}

@keyframes cyber-stealth-pulse {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 0, 64, 0.6),
            inset 0 0 20px rgba(255, 0, 64, 0.2),
            0 0 0 0 rgba(255, 0, 64, 0.8);
    }
    70% {
        box-shadow: 
            0 0 30px rgba(255, 0, 64, 0.8),
            inset 0 0 30px rgba(255, 0, 64, 0.3),
            0 0 0 20px rgba(255, 0, 64, 0);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(255, 0, 64, 0.6),
            inset 0 0 20px rgba(255, 0, 64, 0.2),
            0 0 0 0 rgba(255, 0, 64, 0);
    }
}

@keyframes cyber-glitch {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-1px); }
    40% { transform: translateX(1px); }
    50% { transform: translateX(0); }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .card-header {
        padding: 20px 15px;
    }

    .card-header h1 {
        font-size: 1.8em;
    }

    .card-body {
        padding: 20px 15px;
    }

    .btn {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast.hide {
        transform: translateY(-100px);
    }
}

@media (max-width: 480px) {
    .card-header h1 {
        font-size: 1.5em;
    }

    .btn {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-90 { opacity: 0.9; }

/* ==================== 基础模态框样式 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.05);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.modal-header h3 {
    margin: 0;
    color: #00ffff;
    font-family: 'Orbitron', 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.modal-close {
    color: #ff0080;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #ff4da6;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
    transform: scale(1.1);
}

.modal-body {
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}