* {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            user-select: none;
            -webkit-user-drag: none;
        }
        body, html {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background-color: #000000;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
        }
        #canvas-container {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
        }

        /* Glassmorphic Control Panel */
        .glass-panel {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 380px;
            max-height: calc(100% -  100px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: rgba(8, 8, 12, 0.65);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 24px 24px 48px 24px;
            color: #e2e8f0;
            font-family: 'Outfit', 'Inter', sans-serif;
            z-index: 10;
            box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
            transform-origin: right top;
            visibility: visible;
        }

        .glass-panel.hidden {
            transform: scale(0.9) translate(50px, -20px);
            opacity: 0;
            pointer-events: none;
            visibility: hidden;
        }

        /* Scrollbar styling for panel */
        .glass-panel::-webkit-scrollbar {
            width: 5px;
        }
        .glass-panel::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.1);
        }
        .glass-panel::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 4px;
        }

        /* Headers & Branding */
        .header {
            margin-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 12px;
        }
        .header h1 {
            font-size: 20px;
            font-weight: 800;
            letter-spacing: 2px;
            color: #ffffff;
            text-transform: uppercase;
            background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .header p {
            font-size: 10px;
            color: #94a3b8;
            letter-spacing: 1px;
            text-transform: uppercase;
            margin-top: 2px;
        }

        /* Tabs System */
        .tabs {
            display: flex;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 2px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.03);
        }
        .tab-btn {
            flex: 1;
            background: none;
            border: none;
            color: #94a3b8;
            padding: 8px 0;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s ease;
        }
        .tab-btn.active {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        .tab-content {
            display: none;
            padding-bottom: 32px;
        }
        .tab-content.active {
            display: block;
        }

        /* Form elements */
        .control-group {
            margin-bottom: 18px;
        }
        .control-group.inline {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .control-label {
            display: block;
            font-size: 12px;
            color: #cbd5e1;
            margin-bottom: 6px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .control-group.inline .control-label {
            margin-bottom: 0;
        }

        /* Range Sliders */
        .slider-container {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .slider-container input[type="range"] {
            flex: 1;
            height: 4px;
            -webkit-appearance: none;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
        }
        .slider-container input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
            transition: transform 0.1s ease;
        }
        .slider-container input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }
        .slider-value {
            font-size: 13px;
            color: #38bdf8;
            font-family: monospace;
            width: 45px;
            text-align: right;
        }

        /* Select & Inputs */
        select {
            width: 100%;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 8px 12px;
            color: #ffffff;
            font-size: 13px;
            outline: none;
            cursor: pointer;
            transition: border-color 0.2s;
        }
        select:focus {
            border-color: #38bdf8;
        }

        /* Toggle Switch */
        .switch {
            position: relative;
            display: inline-block;
            width: 34px;
            height: 20px;
            flex-shrink: 0;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider-switch {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: rgba(255, 255, 255, 0.1);
            transition: .3s;
            border-radius: 20px;
        }
        .slider-switch:before {
            position: absolute;
            content: "";
            height: 14px;
            width: 14px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }
        input:checked + .slider-switch {
            background-color: #38bdf8;
        }
        input:checked + .slider-switch:before {
            transform: translateX(14px);
        }

        /* Color Picker Group */
        .color-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .color-picker-wrapper {
            position: relative;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0,0,0,0.3);
        }
        .color-picker-wrapper input[type="color"] {
            position: absolute;
            top: -5px; left: -5px; width: 42px; height: 42px;
            border: none;
            background: none;
            cursor: pointer;
        }

        /* Buttons */
        .btn {
            width: 100%;
            background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
            border: 1px solid rgba(99, 102, 241, 0.3);
            color: #ffffff;
            padding: 10px 0;
            font-size: 13px;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 10px;
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .btn:hover {
            background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(99, 102, 241, 0.35) 100%);
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
        }
        .btn:active {
            transform: scale(0.98);
        }

        /* Star selector buttons */
        .star-selector {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
        }
        .star-sel-btn {
            flex: 1;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            padding: 6px 0;
            font-size: 13px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .star-sel-btn.active {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.2);
        }

        /* Preset Management Tab Styles */
        .preset-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 5px;
            margin-bottom: 20px;
            max-height: 280px;
            overflow-y: auto;
            padding-right: 4px;
        }
        .preset-list::-webkit-scrollbar {
            width: 4px;
        }
        .preset-list::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 2px;
        }
        .preset-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 8px 12px;
            transition: all 0.2s ease;
        }
        .preset-item:hover {
            background: rgba(255, 255, 255, 0.07);
            border-color: rgba(56, 189, 248, 0.25);
        }
        .preset-name-input {
            background: transparent;
            border: none;
            border-bottom: 1px solid transparent;
            color: #ffffff;
            font-family: inherit;
            font-size: 13px;
            font-weight: 500;
            padding: 2px 4px;
            width: 170px;
            outline: none;
            transition: border-color 0.2s;
        }
        .preset-name-input:focus {
            border-color: #38bdf8;
            color: #38bdf8;
        }
        .preset-item-btns {
            display: flex;
            gap: 6px;
        }
        .preset-action-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #cbd5e1;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 12px;
        }
        .preset-action-btn:hover {
            background: rgba(56, 189, 248, 0.2);
            border-color: rgba(56, 189, 248, 0.4);
            color: #ffffff;
        }
        .preset-action-btn.btn-delete:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.4);
            color: #f87171;
        }
        .preset-io-row {
            display: flex;
            gap: 10px;
            margin-top: 5px;
        }
        .preset-io-btn {
            flex: 1;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
            padding: 8px 0;
            font-size: 13px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .preset-io-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
            color: #ffffff;
        }

        /* Mobile Adaptations */
        @media (max-width: 480px) {
            .glass-panel {
                width: calc(100vw - 32px);
                right: 16px;
                top: 75px;
                padding: 16px 16px 40px 16px;
                max-height: calc(100% - 145px);
            }
            .header h1 {
                font-size: 18px;
            }
            .control-group {
                margin-bottom: 12px;
            }
            .tab-btn {
                font-size: 13px;
                padding: 6px 0;
            }
        }

        /* Collapsible details for dashboard organization */
        details {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 8px;
            margin-bottom: 12px;
            padding: 8px 12px;
            transition: background 0.3s;
        }
        details[open] {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.12);
        }
        summary {
            font-size: 13px;
            font-weight: 600;
            color: #38bdf8;
            cursor: pointer;
            outline: none;
            user-select: none;
            padding: 4px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        summary::after {
            content: '▶';
            font-size: 9px;
            color: rgba(255, 255, 255, 0.4);
            transition: transform 0.2s;
        }
        details[open] summary::after {
            transform: rotate(90deg);
            color: #facc15;
        }
    
        @media (max-width: 768px) {
            #starys-logo { margin-top: 10vh; margin-bottom: 0.25rem; }
            #links-container { gap: 6px; margin-top: 0px; }
            .link-btn { padding: 8px 20px; font-size: 10px; }

            
        }

        /* -- NEW ROBUST ANIMATION LOGIC -- */
        #starys-logo, #entry-star, #entry-hint, #links-container {
            transition: all 1.2s cubic-bezier(0.77, 0, 0.175, 1) !important;
        }
        
        body.void-active #starys-logo {
            transform: translate(-30vw, -30vh) scale(0.5) !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        
        body.void-active #entry-star {
            transform: translate(30vw, 30vh) scale(0.5) !important;
        }

        body.void-active #entry-hint,
        body.void-active #links-container {
            opacity: 0 !important;
            pointer-events: none !important;
            visibility: hidden !important;
        }
        
        /* Top Left Logo */
        #top-left-logo {
            position: absolute;
            top: 25px;
            left: 25px;
            width: 120px;
            cursor: pointer;
            opacity: 0;
            pointer-events: none;
            transition: all 1.5s cubic-bezier(0.77, 0, 0.175, 1);
        }
        body.void-active #top-left-logo {
            opacity: 0.6 !important;
            pointer-events: auto !important;
            transition-delay: 0.2s;
        }
        
        @media (max-width: 768px) {
            #starys-logo { margin-top: 10vh; margin-bottom: 0.25rem; }
            #links-container { gap: 6px; margin-top: 0px; }
            .link-btn { padding: 8px 20px; font-size: 10px; }

            #top-left-logo {
                width: 60px !important;
                top: 15px !important;
                left: 15px !important;
            }
        }
        
        /* Console Trigger */
        #console-trigger {
            transition: opacity 1.5s ease;
        }
        #console-trigger svg {
            transition: transform 1.5s cubic-bezier(0.1, 0.9, 0.2, 1);
        }
        
        body:not(.void-active) #console-trigger {
            opacity: 0 !important;
            pointer-events: none !important;
        }
        body:not(.void-active) #console-trigger svg {
            transform: rotate(180deg) !important;
        }
        
        body.void-active #console-trigger {
            opacity: 1 !important;
            pointer-events: auto !important;
            transition-delay: 0.5s;
        }
        body.void-active #console-trigger svg {
            transform: rotate(0deg) !important;
            transition-delay: 0.5s;
        }