/* 工业科技风格 - 设备固件页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 深色背景 */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-card: #1e2433;
    
    /* 霓虹色 */
    --neon-green: #00ff88;
    --neon-blue: #00d9ff;
    --neon-pink: #ff006e;
    
    /* 文字色 */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    
    /* 状态色 */
    --success: #00ff88;
    --warning: #ffa500;
    --danger: #ff6b6b;
    
    /* 边框和阴影 */
    --border-color: rgba(0, 255, 136, 0.2);
    --glow-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

body {
    font-family: 'Poppins', 'SimSun', '宋体', serif;
    font-weight: 700;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景网格 */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部导航栏 */
.navbar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: var(--glow-shadow);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.back-button svg {
    width: 18px;
    height: 18px;
}

.back-button:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.device-title {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.device-title h1 {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chip-badge {
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--chip-color, var(--neon-green));
    border-radius: 20px;
    color: var(--chip-color, var(--neon-green));
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px var(--chip-color, var(--neon-green));
}

.navbar-spacer {
    width: 100px;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

/* 左侧操作面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--glow-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    width: 24px;
    height: 24px;
    color: var(--neon-green);
}

.card-header h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* 设备规格 */
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.spec-value {
    color: var(--neon-green);
    font-weight: 600;
    font-size: 0.9em;
}

/* 连接状态 */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 10px var(--text-muted);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator.connected .status-dot {
    background: var(--success);
    box-shadow: 0 0 15px var(--success);
}

.status-text {
    color: var(--text-primary);
    font-weight: 600;
}

.device-details {
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.detail-value {
    color: var(--neon-blue);
    font-weight: 600;
    font-size: 0.85em;
}

/* 按钮样式 */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:last-child {
    margin-bottom: 0;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: #00FF88;
    color: #000000;
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #00FFAA;
}

.btn-success {
    background: #00A8E8;
    color: #ffffff;
    font-weight: 700;
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 5px 20px rgba(0, 168, 232, 0.5);
    transform: translateY(-2px);
    background: #00BFFF;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

#clearLogBtn {
    max-width: 150px;
}

.operation-hint {
    color: var(--text-muted);
    font-size: 0.85em;
    text-align: center;
    margin-top: 15px;
    line-height: 1.5;
}

/* 右侧内容区域 */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--glow-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
}

.section-header svg {
    width: 22px;
    height: 22px;
    color: var(--neon-green);
}

.upload-area {
    display: flex;
    gap: 12px;
}

.upload-area .btn-wide {
    flex: 1;
    min-width: 0;
    padding: 12px 20px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* 固件列表 */
.firmware-list {
    padding: 20px;
    min-height: 200px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.firmware-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.firmware-item:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.firmware-item.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.firmware-info {
    flex: 1;
}

.firmware-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.firmware-meta {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.firmware-actions {
    display: flex;
    gap: 8px;
}

.firmware-actions .btn {
    width: auto;
    padding: 8px 16px;
    margin: 0;
}

.empty-firmware {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* 系统日志 */
.terminal {
    background: #000;
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.terminal-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.terminal-content span {
    display: block;
}

.log-info {
    color: var(--neon-green);
}

.log-error {
    color: var(--danger);
}

.log-warning {
    color: var(--warning);
}

.log-success {
    color: var(--neon-blue);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: 2;
    }
    
    .content-area {
        order: 1;
    }
    
    .navbar-spacer {
        display: none;
    }
}

@media (max-width: 768px) {
    .device-title h1 {
        font-size: 1.3em;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .upload-area {
        width: 100%;
    }
    
    .firmware-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .firmware-actions {
        width: 100%;
    }
    
    .firmware-actions .btn {
        flex: 1;
    }
}

/* GitHub Release 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-header svg {
    width: 24px;
    height: 24px;
    color: var(--neon-green);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* GitHub 模态框特殊样式 */
.github-modal .modal-body {
    padding-top: 40px;
}

.github-modal .form-group:first-child {
    margin-top: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    width: auto;
    margin: 0;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input {
    flex: 1;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-top: 8px;
}

/* Release 列表 */
.releases-list {
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.release-item {
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.release-item:last-child {
    margin-bottom: 0;
}

.release-item:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.release-item.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.release-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
}

.release-tag {
    color: var(--neon-blue);
    font-size: 0.85em;
    font-family: monospace;
}

.release-date {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.release-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--neon-green);
    color: var(--bg-primary);
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
}

.release-badge.prerelease {
    background: var(--warning);
}

/* Assets 列表 */
.assets-list {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asset-item:last-child {
    margin-bottom: 0;
}

.asset-item:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.asset-item.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.asset-info {
    flex: 1;
}

.asset-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 4px;
}

.asset-size {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.asset-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.asset-item.selected .asset-checkbox {
    background: var(--neon-green);
    border-color: var(--neon-green);
}

.asset-checkbox::after {
    content: '✓';
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.asset-item.selected .asset-checkbox::after {
    opacity: 1;
}

/* 加载状态 */
.loading-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-secondary);
    justify-content: center;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .input-with-button .btn {
        width: 100%;
    }
}

/* 页脚样式 */
.page-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 25px 30px;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.footer-tech {
    font-size: 0.95em !important;
}

.footer-tech .highlight {
    color: var(--neon-green);
    font-weight: 700;
    font-family: monospace;
}

.footer-info {
    color: var(--text-muted) !important;
    font-size: 0.85em !important;
    font-family: monospace;
}

.footer-brand {
    margin-top: 12px !important;
    font-size: 0.95em !important;
}

.footer-brand .brand-name {
    color: var(--neon-green);
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-footer {
        padding: 20px;
    }
    
    .footer-content p {
        font-size: 0.85em;
    }
    
    .footer-brand .brand-name {
        font-size: 1em;
    }
}

/* 烧录进度条样式 */
.progress-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.progress-info span:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.progress-info span:last-child {
    color: var(--neon-green);
    font-weight: 700;
    font-family: monospace;
    font-size: 1.1em;
}

.progress-bar-wrapper {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--neon-green) 0%, 
        #00cc6a 50%, 
        var(--neon-green) 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 2s infinite;
}

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

/* 进度条动画效果 */
.progress-bar.active {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 0 10px rgba(0, 255, 136, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(0, 255, 136, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}


/* GitHub 下载进度条样式 */
.download-progress {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff 0%, #00a8cc 100%);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.3s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* 进度条动画效果 */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

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

/* 不同阶段的颜色 */
.progress-fill.downloading {
    background: linear-gradient(90deg, #00d9ff 0%, #0099ff 100%);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

.progress-fill.extracting {
    background: linear-gradient(90deg, #ffa500 0%, #ff8c00 100%);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.6);
}

.progress-fill.matching {
    background: linear-gradient(90deg, #ffcc00 0%, #ffaa00 100%);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}

.progress-fill.complete {
    background: linear-gradient(90deg, #00ff88 0%, #00cc6a 100%);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
}

.progress-fill.error {
    background: linear-gradient(90deg, #ff6b6b 0%, #cc0000 100%);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.6);
}

.progress-text {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #00d9ff;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.progress-status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 进度条淡入淡出动画 */
.download-progress {
    animation: fadeIn 0.3s ease-in-out;
}

.download-progress.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 下载按钮状态 */
#downloadAssetBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#downloadAssetBtn.downloading {
    background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
    animation: buttonPulse 1.5s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 153, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 153, 255, 0.8);
    }
}

/* Loading 图标旋转动画 */
.loading-icon {
    display: inline-block;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 按钮点击反馈动画 */
.btn.btn-success:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.btn.btn-success.downloading {
    animation: button-pulse 1.5s ease-in-out infinite;
}

@keyframes button-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
    }
}

/* 进度条容器增强 */
.download-progress {
    margin-top: 0;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-progress.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ==================== 驱动安装卡片样式 ==================== */

.driver-card {
    border: 2px solid rgba(0, 217, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(0, 255, 136, 0.05));
}

.driver-card .card-header {
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.driver-status {
    margin-bottom: 20px;
}

.driver-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 217, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    margin-bottom: 15px;
}

.driver-info .info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--neon-blue);
    margin-top: 2px;
}

.driver-info p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.driver-detect {
    padding: 12px 15px;
    background: rgba(30, 36, 51, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(95, 99, 104, 0.3);
}

.detect-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detect-label {
    font-size: 13px;
    color: var(--text-muted);
}

.detect-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.detect-value.detected {
    color: var(--success);
}

.detect-value.not-detected {
    color: var(--warning);
}

.detect-value.checking {
    color: var(--neon-blue);
    animation: pulse 1.5s ease-in-out infinite;
}

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

.driver-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-info {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 217, 255, 0.1));
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
}

.btn-info:hover {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(0, 217, 255, 0.2));
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
    transform: translateY(-2px);
}

.btn-info:active {
    transform: translateY(0);
}

/* 驱动下载按钮动画 */
.btn-info.downloading {
    animation: download-pulse 1.5s ease-in-out infinite;
}

@keyframes download-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .driver-card {
        margin-bottom: 20px;
    }
    
    .driver-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .driver-info .info-icon {
        margin-top: 0;
    }
}

/* 语言切换器样式 */
.language-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
}

.lang-btn:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.lang-icon {
    width: 20px;
    height: 20px;
    color: var(--neon-green);
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.lang-btn.active .dropdown-icon {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    min-width: 200px;
    display: none;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--bg-secondary);
    color: var(--neon-green);
}

.lang-option.active {
    background: var(--bg-secondary);
    color: var(--neon-green);
    font-weight: 700;
}

.lang-code {
    font-size: 0.75em;
    font-weight: 600;
}

/* 烧录教程按钮 */
.tutorial-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: #00ff88;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.tutorial-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

.tutorial-icon {
    width: 20px;
    height: 20px;
}

/* 教程弹窗 */
.tutorial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tutorial-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tutorial-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2);
    animation: slideUp 0.3s ease;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 255, 136, 0.05);
}

.tutorial-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #00ff88;
    margin: 0;
    font-family: inherit;
}

.tutorial-close {
    background: none;
    border: none;
    color: #00ff88;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tutorial-close:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: rotate(90deg);
}

.tutorial-close svg {
    width: 24px;
    height: 24px;
}

.tutorial-body {
    padding: 32px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.tutorial-body::-webkit-scrollbar {
    width: 8px;
}

.tutorial-body::-webkit-scrollbar-track {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 4px;
}

.tutorial-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

.tutorial-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

.tutorial-step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    animation: fadeInStep 0.5s ease;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #0a0e27;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #00ff88;
    margin: 0 0 12px 0;
    font-family: inherit;
}

.step-content p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-family: inherit;
    font-weight: 400;
}

.tutorial-tips {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
}

.tutorial-tips h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffa500;
    margin: 0 0 16px 0;
    font-family: inherit;
}

.tutorial-tips ul {
    margin: 0;
    padding-left: 20px;
}

.tutorial-tips li {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-family: inherit;
    font-weight: 400;
}

.tutorial-tips li:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tutorial-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .tutorial-header {
        padding: 16px 20px;
    }
    
    .tutorial-header h2 {
        font-size: 20px;
    }
    
    .tutorial-body {
        padding: 20px;
    }
    
    .tutorial-step {
        gap: 12px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .step-content h3 {
        font-size: 16px;
    }
    
    .step-content p {
        font-size: 13px;
    }
    
    .tutorial-btn span {
        display: none;
    }
}
