/* Solar System Emoji Gravity Sandbox - Custom Styles */

/* Canvas takes full container */
#sim-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Emoji shelf items */
.emoji-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    cursor: grab;
    transition: all 0.15s ease;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.1);
}

.emoji-item:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.emoji-item.dragging {
    opacity: 0.5;
}

/* Play overlay */
#play-overlay {
    z-index: 25;
}

#play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-overlay-btn {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.play-overlay-btn:hover {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* Mode buttons */
.mode-btn {
    cursor: pointer;
}

.mode-btn.active {
    border-color: rgb(59, 130, 246);
    background: rgba(59, 130, 246, 0.2);
}

.mode-btn:not(.active) {
    border-color: rgb(75, 85, 99);
    background: rgba(55, 65, 81, 0.5);
}

.mode-btn:not(.active):hover {
    border-color: rgb(107, 114, 128);
    background: rgba(75, 85, 99, 0.5);
}

/* Drag preview */
#drag-preview {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    z-index: 100;
}

#drag-preview .velocity-arrow {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.2));
    transform-origin: left center;
    border-radius: 2px;
}

#drag-preview .velocity-arrow::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -4px;
    border: 5px solid transparent;
    border-left: 8px solid rgba(59, 130, 246, 0.8);
}

/* Toast notifications */
.toast {
    padding: 12px 16px;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: toast-in 0.3s ease-out;
    backdrop-filter: blur(4px);
}

.toast.toast-out {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Size buttons */
.size-btn.active {
    background-color: rgb(37, 99, 235);
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #60a5fa;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Tooltip */
#tooltip {
    max-width: 200px;
}

/* Canvas cursor states */
#canvas-container.dragging-over #sim-canvas {
    cursor: copy;
}

#canvas-container.panning #sim-canvas {
    cursor: grabbing;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Star field background effect for canvas */
#canvas-container {
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
}

/* Pulse animation for central body */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 200, 50, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 200, 50, 0.8));
    }
}

/* Black hole specific styling */
.blackhole-warning {
    color: #f59e0b;
    font-size: 11px;
    margin-top: 4px;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Button active states */
button:active {
    transform: scale(0.98);
}

/* Focus states for accessibility */
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Select dropdown styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Body info panel (if clicked) */
.body-info-panel {
    position: absolute;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    padding: 12px;
    min-width: 150px;
    backdrop-filter: blur(4px);
    z-index: 30;
}

/* Velocity arrow indicator */
.velocity-indicator {
    position: absolute;
    pointer-events: none;
    z-index: 20;
}
