@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');
        
        :root {
            --bg-color: #060B27;
            --text-color: #ffffff;
            --primary-color: #7B61FF;
            --secondary-color: #FF8F8F;
            --tertiary-color: #00C2FF;
            --dark-color: #090E2E;
            --light-color: #B8C0FF;
            --ui-color: #1A1246;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Montserrat', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            overflow-x: hidden;
            min-height: 100vh;
        }
        
        header {
            padding: 1.5rem 2rem;
            text-align: center;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            background: linear-gradient(to bottom, rgba(6, 11, 39, 1) 70%, rgba(6, 11, 39, 0));
            transition: opacity 0.3s ease;
        }
        
        header.hidden {
            opacity: 0;
            pointer-events: none;
        }
        
        h1 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-fill-color: transparent;
        }
        
        .subtitle {
            font-size: 1rem;
            opacity: 0.8;
            margin-bottom: 1.5rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .main-container {
            display: flex;
            min-height: 100vh;
            padding-top: 8rem;
        }
        
        .canvas-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
        }
        
        #dreamCanvas {
            background-color: var(--dark-color);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            cursor: pointer;
            max-width: 100%;
            max-height: 90vh;
        }
        
        .toolbox {
            width: 300px;
            background-color: var(--ui-color);
            padding: 1.5rem;
            border-radius: 12px 0 0 12px;
            box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
            display: flex;
            flex-direction: column;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
            z-index: 100;
        }
        
        .toolbox-header {
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .toolbox-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--light-color);
        }
        
        .toolbox-desc {
            font-size: 0.85rem;
            opacity: 0.7;
        }
        
        .tool-section {
            margin-bottom: 1.5rem;
        }
        
        .section-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--secondary-color);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .section-title svg {
            width: 18px;
            height: 18px;
            stroke: var(--secondary-color);
        }
        
        .elements-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
        }
        
        .element-item {
            background-color: rgba(255, 255, 255, 0.07);
            border-radius: 8px;
            padding: 0.75rem 0.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .element-item:hover {
            background-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-3px);
        }
        
        .element-item.selected {
            background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
            box-shadow: 0 5px 15px rgba(123, 97, 255, 0.3);
        }
        
        .element-icon {
            font-size: 1.5rem;
        }
        
        .element-name {
            font-size: 0.7rem;
            font-weight: 500;
        }
        
        .slider-control {
            margin-bottom: 1rem;
        }
        
        .slider-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
        }
        
        .slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.1);
            outline: none;
        }
        
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary-color);
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .slider::-webkit-slider-thumb:hover {
            background: var(--secondary-color);
        }
        
        .color-picker {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }
        
        .color-option {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.2s;
            border: 2px solid transparent;
        }
        
        .color-option:hover {
            transform: scale(1.1);
        }
        
        .color-option.selected {
            border-color: white;
            transform: scale(1.1);
        }
        
        .action-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-top: auto;
            padding-top: 1rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .btn {
            padding: 0.75rem;
            border: none;
            border-radius: 8px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .primary-btn {
            background: linear-gradient(90deg, var(--primary-color), var(--tertiary-color));
            color: white;
        }
        
        .primary-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .secondary-btn {
            background-color: rgba(255, 255, 255, 0.1);
            color: var(--light-color);
        }
        
        .secondary-btn:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }
        
        .btn svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
        }
        
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        
        .modal.active {
            opacity: 1;
            pointer-events: auto;
        }
        
        .modal-content {
            background-color: var(--ui-color);
            padding: 2rem;
            border-radius: 12px;
            max-width: 90%;
            width: 500px;
            position: relative;
        }
        
        .modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: var(--light-color);
        }
        
        .modal-text {
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }
        
        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            color: var(--light-color);
            font-size: 1.5rem;
            cursor: pointer;
        }
        
        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            margin-top: 2rem;
        }
        
        .gallery-item {
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.2s;
            aspect-ratio: 1 / 1;
        }
        
        .gallery-item:hover {
            transform: scale(1.05);
        }
        
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .theme-selector {
            display: flex;
            gap: 0.75rem;
            margin-bottom: 1rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }
        
        .theme-option {
            padding: 0.5rem 1rem;
            background-color: rgba(255, 255, 255, 0.07);
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .theme-option:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }
        
        .theme-option.selected {
            background: linear-gradient(90deg, var(--primary-color), var(--tertiary-color));
            box-shadow: 0 3px 10px rgba(123, 97, 255, 0.3);
        }
        
        .animation-panel {
            position: absolute;
            bottom: 1.5rem;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--ui-color);
            padding: 0.75rem 1.5rem;
            border-radius: 30px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            gap: 1rem;
            z-index: 50;
        }
        
        .animation-control {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .animation-label {
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 20px;
        }
        
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.1);
            transition: .4s;
            border-radius: 20px;
        }
        
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .toggle-slider {
            background-color: var(--primary-color);
        }
        
        input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }
        
        .speed-control {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .speed-slider {
            width: 80px;
        }
        
        /* Tooltip */
        .tooltip {
            position: relative;
        }
        
        .tooltip .tooltip-text {
            visibility: hidden;
            width: 120px;
            background-color: rgba(0, 0, 0, 0.8);
            color: white;
            text-align: center;
            padding: 5px;
            border-radius: 6px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -60px;
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.75rem;
            pointer-events: none;
        }
        
        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        /* Loading overlay */
        .loading {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg-color);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3000;
            flex-direction: column;
            transition: opacity 0.5s ease;
        }
        
        .loading.hidden {
            opacity: 0;
            pointer-events: none;
        }
        
        .loader {
            width: 50px;
            height: 50px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            border-top-color: var(--primary-color);
            border-left-color: var(--secondary-color);
            animation: spin 1s infinite linear;
            margin-bottom: 1rem;
        }
        
        .loading-text {
            font-size: 1.2rem;
            font-weight: 500;
            background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-fill-color: transparent;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Stars background */
        .stars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }
        
        .star {
            position: absolute;
            background-color: white;
            border-radius: 50%;
            opacity: 0.6;
            animation: twinkle var(--duration) infinite ease-in-out;
            animation-delay: var(--delay);
        }
        
        @keyframes twinkle {
            0%, 100% { opacity: 0.2; }
            50% { opacity: 0.8; }
        }
        
        .home-link {
            position: fixed;
            top: 1rem;
            left: 1rem;
            color: var(--light-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 500;
            z-index: 1000;
            transition: color 0.2s;
        }
        
        .home-link:hover {
            color: var(--secondary-color);
        }
        
        /* Mobile adjustments */
        @media (max-width: 900px) {
            .main-container {
                flex-direction: column;
                padding-top: 6rem;
            }
            
            .toolbox {
                width: 100%;
                border-radius: 0;
                order: 2;
            }
            
            .canvas-container {
                padding: 1rem;
                order: 1;
            }
            
            #dreamCanvas {
                max-height: 60vh;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .animation-panel {
                bottom: auto;
                top: 7rem;
                flex-wrap: wrap;
                justify-content: center;
                padding: 0.5rem;
            }
        }
        
        @media (max-width: 600px) {
            header {
                padding: 1rem;
            }
            
            h1 {
                font-size: 1.5rem;
            }
            
            .subtitle {
                font-size: 0.9rem;
                margin-bottom: 1rem;
            }
            
            .elements-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .animation-panel {
                flex-direction: column;
                gap: 0.5rem;
                padding: 0.75rem;
                align-items: flex-start;
            }
        }