:root {
    --main-accent: #DD0000;
}

.bg-main {
  background-color: var(--main-accent) !important;
}

body {
    background-color: #000;
    color: #fff;
    margin: 0;
}

.custom-renderer{
  position: absolute;
}

.viewport {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.bg-dwarf-planet {
  background-color: #d63384;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.control-square {
    width: 50px;
    height: 50px;
    color: var(--main-accent);
    background-color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.control-square i {
    font-size: 200%;
}

.control-square:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.control-square:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.control-square.active {
    background-color: var(--main-accent);
    color: #000;
}

.inspector {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 2px solid var(--main-accent);
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
}

.inspector-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.impressum-section {
    position: sticky;
    bottom: 0;
    background: var(--bg-dark); /* Match your background */
    border-top: 1px solid #555;
    padding: 8px;
    text-align: center;
    z-index: 10;
}

/* Floating Time Controls Container */
.time-controls-floating {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 600px;
    pointer-events: none;
}

.time-controls-container {
    background: linear-gradient(135deg, rgba(33, 37, 41, 0.95), rgba(26, 29, 32, 0.98));
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(220, 53, 69, 0.1) inset;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: auto;
}

/* Time Control Buttons Group */
.time-buttons-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-width: 0; /* Allows flex children to shrink below content size */
}

/* Individual Time Button */
.time-btn {
    background: linear-gradient(135deg, var(--bg-darker), #2c3034);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex-shrink: 1; /* Allows buttons to shrink on small screens */
    white-space: nowrap;
}

.time-btn:hover {
    background: linear-gradient(135deg, var(--bg-main), #b02a37);
    border-color: var(--bg-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.time-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* Play/Pause button special styling */
.play-pause-btn {
    background: linear-gradient(135deg, var(--bg-main), #b02a37);
    border-color: var(--bg-main);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
}

.play-pause-btn:hover {
    background: linear-gradient(135deg, #e55569, var(--bg-main));
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.5);
}

/* Hide pause icon by default, show when playing */
.play-pause-btn .fa-pause {
    display: none;
}

.play-pause-btn.playing .fa-play {
    display: none;
}

.play-pause-btn.playing .fa-pause {
    display: inline;
}

/* Time Acceleration Group */
.time-acceleration-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.acceleration-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.acceleration-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

/* Speed display indicator */
.speed-indicator {
    background: linear-gradient(135deg, var(--bg-main), #b02a37);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 13px;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Custom slider styling */
.time-acceleration-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #b02a37;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Webkit slider thumb (Chrome, Safari, Edge) */
.time-acceleration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, white, #f0f0f0);
    border: 2px solid var(--bg-main);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.time-acceleration-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Firefox slider thumb */
.time-acceleration-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, white, #f0f0f0);
    border: 2px solid var(--bg-main);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Speed markers display */
.speed-markers {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 11px;
    color: #888;
    padding: 0 2px;
}

/* Mobile optimization - reduce padding and gap on very small screens */
@media (max-width: 480px) {
    .time-controls-container {
        padding: 12px;
        gap: 10px;
    }

    .time-buttons-group {
        gap: 4px;
    }

    .time-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .speed-indicator {
        padding: 3px 8px;
        font-size: 12px;
    }
}

/* Inspector Panel Improvements */
.inspector {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    border-left: 2px solid #dc3545;
    /* Add consistent padding that accounts for scrollbar */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
}

/* Fix container width issues */
.inspector .card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.inspector .card-body {
    padding: 1rem;
    box-sizing: border-box;
}

/* Fix input group sizing issues */
.inspector .input-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.inspector .input-group .form-control {
    flex: 1;
    min-width: 0; /* Allow text to truncate if needed */
}

/* Fix row/column overflow */
.inspector .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.inspector .row > [class*="col-"] {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

/* Hierarchical Structure Improvements */
.object-hierarchy {
    position: relative;
    margin-left: 0;
}

/* Connection lines for hierarchy */
.object-hierarchy::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(220, 53, 69, 0.3) 0%,
        rgba(220, 53, 69, 0.6) 50%,
        rgba(220, 53, 69, 0.3) 100%);
    border-radius: 1px;
}

/* Badge styling improvements */
.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Action buttons - better alignment */
.inspector-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.inspector-actions .btn {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Accordion improvements for maneuvers */
.accordion-item {
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    overflow: hidden;
}

.accordion-button {
    background: rgba(26, 29, 32, 0.8) !important;
    border: none !important;
    color: #f8f9fa !important;
    padding: 0.75rem 1rem;
}

.accordion-button:not(.collapsed) {
    background: rgba(220, 53, 69, 0.2) !important;
    box-shadow: none !important;
}

.accordion-body {
    background: rgba(33, 37, 41, 0.95) !important;
    border-top: 1px solid rgba(220, 53, 69, 0.2);
    padding: 1rem;
}

/* Maneuver delete button positioning */
.maneuver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.delete-maneuver {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Scientific notation formatting */
.scientific-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #e9ecef;
}

/* Smooth scrolling for inspector */
.inspector {
    scroll-behavior: smooth;
}

/* Custom scrollbar for inspector */
.inspector::-webkit-scrollbar {
    width: 6px;
}

.inspector::-webkit-scrollbar-track {
    background: rgba(33, 37, 41, 0.5);
    border-radius: 3px;
}

.inspector::-webkit-scrollbar-thumb {
    background: rgba(220, 53, 69, 0.6);
    border-radius: 3px;
}

.inspector::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 53, 69, 0.8);
}

/* Firefox scrollbar */
.inspector {
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 53, 69, 0.6) rgba(33, 37, 41, 0.5);
}

@media (max-width: 768px) {
    .timeline-controls {
        border-left: none;
        margin-top: 5px;
    }

    .inspector{
        margin-top: 5px;
        border-left: none;
        border-top: solid 2px var(--main-accent);
    }

    .inspector .row > [class*="col-"] {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .inspector-actions {
        flex-direction: column;
    }
    
    .inspector-actions .btn {
        flex: none;
    }
    
    /* Stack input groups on mobile */
    .inspector .col-md-6 {
        width: 100%;
        max-width: 100%;
    }
}