/* Singular Value Decomposition (SVD) for MIMO Precoding Tutorial - CSS */

.svd-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Courier New', monospace;
    background-color: #000000;
    color: #ffffff;
}

.svd-displays {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-container {
    width: 100%;
}

.graph-label {
    color: #cccccc;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.visualization-container {
    width: 100%;
}

.visualization-container canvas {
    display: block;
    margin: 0 auto;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #000000;
}

.matrix-dashboard {
    background-color: #111111;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.dashboard-label {
    color: #cccccc;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.matrix-box {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 10px;
}

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

.matrix-values {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #cccccc;
    text-align: center;
    line-height: 1.8;
}

/* --- IMPROVED INPUT STYLING --- */
.matrix-input {
    width: 70px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 3px;
    
    /* Excel-style Alignment */
    text-align: right !important;
    
    /* Padding right reserves space for the spinner so text doesn't overlap */
    padding: 4px 15px 4px 4px;
    
    margin: 0 4px;
    box-sizing: border-box;
    display: inline-block;
    height: 26px; /* Fixed height for stability */
}

/* Force spinner visibility and positioning */
.matrix-input::-webkit-inner-spin-button,
.matrix-input::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    appearance: inner-spin-button;
    opacity: 1;
    cursor: pointer;
    display: block;
    width: 12px;
    margin-left: 12px; /* Spacing from text content */
}

.matrix-input:focus {
    outline: none;
    border-color: #0066cc;
    background-color: #333333;
}
/* --------------------------- */

.singular-values {
    color: #00ff00;
    font-weight: bold;
}

.svd-controls {
    background-color: #111111;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 20px;
}

.control-section {
    margin-bottom: 25px;
}

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

.section-label {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #444444;
    padding-bottom: 10px;
}

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

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

.control-row label {
    min-width: 150px;
    color: #cccccc;
    font-size: 14px;
}

.control-row input[type="range"] {
    flex: 1;
    height: 5px;
    background: #333333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
}

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

.control-row span {
    min-width: 60px;
    color: #ffffff;
    font-size: 14px;
    text-align: right;
    font-weight: bold;
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #444444;
    border-radius: 4px;
    flex-wrap: wrap;
}

.mode-toggle label {
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
}

.mode-toggle input[type="checkbox"] {
    width: 50px;
    height: 25px;
    cursor: pointer;
}

.preset-select {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    min-width: 200px;
}

.preset-select:hover {
    background-color: #333333;
}

.preset-select:focus {
    outline: none;
    border-color: #0066cc;
    background-color: #333333;
}

.preset-select option {
    background-color: #2a2a2a;
    color: #ffffff;
}

.stats-display {
    background-color: #1a1a1a;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 15px;
    margin-top: 25px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.stats-display div {
    margin-bottom: 8px;
    color: #cccccc;
}

.stats-display div:last-child {
    margin-bottom: 0;
}

.stats-display span {
    color: #ffffff;
    font-weight: bold;
}

.condition-monitor {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.condition-text {
    margin-top: 5px;
    font-weight: bold;
    font-size: 13px;
}
