/* MIMO Spatial Multiplexing Visualization CSS */

.mimo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    background-color: #0a0a0a;
    color: #ffffff;
    border-radius: 8px;
    position: relative;
}

/* ===== Layout ===== */
.mimo-main {
    width: 100%;
    position: relative;
}

.mimo-sidebar {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    background-color: rgba(17, 17, 17, 0.95);
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    max-height: 80vh;
    overflow-y: auto;
    align-self: flex-start;
}

.mimo-sidebar-title {
    color: #00ffff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #444444;
    padding-bottom: 8px;
}

.mimo-sidebar-text {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.mimo-sidebar-text b {
    color: #ffd700;
}

.mimo-sidebar-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

/* ===== Control Panel ===== */
.mimo-controls {
    background-color: #111111;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.mimo-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mimo-control-row:last-child {
    margin-bottom: 0;
}

.mimo-control-row label {
    color: #00ffff;
    font-size: 12px;
    width: 140px;  /* Fixed width to align all slider starts */
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;  /* Prevent label from shrinking */
}

.mimo-control-row input[type="range"] {
    flex: 1;
    min-width: 100px;
    max-width: 650px;
    height: 6px;
    background: #333333;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.mimo-control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.mimo-control-row input[type="range"]::-webkit-slider-thumb:hover {
    background: #00ffff;
    box-shadow: 0 0 8px #00ffff;
    transform: scale(1.1);
}

.mimo-control-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.mimo-control-row select {
    background-color: #1a1a1a;
    color: #00ff00;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 6px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    min-width: 140px;
}

.mimo-control-row select:hover {
    background-color: #222222;
    border-color: #666666;
}

.mimo-control-row select:focus {
    border-color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.mimo-control-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00ff00;
}

.mimo-control-value {
    color: #00ff00;
    font-size: 12px;
    min-width: 60px;
    text-align: left;
    font-family: 'Courier New', monospace;
}

.mimo-legend {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333333;
}

.mimo-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.mimo-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.mimo-legend-color.red {
    background-color: #ff0000;
}

.mimo-legend-color.blue {
    background-color: #0000ff;
}

/* ===== 3D View ===== */
#mimo-3d-view {
    width: 100%;
    height: 500px;
    min-height: 500px;
    background-color: #0a0a0a;
    border: 1px solid #444444;
    border-radius: 4px;
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

#mimo-3d-view canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.mimo-camera-presets {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-wrap: wrap;
}

.mimo-camera-btn {
    background-color: rgba(26, 26, 26, 0.9);
    color: #00ffff;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 6px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.mimo-camera-btn:hover {
    background-color: rgba(34, 34, 34, 0.95);
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.mimo-camera-btn:active {
    background-color: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.mimo-zoom-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.mimo-zoom-btn {
    background-color: rgba(26, 26, 26, 0.9);
    color: #00ffff;
    border: 1px solid #444444;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mimo-zoom-btn:hover {
    background-color: rgba(34, 34, 34, 0.95);
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.mimo-zoom-btn:active {
    background-color: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

/* Animation Control Buttons */
.mimo-step-btn,
.mimo-play-btn {
    background-color: rgba(26, 26, 26, 0.9);
    border: 1px solid #444444;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #00ffff;
    margin-left: 8px;
    vertical-align: middle;
}

.mimo-step-btn:hover,
.mimo-play-btn:hover {
    background-color: rgba(34, 34, 34, 0.95);
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.mimo-step-btn:active,
.mimo-play-btn:active {
    background-color: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.mimo-play-btn {
    color: #00ff00;
}

.mimo-play-btn:hover {
    border-color: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

/* ===== Overlays ===== */
.mimo-overlays {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.mimo-matrix-dashboard {
    background-color: rgba(17, 17, 17, 0.95);
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    width: 400px; /* Doubled from ~200px to 400px */
}

.mimo-matrix-title {
    color: #00ffff;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.mimo-matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.mimo-matrix-cell {
    background-color: #1a1a1a;
    border: 1px solid #444444;
    padding: 8px;
    text-align: center;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 180px; /* Wider to accommodate two inputs */
}

.mimo-matrix-cell.active {
    background-color: #003300;
    border-color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.mimo-spin-mag,
.mimo-spin-phase {
    background-color: #0a0a0a;
    border: 1px solid #444444;
    border-radius: 3px;
    padding: 4px 6px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    width: 60px;
    text-align: center;
    display: inline-block;
    /* Show spinner arrows - removed -moz-appearance: textfield */
}

/* Show spinner buttons for better usability */
.mimo-spin-mag::-webkit-outer-spin-button,
.mimo-spin-mag::-webkit-inner-spin-button,
.mimo-spin-phase::-webkit-outer-spin-button,
.mimo-spin-phase::-webkit-inner-spin-button {
    opacity: 1 !important;
    height: 20px;
    cursor: pointer;
    display: block;
}

.mimo-spin-mag:focus,
.mimo-spin-phase:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.mimo-euler-sep {
    color: #00ffff;
    font-size: 14px;
    font-weight: bold;
    margin: 0 2px;
}

#mimo-constellation {
    width: 300px;
    height: 300px;
    background-color: #000000;
    border: 1px solid #444444;
    border-radius: 4px;
}

/* ===== Buttons ===== */
.mimo-btn {
    background-color: #1a1a1a;
    color: #00ffff;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.mimo-btn:hover {
    background-color: #222222;
    border-color: #00ffff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.mimo-btn:active {
    background-color: #2a2a2a;
}

.mimo-btn.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    }
}

/* ===== Sidebar Navigation ===== */
.mimo-sidebar-btn {
    background-color: #1a1a1a;
    color: #00ffff;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 6px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.mimo-sidebar-btn:hover {
    background-color: #222222;
    border-color: #00ffff;
}

.mimo-sidebar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Highlight for Lab Manual ===== */
.mimo-highlight {
    animation: highlight 1s infinite;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

@keyframes highlight {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}
