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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #8892b0;
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

.canvas-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#triangulationCanvas {
    width: 100%;
    height: 600px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    cursor: crosshair;
    display: block;
}

.controls {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: 600px;
    overflow-y: auto;
}

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

.control-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h3 {
    font-size: 1.1rem;
    color: #00d9ff;
    margin-bottom: 12px;
    font-weight: 600;
}

.btn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00e6ff 0%, #00b3e6 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c5ce7 0%, #5541d9 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7c6ff7 0%, #6551e9 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff7b7b 0%, #fe6a6a 100%);
}

.slider-container {
    margin-top: 12px;
}

.slider-container label {
    display: block;
    margin-bottom: 8px;
    color: #b0b8c4;
    font-size: 0.9rem;
}

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

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00d9ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00d9ff;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

#speedValue {
    display: inline-block;
    margin-left: 8px;
    color: #00d9ff;
    font-weight: 600;
    min-width: 30px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #b0b8c4;
    transition: color 0.2s ease;
}

.checkbox-group label:hover {
    color: #e0e0e0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00d9ff;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.stat-label {
    color: #b0b8c4;
    font-size: 0.9rem;
}

.stat-value {
    color: #00d9ff;
    font-weight: 600;
    font-size: 1rem;
}

.info-box {
    background: rgba(0, 217, 255, 0.05);
    border-left: 3px solid #00d9ff;
    padding: 12px;
    border-radius: 6px;
}

.info-box p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #b0b8c4;
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box strong {
    color: #00d9ff;
}

/* Scrollbar styling */
.controls::-webkit-scrollbar {
    width: 8px;
}

.controls::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    #triangulationCanvas {
        height: 400px;
    }

    .controls {
        max-height: none;
    }
}
