/*
 * Cosmic Web Explorer
 * A real-time cosmological visualization tool.
 * Copyright (c) 2026 Nico Schuster. Licensed under the GNU AGPLv3.
 * ---
 * This tool is shared for educational and research purposes. It is provided
 * "as-is," without any warranty of any kind.
 * For full license terms and citation instructions, please visit:
 * https://github.com/nicosmo/cosmic_web_explorer
 */

/* styles.css — Cosmic Web Explorer styles */

body { margin: 0; background-color: #000000; color: white; font-family: 'Inter', sans-serif; overflow: hidden; }

#app-container { position: relative; width: 100vw; height: 100vh; overflow: hidden; }

/* Canvas layering handled inline via flex + absolute positioning */

.control-panel {
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

/* Interactive Cursor */
.cursor-crosshair { cursor: crosshair; }
.cursor-grab { cursor: grab; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

input[type=range] {
    @apply h-1 bg-slate-700 rounded-lg appearance-none cursor-pointer;
}
input[type=range]::-webkit-slider-thumb {
    @apply appearance-none w-3 h-3 rounded-full bg-blue-500 hover:bg-blue-400 transition-colors shadow-lg;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #3b82f6; }
input:checked + .slider:before { transform: translateX(14px); }

/* Button Group Styles */
.btn-group { display: flex; gap: 4px; }
.btn-group button {
    flex: 1;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #334155;
    transition: all 0.2s;
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
}
.btn-group button:hover { background: rgba(59, 130, 246, 0.2); border-color: #3b82f6; color: white; }
.btn-group button.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Floating Tooltip Styles (Portal) */
.portal-tooltip {
    position: fixed;
    background-color: #0f172a;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    max-width: 220px;
}
.portal-tooltip-arrow {
    position: absolute;
    top: 50%;
    left: -5px; /* Points left */
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid #0f172a;
}

.frozen-badge {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.4);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}
