/**
 * Main styles for Diffusive Transistor Simulation
 * Nature-style schematic visualization
 */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Arial', 'Helvetica', sans-serif;
    overflow: hidden;
    background: #ffffff;
    color: #333333;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 0;
    border: 2px solid #333333;
    max-width: 360px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#info-panel h1 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333333;
    border-bottom: 3px solid #1f77b4;
    padding-bottom: 8px;
    font-weight: bold;
}

#info-panel p {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 6px;
    color: #333333;
}

#info-panel .highlight {
    color: #d62728;
    font-weight: bold;
}

#info-panel .param {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 2px;
    margin: 0 4px;
}

#stats {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 0;
    border: 2px solid #333333;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
}

#stats div {
    margin: 6px 0;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 0;
    border: 2px solid #333333;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

button {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 10px 15px;
    background: #ffffff;
    color: #333333;
    border: 2px solid #333333;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
    transition: all 0.2s ease;
}

button:hover {
    background: #333333;
    color: #ffffff;
}

button:active {
    transform: scale(0.98);
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 40px;
    border: 3px solid #333333;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#loading h2 {
    color: #333333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.spinner {
    border: 4px solid #e0e0e0;
    border-left-color: #333333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 0;
    border: 2px solid #333333;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 170px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 11px;
    font-weight: bold;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 0;
    margin-right: 10px;
    border: 2px solid #333333;
}
