* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: #0f172a; background-image: radial-gradient(circle at top right, #1e293b, #0f172a); color: #e2e8f0; font-family: 'Outfit', sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; }
.game-container { position: absolute; top: 0; left: 0; border-radius: 24px; padding: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2); backdrop-filter: blur(10px); transform-origin: top left; }
.ui-layer { position: absolute; top: 30px; left: 40px; pointer-events: none; z-index: 10; }
h1 { font-weight: 900; font-size: 2.5rem; letter-spacing: 2px; background: linear-gradient(135deg, #818cf8, #c084fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 5px; text-transform: uppercase; }
.instructions { font-size: 0.9rem; color: #94a3b8; background: rgba(15, 23, 42, 0.6); padding: 5px 12px; border-radius: 100px; display: inline-block; backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.1); }
canvas { border-radius: 16px; display: block; background: #020617; box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8); }

/* NEW UI STYLES */
.hidden { display: none !important; }
.screen { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border-radius: 16px; z-index: 20; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); }
.backdrop-blur { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px); }
.screen h2 { font-size: 2rem; margin-bottom: 20px; color: #fff; text-transform: uppercase; }
.menu-buttons { display: flex; gap: 20px; margin-top: 30px; }
.btn { padding: 12px 30px; border: none; border-radius: 12px; font-size: 1.2rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all 0.2s; text-transform: uppercase; margin: 5px; }
.btn-corner { position: absolute; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 30px; background: #10b981; color: white; font-size: 2rem; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.btn-corner-top { position: absolute; top: 20px; right: 20px; padding: 10px 20px; background: #10b981; color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; z-index: 30; }
.btn-corner-top-left { position: absolute; top: 20px; left: 20px; padding: 10px 20px; background: #f59e0b; color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; z-index: 30; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: linear-gradient(135deg, #6366f1, #a855f7); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.btn.primary:hover { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6); }
.btn.secondary { background: rgba(255, 255, 255, 0.1); color: white; border: 1px solid rgba(255, 255, 255, 0.2); margin-top: 10px; }
.btn.secondary:hover { background: rgba(255, 255, 255, 0.2); }
.btn.back { position: absolute; bottom: 30px; background: transparent; border: 1px solid #ef4444; color: #ef4444; }
.btn.back:hover { background: rgba(239, 68, 68, 0.1); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-top: 30px; max-height: 400px; overflow-y: auto; padding: 10px; }
.lvl-btn { width: 60px; height: 60px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: rgba(15,23,42,0.8); color: white; font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.lvl-btn:hover:not(:disabled) { background: rgba(99, 102, 241, 0.5); border-color: #818cf8; }
.lvl-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.list { display: flex; flex-direction: column; gap: 10px; width: 400px; margin-top: 30px; max-height: 400px; overflow-y: auto; }
.list-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.05); padding: 15px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); width: 100%;}
.list-item:hover { background: rgba(255,255,255,0.1); }
#editor-ui { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; pointer-events: none; z-index: 20; }
#editor-ui * { pointer-events: auto; }
.toolbar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; background: rgba(15, 23, 42, 0.9); padding: 10px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); }
.tool-btn { padding: 8px 15px; background: transparent; color: #94a3b8; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-weight: bold; }
.tool-btn:hover { background: rgba(255,255,255,0.1); }
.tool-btn.active { background: rgba(99, 102, 241, 0.2); color: #c084fc; border-color: #818cf8; }
