/* MagSpecKit - Industrial Theme Styles */
/* 石油用防爆工业磁检测仪器界面样式 */

/* ============================================
   CSS Variables - Industrial Color Palette
   ============================================ */
:root {
    --color-orange: #FF6B35;
    --color-dark-gray: #2D2D2D;
    --color-black: #000000;
    --color-deep-black: #1A1A1A;
    --color-grid: #333333;
    
    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;
    
    /* Waveform Colors */
    --color-waveform-x: #FF0000;
    --color-waveform-y: #00FF00;
    --color-waveform-z: #0066FF;
    --color-waveform-normal: #FFD700;
    --color-waveform-alert: #FF0000;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    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: var(--color-black);
    color: #E5E7EB;
    overflow: hidden;
}

/* ============================================
   Industrial UI Components
   ============================================ */

/* Orange Border Effect - Industrial Signature */
.industrial-border {
    border: 2px solid var(--color-orange);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.industrial-border-glow {
    border: 2px solid var(--color-orange);
    box-shadow: 
        0 0 10px rgba(255, 107, 53, 0.5),
        0 0 20px rgba(255, 107, 53, 0.3),
        inset 0 0 10px rgba(255, 107, 53, 0.1);
}

/* Button Styles - Large touch targets for gloved hands */
.btn-industrial {
    min-width: 60px;
    min-height: 60px;
    background: var(--color-dark-gray);
    border: 2px solid var(--color-orange);
    border-radius: 10px;
    color: var(--color-orange);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    user-select: none;
}

.btn-industrial:hover {
    background: var(--color-orange);
    color: var(--color-black);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
}

.btn-industrial:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

.btn-industrial:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--color-dark-gray);
    color: #666;
    border-color: #666;
}

.btn-industrial:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Status Indicator */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background-color: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-indicator.disconnected {
    background-color: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
}

.status-indicator.warning {
    background-color: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   Waveform Display Area
   ============================================ */
.waveform-container {
    background: var(--color-black);
    border: 2px solid var(--color-orange);
    position: relative;
    overflow: hidden;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    background: var(--color-black);
}

/* Grid Lines for Waveform */
.waveform-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(var(--color-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* ============================================
   Data Table Styles
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: var(--color-dark-gray);
    color: var(--color-orange);
    font-weight: bold;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-grid);
}

.data-table tbody tr:hover {
    background: rgba(255, 107, 53, 0.1);
}

.data-table tbody tr.selected {
    background: rgba(255, 107, 53, 0.2);
    border-left: 3px solid var(--color-orange);
}

/* ============================================
   Loading & Animations
   ============================================ */
.spinner {
    border: 3px solid rgba(255, 107, 53, 0.1);
    border-top-color: var(--color-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Scrollbar Styles
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-deep-black);
}

::-webkit-scrollbar-thumb {
    background: var(--color-dark-gray);
    border: 2px solid var(--color-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-orange);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .btn-industrial {
        min-width: 50px;
        min-height: 50px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .btn-industrial {
        min-width: 44px;
        min-height: 44px;
        font-size: 11px;
    }
}

/* Touch Screen Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-industrial {
        min-width: 60px;
        min-height: 60px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-orange {
    color: var(--color-orange);
}

.bg-industrial {
    background: var(--color-dark-gray);
}

.border-orange {
    border-color: var(--color-orange);
}

.shadow-orange {
    box-shadow: 0 4px 6px rgba(255, 107, 53, 0.3);
}

.glow-orange {
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* Prevent text selection on UI controls */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* High contrast for critical information */
.critical-info {
    color: var(--color-error);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

