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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}



.main-content {
    padding: 2rem 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 300;
}

.main-image {
    text-align: center;
    margin-bottom: 2rem;
}

.main-instruction-image {
    max-width: 100%;
    width: 900px;
    height: auto;
    border-radius: 8px;
}

.update-info {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 2rem;
}

.update-date {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.important-notes ul {
    list-style: none;
    padding: 0;
}

.important-notes li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: #ddd;
}

.important-notes li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.link {
    color: #007bff;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.connection-section {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 2rem;
}

.connection-section h2 {
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 400;
    font-size: 1.5rem;
}

/* 左右布局容器 */
.instruction-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.instruction-text {
    flex: 1;
}

.instruction-image {
    flex: 0 0 auto;
    max-width: 400px;
}

.connection-instruction {
    margin-bottom: 0;
    line-height: 1.6;
    color: #ccc;
}

.joydock-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .instruction-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .instruction-image {
        max-width: 100%;
    }
}

/* 连接步骤checklist样式 */
.connection-steps {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-steps h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 16px;
}

.step-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.step-item.active {
    background: rgba(34, 139, 34, 0.2);
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.step-item.completed {
    background: rgba(34, 139, 34, 0.3);
    border: 1px solid rgba(34, 139, 34, 0.5);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: #228B22;
    color: #ffffff;
}

.step-item.completed .step-number {
    background: #32CD32;
    color: #ffffff;
}

.step-item.completed .step-number::before {
    content: "✓";
    font-size: 14px;
}

.step-item.completed .step-number {
    font-size: 0;
}

.step-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.step-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step-subtitle {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 0.2rem;
}

.step-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.step-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.step-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.step-upgrade-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.progress-container-step {
    width: 150px;
}

.step-title {
    color: #ffffff;
    font-weight: 500;
}

.step-status {
    font-size: 12px;
    color: #cccccc;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.step-item.active .step-status {
    color: #32CD32;
    background: rgba(50, 205, 50, 0.2);
}

.step-item.completed .step-status {
    color: #32CD32;
    background: rgba(50, 205, 50, 0.3);
}

.device-status-container {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.device-image {
    flex: 1;
}

.instruction-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    /* border: 1px solid #333; */
}

.device-status {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 200px;
    justify-content: center;
}

.device-selection {
    padding: 1rem 0;
}

.button-area {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* 升级进度区域样式 */
.upgrade-progress-area {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(34, 139, 34, 0.1);
    border: 1px solid rgba(34, 139, 34, 0.3);
    border-radius: 8px;
    animation: progressAreaFadeIn 0.3s ease-in-out;
}

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

.upgrade-status-text {
    font-size: 1rem;
    color: #32CD32;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.progress-container-enhanced {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 6px;
}

.progress-bar-enhanced {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill-enhanced {
    height: 100%;
    background: linear-gradient(90deg, #32CD32, #228B22);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.3);
    position: relative;
}

.progress-fill-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShimmer 2s infinite;
}

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

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: bold;
    color: #32CD32;
}

.progress-details {
    font-size: 0.9rem;
    color: #ccc;
}

.device-info {
    text-align: center;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}

.device-info h3 {
    margin: 0 0 1rem 0;
    color: #28a745;
    font-size: 1.2rem;
}

.device-info p {
    margin: 0.5rem 0;
    color: #ccc;
}

/* 设备连接成功后的固件选择区域样式 */
.firmware-selection-connected {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.firmware-selection-connected h4 {
    margin: 0 0 1rem 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
}

.update-controls-connected {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.warning-box-connected {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    color: #ffc107;
    font-size: 0.9rem;
}

.warning-box-connected p {
    margin: 0.2rem 0;
}

.progress-container-connected {
    margin-top: 1rem;
}

.connect-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 120px;
}

.connect-button:hover {
    background-color: #0056b3;
}

.disconnect-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 120px;
}

.disconnect-button:hover {
    background-color: #c82333;
}

.connecting {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ccc;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.firmware-section {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.firmware-section h2 {
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 400;
    font-size: 1.5rem;
}

.warning-box {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ffc107;
}

.warning-box p {
    margin: 0;
}

.firmware-info {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
}

.firmware-info p {
    margin: 0.75rem 0;
    color: #ddd;
}

.firmware-info span {
    color: #fff;
    font-weight: 500;
}

.firmware-selection {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
}

.firmware-selection h3 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-weight: 400;
    font-size: 1.1rem;
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-input-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    min-width: 120px;
    text-align: center;
    border: none;
}

.file-input-label:hover {
    background-color: #0056b3;
}

.selected-file {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    min-width: 120px;
}

.file-name {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clear-file {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    padding: 0 5px;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1;
}

.clear-file:hover {
    color: #ff0000;
}

.preset-firmware-section, .custom-firmware-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #444;
}

.preset-firmware-section h4, .custom-firmware-section h4 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-weight: 400;
    font-size: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.preset-firmware-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.firmware-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.firmware-option input[type="radio"] {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
}

.firmware-option label {
    cursor: pointer;
    color: #ddd;
    line-height: 1.4;
    flex: 1;
}

.firmware-option label:hover {
    color: #fff;
}

.firmware-option label strong {
    color: #fff;
    font-size: 1rem;
}

.firmware-option label small {
    color: #999;
    font-size: 0.85rem;
    font-family: monospace;
}

.custom-firmware-section .file-input-container {
    align-items: flex-start;
    padding-left: 1.5rem;
}

.custom-firmware-section input[type="radio"] {
    margin-top: 0.5rem;
    width: 16px;
    height: 16px;
}

.update-controls {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.update-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.update-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.update-button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.progress-container {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #333;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #555;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
    border-radius: 12px;
    width: 0%;
}

.progress-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal h3 {
    margin: 0 0 1rem 0;
    color: #fff;
}

.modal p {
    margin: 0 0 2rem 0;
    color: #ccc;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-buttons button {
    padding: 8px 16px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-buttons button.primary {
    background-color: #007bff;
    border-color: #007bff;
}

.modal-buttons button:hover {
    opacity: 0.8;
}

/* 固件选择模态框样式 */
.firmware-modal {
    max-width: 500px;
}

.firmware-options-modal {
    margin: 1.5rem 0;
}

.firmware-option-modal {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.firmware-option-modal:hover {
    background: rgba(255, 255, 255, 0.05);
}

.firmware-option-modal input[type="radio"] {
    margin-right: 0.8rem;
}

.firmware-option-modal label {
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
}

.firmware-option-modal label strong {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .update-info,
    .connection-section,
    .firmware-section {
        padding: 1.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .device-status-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .device-image {
        order: 2;
    }
    
    .device-status {
        order: 1;
        min-height: auto;
    }
} 
.driver-note {
    background: rgba(44, 160, 243, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0;
    color: #ffc107;
    font-size: 14px;
    line-height: 1.5;
}

.driver-download-section {
    width: 100%;
    margin: 1.5rem 0;
    padding: 0;
}

.driver-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.driver-link:hover {
    text-decoration: underline;
}