/* Kepler Orbits Simulator - Dark Space Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
    color: #e0e6ed;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(10, 14, 26, 0.95);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(100, 150, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 100, 255, 0.1);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00ff88 0%, #4a9eff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #8b9dc3;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 0;
    overflow: hidden;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    position: relative;
    background: #050810;
    overflow: hidden;
}

#orbitCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.canvas-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.orbit-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #b0c4de;
}

.legend-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.legend-color.orbit-primary {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.legend-color.orbit-compare {
    background: #4a9eff;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.legend-color.velocity {
    background: #00ff88;
}

.legend-color.acceleration {
    background: #ff6666;
}

.legend-color.sweep {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
}

/* Controls Panel */
.controls-panel {
    width: 380px;
    background: rgba(10, 14, 26, 0.98);
    border-left: 1px solid rgba(100, 150, 255, 0.2);
    overflow-y: auto;
    padding: 1.5rem;
}

.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

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

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 150, 255, 0.5);
}

.control-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(100, 150, 255, 0.1);
}

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

.control-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a9eff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-section h3::before {
    content: '';
    width: 4px;
    height: 1.2rem;
    background: linear-gradient(180deg, #00ff88 0%, #4a9eff 100%);
    border-radius: 2px;
}

/* Control Groups */
.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    color: #8b9dc3;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.control-input,
select.control-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 6px;
    color: #e0e6ed;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-input:focus,
select.control-input:focus {
    outline: none;
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

/* Range Sliders */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(100, 150, 255, 0.2);
    border-radius: 3px;
    outline: none;
    margin: 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88 0%, #4a9eff 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88 0%, #4a9eff 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #b0c4de;
    cursor: pointer;
    padding: 0.4rem 0;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: #e0e6ed;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a9eff;
    cursor: pointer;
}

/* Animation Controls */
.animation-controls {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.btn {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0e1a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: rgba(100, 150, 255, 0.2);
    color: #4a9eff;
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.5);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.stat-item {
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(100, 150, 255, 0.15);
    border-radius: 6px;
    padding: 0.8rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(100, 150, 255, 0.3);
    background: rgba(0, 20, 40, 0.6);
}

.stat-label {
    font-size: 0.75rem;
    color: #8b9dc3;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.stat-value {
    font-size: 0.95rem;
    color: #00ff88;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Footer */
footer {
    background: rgba(10, 14, 26, 0.95);
    border-top: 1px solid rgba(100, 150, 255, 0.2);
    padding: 1.5rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.kepler-laws h4,
.constraint-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #4a9eff;
    margin-bottom: 0.8rem;
}

.law {
    font-size: 0.85rem;
    color: #b0c4de;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.law strong {
    color: #00ff88;
}

.constraint-info p {
    font-size: 0.85rem;
    color: #b0c4de;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .controls-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(100, 150, 255, 0.2);
        max-height: 50vh;
    }

    .canvas-container {
        min-height: 50vh;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .canvas-overlay {
        display: none;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    }
}

.stat-value {
    animation: pulse 2s ease-in-out infinite;
}
