/* TCFX VMod V3 Programmer - Dual Flash Edition Styles */

/* Base Styles */
body {
    background-color: #1a1b1c;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e0e0e0;
}

.app_body {
    color: #fff;
    background-color: #1a1b1c;
    max-width: 700px;
    padding: 20px;
}

/* Header */
.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #888;
    font-size: 1rem;
    margin: 0;
}

/* App Wrapper */
.app-wrapper {
    min-height: 100vh;
    background-color: #1a1b1c;
}

/* Site Header */
.site-header {
    background: #000000;
    border-bottom: 1px solid #3a3b3d;
    padding: 20px 0;
    width: 100%;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app_body {
    color: #fff;
    background-color: #1a1b1c;
    max-width: 700px;
    padding: 20px;
}

/* TCFX Logo */
.tcfx-logo {
    font-family: 'Vibro', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 2px;
    display: inline-block;
    transition: color 0.2s ease;
}

.tcfx-logo:hover {
    color: #4a9eff;
    text-decoration: none;
}

/* Header Navigation */
.header-nav {
    display: flex;
    gap: 8px;
}

.header-nav a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.header-nav a:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
}

@media (max-width: 600px) {
    .header-nav {
        display: none;
    }
    
    .header-content {
        justify-content: center;
    }
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 0 20px;
    margin-bottom: 20px;
}

.stepper-line {
    position: absolute;
    top: 18px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #404040;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    min-width: 80px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #404040;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step.active .step-number {
    background: #4a9eff;
    color: white;
    border-color: #4a9eff;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.4);
}

.step.completed .step-number {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.step-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.step.active .step-label,
.step.completed .step-label {
    color: #fff;
}

/* Main Content Cards */
.app_column {
    background: linear-gradient(180deg, #2a2b2d 0%, #232426 100%);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #3a3b3d;
    margin-bottom: 15px;
}

.step-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-icon {
    font-size: 1.5rem;
}

/* Instructions Box */
.instructions-box {
    background: #1e1f21;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 3px solid #4a9eff;
}

.instructions-box h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #4a9eff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions-box ol {
    margin: 0;
    padding-left: 20px;
}

.instructions-box li {
    margin-bottom: 8px;
    color: #ccc;
    line-height: 1.5;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #1e1f21;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.connection-status.connected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.connection-status.connected .status-indicator {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse 2s infinite;
}

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

/* Device Info Box */
.device-info-box {
    background: #1e1f21;
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 15px;
    border: 1px solid #333;
}

.device-info-box h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
}

.device-info-box p {
    margin: 0;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #4a9eff;
}

