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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffffff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #00f5ff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

header p {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 15px;
}

.info-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 2px solid #ff6b35;
    color: #ff6b35;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.info-btn:hover {
    background: rgba(255, 107, 53, 0.4);
    transform: scale(1.05);
}

.main-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.canvas-section {
    flex: 1;
    min-width: 800px;
}

#canvas {
    border: 2px solid #ff6b35;
    border-radius: 10px;
    background: #0f0f23;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.status-display {
    margin-top: 20px;
    text-align: center;
}

.status {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.status.conducting {
    background: rgba(0, 255, 65, 0.2);
    border: 2px solid #00ff41;
    color: #00ff41;
    animation: pulse-green 1.5s infinite;
}

.status.blocked {
    background: rgba(255, 7, 58, 0.2);
    border: 2px solid #ff073a;
    color: #ff073a;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.5); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 65, 0.8); }
}

.explanation {
    font-size: 1.1em;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
}

.controls {
    flex: 0 0 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
}

.control-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group:last-child {
    border-bottom: none;
}

.control-group h3 {
    color: #00f5ff;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.slider-container {
    margin-bottom: 15px;
}

.slider-container label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ff6b35;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ff6b35;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.mode-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mode-btn, .behavior-btn, .preset-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.mode-btn:hover, .behavior-btn:hover, .preset-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    color: #ff6b35;
}

.mode-btn.active, .behavior-btn.active {
    background: rgba(0, 245, 255, 0.2);
    border-color: #00f5ff;
    color: #00f5ff;
}

.preset-btn {
    width: 100%;
    margin-bottom: 8px;
}

.behavior-toggle {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

select {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
}

select option {
    background: #1a1a2e;
    color: #fff;
}

.measurements {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.measurement {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.measurement:last-child {
    margin-bottom: 0;
}

.measurement span:first-child {
    color: #ccc;
}

.measurement span:last-child {
    color: #00f5ff;
    font-weight: bold;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 15% auto;
    padding: 30px;
    border: 2px solid #ff6b35;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 107, 53, 0.5);
}

.close {
    color: #ff6b35;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #00f5ff;
}

.modal-content h2 {
    color: #00f5ff;
    margin-bottom: 20px;
}

.modal-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 10px;
    color: #ccc;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
}

footer a {
    color: #ff6b35;
    text-decoration: none;
}

footer a:hover {
    color: #00f5ff;
}

/* Responsive design */
@media (max-width: 1000px) {
    .main-content {
        flex-direction: column;
    }
    
    .canvas-section {
        min-width: auto;
    }
    
    #canvas {
        width: 100%;
        height: auto;
    }
    
    .controls {
        flex: none;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}