/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* SpaceX Color Palette - Pure Black & White */
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #005288;
    --success: #00ff00;
    --warning: #ffcc00;
    --danger: #ff0000;
    --dark-bg: #000000;
    --card-bg: #000000;
    --border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --shadow: rgba(0, 0, 0, 0.5);
    --hover-bg: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ANIMATED BACKGROUND ===== */
.stars, .twinkling {
    display: none; /* SpaceX style - pure black */
}

/* ===== HEADER ===== */
.header {
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo svg {
    stroke: #ffffff;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 0;
    transition: opacity 0.2s;
    position: relative;
}

.nav-link::before {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    opacity: 0.6;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: var(--warning);
}

.status-dot.connected {
    background: #00ff00;
}

/* ===== MISSION BANNER ===== */
.mission-banner {
    padding: 60px 0 40px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mission-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 6px;
    margin-bottom: 12px;
    color: #ffffff;
    text-transform: uppercase;
}

.mission-subtitle {
    font-size: 14px;
    color: #a0a0a0;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

.mission-time {
    display: flex;
    gap: 30px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.time-label {
    font-size: 10px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-weight: 400;
}

.time-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 2px;
}

/* ===== DASHBOARD ===== */
.dashboard {
    padding: 30px 0 60px;
}

/* ===== STATUS PANEL ===== */
.status-panel {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 30px;
}

.status-panel::before {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    letter-spacing: 3px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
    text-transform: uppercase;
}

.status-badge.warning {
    background: transparent;
    color: #ffcc00;
    border-color: #ffcc00;
}

.status-badge.danger {
    background: transparent;
    color: #ff0000;
    border-color: #ff0000;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.status-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s;
}

.status-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.2);
    transform: none;
    box-shadow: none;
}

.status-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    border: none;
}

.status-icon svg {
    color: #ffffff;
    filter: none;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.status-value.abnormal {
    color: #ff0000;
}

.status-value.warning {
    color: #ffcc00;
}

/* ===== TELEMETRY GRID ===== */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.telemetry-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 30px;
    box-shadow: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.telemetry-card::before {
    display: none;
}

.telemetry-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    transform: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.card-header::after {
    display: none;
}

.card-header h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    letter-spacing: 2.5px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
}

.card-badge {
    font-size: 10px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ===== SENSOR READINGS ===== */
.sensor-readings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reading-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reading-label {
    font-size: 12px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
}

.reading-unit {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.reading-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: none;
    letter-spacing: 0;
}

.reading-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.reading-bar::before {
    display: none;
}

.bar-fill {
    height: 100%;
    background: #ffffff;
    transition: width 0.6s ease;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

.bar-fill.warning {
    background: #ffcc00;
}

.bar-fill.danger {
    background: #ff0000;
}

/* ===== AI CARD ===== */
.ai-card {
    grid-column: span 2;
}

.ai-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-model {
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.model-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.model-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
}

.result-value.abnormal {
    color: var(--danger);
}

.confidence {
    font-size: 14px;
    color: var(--text-secondary);
}

.windows-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.window-item {
    padding: 12px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.window-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.window-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* ===== ALERTS PANEL ===== */
.alerts-panel {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 30px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.alerts-panel::before {
    display: none;
}

.clear-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.alert-item {
    padding: 18px 20px;
    border-left: 2px solid #ffffff;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
    transition: all 0.2s;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-left-color: #ffffff;
    transform: none;
}

.alert-item.warning {
    border-left-color: #ffcc00;
}

.alert-item.danger {
    border-left-color: #ff0000;
}

.alert-item.success {
    border-left-color: #00ff00;
}

.alert-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0;
}

.alert-icon svg {
    color: #ffffff;
}

.alert-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-title {
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
}

.alert-time {
    font-size: 11px;
    color: #808080;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
}

/* ===== FOOTER ===== */
.footer {
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    text-align: center;
}

.footer p {
    font-size: 11px;
    color: #808080;
    margin: 6px 0;
    letter-spacing: 1px;
}

/* ===== PERFORMANCE STATS SECTION ===== */
.stats-section {
    padding: 60px 0;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    letter-spacing: 4px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 0;
}

.stat-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 11px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 400;
}

.stat-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-value.success {
    color: #00ff00;
}

.stat-value.warning {
    color: #ffcc00;
}

.stat-value.danger {
    color: #ff0000;
}

.stat-change {
    font-size: 10px;
    color: #606060;
    letter-spacing: 1px;
}

/* ===== CHART SECTION ===== */
.chart-section {
    padding: 60px 0;
    background: #000000;
}

.chart-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #808080;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.chart-btn:hover,
.chart-btn.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
    color: #ffffff;
}

/* Constrain chart height via wrapper so Chart.js respects it */
.chart-canvas {
    position: relative;
    height: 220px; /* Fixed height container for the chart */
    margin: 30px 0;
}

#dataChart {
    width: 100% !important;
    height: 100% !important; /* Fill the wrapper height */
    display: block;
}

