body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    overflow: hidden; background-color: #0b0914; 
}

/* --- MAIN MENU HUB --- */
#mainMenu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #2d1445 0%, #0b0914 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.menu-content { text-align: center; }
.logo-large {
    width: 80px; height: 80px; margin: 0 auto 20px;
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.4);
}
.menu-title { color: white; font-size: 48px; margin: 0 0 10px; font-weight: 800; letter-spacing: 2px;}
.menu-subtitle { color: #d7bde2; font-size: 18px; margin-bottom: 40px; }
.menu-actions { display: flex; gap: 20px; justify-content: center; }
.large-btn { padding: 15px 30px !important; font-size: 16px !important; }
.file-upload-wrapper { position: relative; overflow: hidden; display: inline-block; }
.file-upload-wrapper input[type=file] {
    font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; height: 100%;
}

/* --- EDITOR HEADER --- */
#header {
    height: 60px; background: linear-gradient(90deg, #1a0a2e 0%, #2d1445 100%);
    color: white; display: flex; align-items: center; padding: 0 24px;
    justify-content: space-between; box-shadow: 0 4px 15px rgba(0,0,0,0.5); z-index: 100; position: relative;
}
.header-left { display: flex; align-items: center; gap: 15px; }
.project-info { display: flex; flex-direction: column; gap: 4px; }
.project-info input {
    background: transparent; border: none; color: white; font-family: inherit; outline: none;
}
#projTitle { font-size: 18px; font-weight: 700; color: #fff; }
#projDesc { font-size: 12px; color: #a9a9a9; }

/* Buttons */
button { padding: 10px 20px; margin-left: 10px; color: white; border: none; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 13px; text-transform: uppercase; transition: all 0.2s ease; }
.btn-dark { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.btn-dark:hover { background: rgba(255,255,255,0.2); }

#editorView { display: none; height: 100%; width: 100%; display: flex; flex-direction: column; }
#container { display: flex; height: calc(100vh - 60px); min-height: calc(100vh - 60px); width: 100%; }
.btn-green { background: linear-gradient(135deg, #27ae60, #1e8449); box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3); }
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(39, 174, 96, 0.5); }
.btn-yellow { background: linear-gradient(135deg, #f39c12, #d68910); box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3); }
.btn-yellow:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(243, 156, 18, 0.5); }
.btn-red { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3); }
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(231, 76, 60, 0.5); }
.btn-blue { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3); }
.btn-blue:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(52, 152, 219, 0.5); }
.btn-purple { background: linear-gradient(135deg, #8e44ad, #732d91); box-shadow: 0 4px 10px rgba(142, 68, 173, 0.3); }
.btn-purple:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(142, 68, 173, 0.5); }

/* Layout */
#blocklyArea { width: 45%; height: 100%; position: relative; border-right: 4px solid #2d1445; }
#blocklyDiv { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
#canvasArea { width: 55%; height: 100%; background: radial-gradient(circle at center, #1a1a2e 0%, #0d0d1a 100%); position: relative; overflow: hidden;}
#renderCanvas { width: 100%; height: 100%; touch-action: none; outline: none; }

/* Overlays */
#coordOverlay { position: absolute; top: 15px; left: 15px; background: rgba(26, 10, 46, 0.6); backdrop-filter: blur(8px); border: 1px solid rgba(155, 89, 182, 0.3); color: #d7bde2; padding: 10px 16px; font-family: monospace; font-weight: bold; font-size: 14px; border-radius: 8px; pointer-events: none; z-index: 10; }

/* CREATOR GUI OVERLAY */
#creatorGUI {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5;
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px;
}
.creator-text {
    font-size: 40px; color: white; font-weight: 900; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}