/* Custom styles for retro computer aesthetic */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #1a1a1a;
    font-family: 'Orbitron', sans-serif;
}

/* Retro glow effects */
.led-glow-red {
    box-shadow: 0 0 10px #ff3333, 0 0 20px #ff3333, inset 0 0 5px #ff6666;
}

.led-glow-green {
    box-shadow: 0 0 10px #33ff66, 0 0 20px #33ff66, inset 0 0 5px #66ff99;
}

.led-glow-amber {
    box-shadow: 0 0 10px #ffaa00, 0 0 20px #ffaa00, inset 0 0 5px #ffcc44;
}

.segment-display {
    font-family: 'VT323', monospace;
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

.lcd-display {
    font-family: 'Share Tech Mono', monospace;
    background: #001a0d;
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

.crt-display {
    background: #001a0d;
    color: #00ff88;
    text-shadow: 0 0 8px #00ff88, 0 0 12px #00ff88;
    position: relative;
}

.crt-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

.metal-bezel {
    background: linear-gradient(135deg, #888 0%, #bbb 50%, #888 100%);
    border: 1px solid #666;
}

.component-shadow {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.2);
}

.wire {
    stroke-width: 3;
    fill: none;
    filter: drop-shadow(0 0 2px currentColor);
}

.wire-pulse {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.switch-toggle {
    transition: transform 0.15s ease-out;
}

.switch-toggle:active {
    transform: translateY(2px);
}

.power-button {
    background: radial-gradient(circle at 30% 30%, #44ff88, #00aa44);
    transition: all 0.3s ease;
}

.power-button.off {
    background: #333;
}

.block-programming {
    border-radius: 8px;
    border: 2px solid;
    padding: 8px 12px;
    margin: 4px;
    cursor: move;
    transition: transform 0.1s ease;
}

.block-programming:hover {
    transform: scale(1.05);
}

.block-input { 
    background: #4488ff;
    border-color: #2266dd;
}

.block-logic { 
    background: #44ff88;
    border-color: #22dd66;
}

.block-output { 
    background: #ff8844;
    border-color: #dd6622;
}

.block-math { 
    background: #aa44ff;
    border-color: #8822dd;
}

.block-time { 
    background: #ff4444;
    border-color: #dd2222;
}

.manufacturer-plate {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    border: 2px solid #666;
    background: linear-gradient(135deg, #888 0%, #aaa 50%, #888 100%);
    color: #000;
    padding: 8px;
    text-align: center;
    letter-spacing: 1px;
}

.grid-pattern {
    background-image: 
        linear-gradient(rgba(100, 100, 100, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 100, 100, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.terminal-text {
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.nixie-tube {
    font-family: 'VT323', monospace;
    color: #ff8844;
    text-shadow: 0 0 10px #ff8844, 0 0 20px #ff8844;
    background: #1a1a1a;
    border: 2px solid #444;
    padding: 4px 8px;
}

.tooltip {
    position: absolute;
    background: #2d2d2d;
    border: 2px solid #ffaa00;
    color: #ffaa00;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
}

.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
}

.component-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: grab;
    transition: all 0.2s ease;
}

.component-icon:hover {
    border-color: #ffaa00;
    transform: scale(1.1);
}

.port {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #666;
    background: #333;
    cursor: crosshair;
    transition: all 0.2s ease;
}

.port:hover {
    background: #ffaa00;
    border-color: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.port.connected {
    background: #44ff88;
    border-color: #44ff88;
}

.screw {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #999, #444);
    border: 1px solid #333;
}

.execution-highlight {
    animation: execute-glow 0.5s ease-in-out;
}

@keyframes execute-glow {
    0%, 100% { background-color: inherit; }
    50% { background-color: rgba(255, 170, 0, 0.3); }
}

.canvas-component {
    position: absolute;
    user-select: none;
}

.draggable {
    cursor: move;
}

.connection-line {
    pointer-events: stroke;
    cursor: pointer;
}

.connection-line:hover {
    stroke-width: 5;
}