canvas {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.chart-legend {
    text-align: center;
    font-size: 10px;
    color: #606060;
    letter-spacing: 1px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== LOG SECTION ===== */
.log-section {
    padding: 60px 0 80px;
    background: #000000;
}

.log-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
}

.log-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.log-filter {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #808080;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.log-filter:hover,
.log-filter.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
    color: #ffffff;
}

.export-btn {
    padding: 8px 20px;
    background: #ffffff;
    border: none;
    color: #000000;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-left: auto;
}

.export-btn:hover {
    background: #cccccc;
}

.log-table-wrapper {
    margin-top: 30px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    /* Enable hardware acceleration */
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
}

.log-table thead {
    position: sticky;
    top: 0;
    background: #000000;
    z-index: 10;
}

.log-table th {
    padding: 15px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.log-table td {
    padding: 15px 12px;
    font-size: 12px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-table tbody tr {
    transition: all 0.2s;
}

.log-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.log-table .event-badge {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
}

.log-table .event-badge.normal {
    color: #00ff00;
    border-color: #00ff00;
}

.log-table .event-badge.anomaly {
    color: #ff0000;
    border-color: #ff0000;
}

.log-table .event-badge.alert {
    color: #ffcc00;
    border-color: #ffcc00;
}

.log-table .status-indicator {
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 8px;
}

.log-table .status-indicator.ok {
    background: #00ff00;
}

.log-table .status-indicator.warning {
    background: #ffcc00;
}

.log-table .status-indicator.critical {
    background: #ff0000;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .ai-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .mission-banner .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .mission-time {
        flex-direction: column;
        gap: 15px;
    }
    
    .time-block {
        align-items: center;
    }
    
    .nav {
        display: none;
    }
    
    .telemetry-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-canvas { height: 180px; } /* Further reduced for mobile */
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .header { padding: 12px 0; }
    .mission-banner { padding: 36px 0 24px; }

    .mission-title {
        font-size: 28px;
        letter-spacing: 3px;
    }
    .mission-subtitle { font-size: 12px; letter-spacing: 2px; }
    .time-value { font-size: 22px; }

    .status-panel,
    .telemetry-card,
    .chart-card,
    .log-card,
    .alerts-panel { padding: 16px; }

    .status-card { padding: 16px; gap: 12px; }
    .status-icon { width: 36px; height: 36px; }
    .status-value { font-size: 18px; }
    .status-label { font-size: 11px; }
    .panel-header h2 { font-size: 14px; }

    .card-header { margin-bottom: 16px; padding-bottom: 12px; }
    .card-badge { font-size: 9px; padding: 3px 8px; }

    .sensor-readings { gap: 14px; }
    .reading-value { font-size: 28px; }

    .stats-section { padding: 36px 0; }
    .stat-card { padding: 16px 12px; }
    .stat-label { font-size: 10px; }
    .stat-value { font-size: 28px; }
    .stat-change { font-size: 9px; }

    .chart-controls, .log-controls { gap: 8px; }
    .chart-btn, .log-filter { padding: 6px 12px; font-size: 10px; }
    .export-btn { padding: 6px 12px; font-size: 10px; }

    .alert-item { padding: 12px 14px; }
    .alert-title { font-size: 12px; }
    .alert-time { font-size: 10px; }
}

/* Very small phones */
@media (max-width: 360px) {
    .mission-title { font-size: 24px; }
    .reading-value { font-size: 24px; }
    .stat-value { font-size: 24px; }
    .chart-canvas { height: 160px; }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimize paint and composite layers */
.telemetry-card,
.status-card,
.stat-card {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Optimize chart rendering */
.chart-section {
    contain: layout style paint;
}

/* ===== WEBSOCKET SETTINGS PANEL ===== */
.ws-settings-panel {
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 20px;
}

.ws-settings-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ws-settings-panel .panel-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    margin: 0;
}

.ws-settings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ws-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.ws-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    color: #ffffff;
    font-family: 'Rajdhani', monospace;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ws-input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.ws-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ws-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ws-button-group button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ws-button-group button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ws-button-group button:hover::before {
    left: 100%;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-accent {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.btn-accent::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-accent:hover::after {
    width: 300px;
    height: 300px;
}

.btn-accent:hover {
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.ws-info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.info-steps {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.8;
}

.info-steps li {
    margin-bottom: 4px;
}

.info-steps code {
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00ff00;
}

#wsConfigStatus {
    font-size: 11px;
    padding: 4px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ws-button-group {
        flex-direction: column;
    }
    
    .ws-button-group button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== CUBESAT 3D VISUALIZATION ===== */
.cubesat-section {
    margin-bottom: 24px;
}

.cubesat-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 20px;
}

.cubesat-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 12px;
}

.cubesat-card .card-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    margin: 0;
}

.cubesat-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.gyro-value {
    font-family: 'Rajdhani', monospace;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.gyro-value span {
    color: #ffffff;
    font-weight: 700;
}

.cubesat-canvas-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

#cubesatCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.cubesat-legend {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.axis-label {
    font-family: 'Rajdhani', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.axis-x {
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.5);
}

.axis-y {
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.5);
}

.axis-z {
    color: #0088ff;
    border-color: rgba(0, 136, 255, 0.5);
}

@media (max-width: 768px) {
    .cubesat-canvas-container {
        height: 350px;
    }
    
    .cubesat-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .cubesat-legend {
        top: 8px;
        right: 8px;
        gap: 4px;
    }
    
    .axis-label {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ===== CUBESAT 3D MODEL SECTION ===== */
.cubesat-section {
    padding: 30px 0;
}

.cubesat-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 30px;
}

.cubesat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cubesat-model {
    width: 100%;
    height: 400px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cubesat-model::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.cubesat-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.orientation-data {
    display: flex;
    gap: 30px;
}

.orientation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.orientation-label {
    font-size: 11px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.orientation-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.cubesat-buttons {
    display: flex;
    gap: 15px;
}

/* 3D Cube Styles */
.cube-container {
    width: 100%;
    height: 100%;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cube {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cube-face::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.cube-face.front  { transform: rotateY(0deg) translateZ(75px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(75px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(75px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(75px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(75px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(75px); }

/* Solar Panels */
.solar-panel {
    position: absolute;
    background: linear-gradient(45deg, #005288, #00a8ff);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.solar-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 4px,
            rgba(255, 255, 255, 0.2) 4px,
            rgba(255, 255, 255, 0.2) 6px
        );
}

.solar-panel.top {
    width: 180px;
    height: 20px;
    top: -40px;
    left: -15px;
}

.solar-panel.bottom {
    width: 180px;
    height: 20px;
    bottom: -40px;
    left: -15px;
}

.solar-panel.left {
    width: 20px;
    height: 180px;
    left: -40px;
    top: -15px;
}

.solar-panel.right {
    width: 20px;
    height: 180px;
    right: -40px;
    top: -15px;
}

/* Antenna */
.antenna {
    position: absolute;
    background: #ffffff;
}

.antenna.base {
    width: 4px;
    height: 30px;
    top: -35px;
    left: 73px;
}

.antenna.dish {
    width: 20px;
    height: 10px;
    top: -45px;
    left: 65px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

/* Responsive Design for Cubesat */
@media (max-width: 768px) {
    .cubesat-model {
        height: 300px;
    }
    
    .cubesat-controls {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .orientation-data {
        width: 100%;
        justify-content: space-between;
    }
    
    .cubesat-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .cube {
        width: 120px;
        height: 120px;
    }
    
    .cube-face {
        width: 120px;
        height: 120px;
    }
    
    .cube-face.front  { transform: rotateY(0deg) translateZ(60px); }
    .cube-face.back   { transform: rotateY(180deg) translateZ(60px); }
    .cube-face.right  { transform: rotateY(90deg) translateZ(60px); }
    .cube-face.left   { transform: rotateY(-90deg) translateZ(60px); }
    .cube-face.top    { transform: rotateX(90deg) translateZ(60px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(60px); }
    
    .solar-panel.top {
        width: 150px;
        height: 15px;
        top: -30px;
        left: -15px;
    }
    
    .solar-panel.bottom {
        width: 150px;
        height: 15px;
        bottom: -30px;
        left: -15px;
    }
    
    .solar-panel.left {
        width: 15px;
        height: 150px;
        left: -30px;
        top: -15px;
    }
    
    .solar-panel.right {
        width: 15px;
        height: 150px;
        right: -30px;
        top: -15px;
    }
    
    .antenna.base {
        left: 58px;
    }
    
    .antenna.dish {
        left: 50px;
    }
}