/* PCA Visualization Styles */

#pca-canvas-container {
    position: relative;
    width: 750px;
    height: 600px;
    max-width: 800px;
    background: #000000;
    border: 2px solid #333;
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

#pca-simulation {
    background: #000000;
}

#pca-canvas-container canvas {
    display: block;
}

/* 2D Subplot */
.pca-subplot-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 200px;
    height: 220px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
    border-radius: 4px;
    padding: 5px;
    z-index: 50;
}

.pca-subplot-label {
    font-size: 10px;
    color: #00d4ff;
    text-align: center;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

#pca-subplot-canvas {
    display: block;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
}

/* Camera Controls */
.pca-camera-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 100;
}

.pca-camera-btn {
    width: 32px;
    height: 32px;
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid #666;
    color: #00d4ff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.pca-camera-btn:hover {
    background: rgba(70, 70, 70, 0.9);
    border-color: #00d4ff;
}

.pca-camera-btn:active {
    background: rgba(100, 100, 100, 0.9);
}

/* Control Panel */
.pca-control-panel {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background: #000000;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #00d4ff;
}

.pca-control-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.pca-control-label {
    min-width: 120px;
    color: #00d4ff;
    font-size: 12px;
}

.pca-control-btn {
    padding: 8px 16px;
    background: #333;
    border: 1px solid #666;
    color: #00d4ff;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.pca-control-btn:hover {
    background: #444;
    border-color: #00d4ff;
}

.pca-control-btn:active {
    background: #555;
}

/* Projection Mode Buttons */
.pca-projection-btn {
    padding: 6px 12px;
    background: #333;
    border: 1px solid #666;
    color: #00d4ff;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    margin-right: 5px;
    flex: 1;
}

.pca-projection-btn:hover {
    background: #444;
    border-color: #00d4ff;
}

.pca-projection-btn:active {
    background: #555;
}

.pca-projection-btn.pca-projection-active {
    background: #00d4ff;
    color: #000000;
    border-color: #00d4ff;
    font-weight: bold;
}

/* Slider */
.pca-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.pca-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
}

.pca-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.pca-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: #555;
    border-radius: 2px;
}

.pca-slider::-moz-range-track {
    height: 4px;
    background: #555;
    border-radius: 2px;
}

.pca-slider-value {
    min-width: 40px;
    text-align: right;
    color: #00d4ff;
    font-size: 12px;
}

/* Dropdown */
.pca-dropdown {
    flex: 1;
    padding: 6px 10px;
    background: #000000;
    border: 1px solid #666;
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
}

.pca-dropdown:hover {
    border-color: #00d4ff;
}

.pca-dropdown:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.pca-dropdown option {
    background: #000000;
    color: #00d4ff;
}

/* Toggle Switch */
.pca-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.pca-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pca-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid #666;
}

.pca-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #666;
    transition: 0.3s;
    border-radius: 50%;
}

.pca-toggle input:checked + .pca-toggle-slider {
    background-color: #00d4ff;
}

.pca-toggle input:checked + .pca-toggle-slider:before {
    transform: translateX(26px);
    background-color: #fff;
}

/* Variance Display */
.pca-variance-info {
    margin-top: 15px;
    padding: 10px;
    background: #000000;
    border: 1px solid #333;
    border-radius: 3px;
}

.pca-variance-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.pca-variance-label {
    width: 100px;
    color: #00d4ff;
    font-size: 12px;
    flex-shrink: 0;
}

.pca-variance-value {
    width: 60px;
    color: #00ff00;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    text-align: right;
}

.pca-variance-bar-container {
    flex: 1;
    height: 16px;
    background: #000000;
    border: 1px solid #444;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.pca-variance-bar {
    height: 100%;
    background: #00ff00;
    transition: width 0.3s;
}

.pca-variance-bar.pc1 {
    background: #ff0000;
}

.pca-variance-bar.pc2 {
    background: #00ff00;
}

.pca-variance-bar.pc3 {
    background: #0000ff;
}

/* Container for simulation */
#pca-simulation {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    background: #000000;
}

/* Status Display */
.pca-status {
    margin-top: 10px;
    padding: 8px;
    background: #000000;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 11px;
    color: #aaa;
}

/* Mathematical Information Display */
.pca-math-info {
    margin-top: 15px;
    padding: 10px;
    background: #000000;
    border: 1px solid #333;
    border-radius: 3px;
}

.pca-math-section {
    margin-bottom: 15px;
}

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

.pca-math-title {
    color: #00d4ff;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.pca-matrix-container {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #00ff00;
}

.pca-matrix {
    display: inline-block;
    padding: 5px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #333;
    border-radius: 2px;
    line-height: 1.6;
}

.pca-eigen-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pca-eigen-section {
    font-family: 'Courier New', monospace;
    font-size: 10px;
}

.pca-eigen-label {
    color: #00d4ff;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 10px;
}

.pca-eigen-values {
    color: #00ff00;
    padding: 5px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #333;
    border-radius: 2px;
    line-height: 1.8;
}

.pca-eigen-vectors {
    color: #00ff00;
    padding: 5px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #333;
    border-radius: 2px;
    line-height: 1.8;
}

.pca-matrix-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pca-matrix-cell {
    min-width: 60px;
    text-align: right;
    font-family: 'Courier New', monospace;
}