/* Button Styles */
.button-group {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-es {
    background: linear-gradient(135deg, #4a9eff 0%, #3a7ed9 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.btn-es:hover:not(:disabled) {
    background: linear-gradient(135deg, #5aacff 0%, #4a8ee9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.btn-es:disabled {
    background: #404040;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-light {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-outline-light:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: #666;
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2dd66b 0%, #1cb858 100%);
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.nav-buttons.center {
    justify-content: center;
}

/* Help Section */
.help-toggle {
    text-align: center;
    margin-top: 15px;
}

.help-toggle .btn-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.help-toggle .btn-link:hover {
    color: #4a9eff;
}

.help-section {
    background: #1e1f21;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.help-section h3 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #fff;
}

.help-item {
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 2px solid #333;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-link {
    color: #4a9eff;
    text-decoration: none;
    display: block;
    margin-top: 5px;
}

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

/* Firmware Selector */
.firmware-selector {
    margin-bottom: 20px;
}

.firmware-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #888;
}

.firmware-dropdown {
    background: #1e1f21;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.firmware-dropdown:hover {
    border-color: #555;
}

.firmware-dropdown:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.firmware-dropdown option {
    background: #1e1f21;
    color: #fff;
}

/* Firmware Details Card */
.firmware-details {
    margin-bottom: 20px;
}

.firmware-card {
    background: #1e1f21;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
}

.firmware-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #fff;
}

.firmware-description {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.firmware-files {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #252628;
    padding: 12px 15px;
    border-radius: 8px;
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.badge-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

.badge-file {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #ccc;
}

.badge-status {
    font-size: 0.8rem;
    color: #666;
    padding: 4px 10px;
    background: #1a1b1c;
    border-radius: 4px;
}

.badge-status.loaded {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

/* Info Callout */
.info-callout {
    display: flex;
    gap: 12px;
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
}

.callout-content strong {
    display: block;
    margin-bottom: 4px;
    color: #4a9eff;
}

.callout-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
}

/* Error Callout */
.error-callout {
    display: flex;
    gap: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-callout .callout-content strong {
    color: #ef4444;
}

/* Flash Status Card */
.flash-status-card {
    background: #1e1f21;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.flash-status-card.flashing {
    border-color: #4a9eff;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.15);
}

.flash-status-card.complete {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

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

.flash-target {
    display: flex;
    align-items: center;
    gap: 12px;
}

.target-icon {
    font-size: 1.5rem;
}

.target-info {
    display: flex;
    flex-direction: column;
}

.target-name {
    font-weight: 600;
    color: #fff;
}

.target-address {
    font-size: 0.8rem;
    color: #666;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.flash-file {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #888;
    background: #252628;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #22c55e 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    min-width: 45px;
    text-align: right;
}

/* Flash Messages */
.flash-message {
    text-align: center;
    padding: 10px;
}

.success-message {
    color: #22c55e;
    font-weight: 600;
}

.flashing-message {
    color: #4a9eff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ready-message {
    color: #666;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 6px;
}

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

/* Log Container */
.log-container {
    background: #151617;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #2a2b2c;
}

.log-header {
    background: #1e1f21;
    padding: 10px 15px;
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2b2c;
}

.log {
    padding: 15px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    max-height: 150px;
    overflow-y: auto;
    color: #888;
}

.log p {
    margin: 0 0 6px 0;
}

.log p.info {
    color: #888;
}

.log p.success {
    color: #22c55e;
}

.log p.warning {
    color: #f59e0b;
}

.log p.error {
    color: #ef4444;
}

/* Completion Screen */
.completion-screen {
    text-align: center;
}

.completion-header {
    margin-bottom: 30px;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.completion-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    justify-content: center;
}

.completion-subtitle {
    color: #888;
    font-size: 1rem;
}

.completion-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    margin: 0 auto 30px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e1f21;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: left;
}

.summary-item.success {
    border-left: 3px solid #22c55e;
}

.summary-icon {
    font-size: 1.25rem;
    color: #22c55e;
}

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-weight: 600;
    color: #fff;
}

.summary-detail {
    font-size: 0.85rem;
    color: #666;
}

.next-steps-box {
    background: #1e1f21;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.next-steps-box h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #fff;
}

.next-steps-box ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps-box li {
    margin-bottom: 10px;
    color: #aaa;
    line-height: 1.5;
}

/* Warning Banner */
.warning-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    z-index: 1000;
    max-width: 90%;
}

.warning-icon {
    font-size: 1.2rem;
}

.warning-banner .btn-warning {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* Tables (for compatibility) */
table {
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #444;
}

code.language-cpp {
    color: #4a9eff;
}

/* Select focus styling */
select:focus-visible {
    outline: 2px solid #4a9eff !important;
    outline-offset: 0px !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1b1c;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Reboot Waiting Overlay */
.reboot-overlay {
    background: rgba(26, 27, 28, 0.95);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.reboot-content h3 {
    margin: 20px 0 10px;
    color: #fff;
}

.reboot-content p {
    color: #888;
    margin-bottom: 5px;
}

.reboot-instruction {
    color: #4a9eff !important;
    font-weight: 500;
    margin-top: 15px !important;
}

.reboot-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #333;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.reboot-steps {
    margin: 25px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.reboot-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #252628;
    border-radius: 8px;
    margin-bottom: 8px;
    color: #666;
    transition: all 0.3s ease;
}

.reboot-step.active {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.step-num {
    width: 24px;
    height: 24px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.reboot-step.active .step-num {
    background: #4a9eff;
    color: #fff;
}

/* Reconnect Prompt */
.reconnect-prompt {
    text-align: center;
    padding: 40px;
    background: #1e1f21;
    border-radius: 12px;
    margin-bottom: 20px;
}

.reconnect-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.reconnect-prompt h3 {
    margin: 0 0 10px;
    color: #fff;
}

.reconnect-prompt p {
    color: #888;
    margin-bottom: 20px;
}

/* Warning Callout */
.warning-callout {
    display: flex;
    gap: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning-callout .callout-content strong {
    color: #f59e0b;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app_body {
        max-width: 100%;
        padding: 10px;
    }
    
    .stepper {
        padding: 0;
    }
    
    .step {
        min-width: 60px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .flash-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-buttons button {
        width: 100%;
    }
}
/* Browser Compatibility Warning */
.browser-warning {
    background: linear-gradient(135deg, #3d2020 0%, #2a1515 100%);
    border: 1px solid #ff4444;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.browser-warning-content {
    max-width: 500px;
    margin: 0 auto;
}

.browser-warning .warning-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.browser-warning h3 {
    color: #ff6b6b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.browser-warning p {
    color: #ccc;
    margin-bottom: 1rem;
}

.browser-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.browser-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid #4a9eff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.browser-link:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

.browser-link .browser-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.browser-link .browser-note {
    color: #888;
    font-size: 0.85rem;
}

.browser-note-footer {
    color: #888 !important;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    font-style: italic;
}