body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 0;
	display: flex;
	height: 100vh;
	background-color: #1a1a1a;
	color: white;
	overflow: hidden;
}

canvas {
	background-image:
		linear-gradient(45deg, #2b2b2b 25%, transparent 25%),
		linear-gradient(-45deg, #2b2b2b 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #2b2b2b 75%),
		linear-gradient(-45deg, transparent 75%, #2b2b2b 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
	box-shadow: 0 0 20px rgba(0,0,0,0.5);
	/* Prevents the browser from blurring the canvas element itself */
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	cursor: crosshair;
}

/* Fullscreen Canvas Styling */
canvas:fullscreen {
    width: 100vw;
    height: 100vh;
    background-color: #000;
}


/* Ensure the canvas fills the entire container behind the ribbon */
#mainCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	display: block;
}

.main-layout {
    display: flex;
    flex-direction: row; /* Sidebar left, Workspace right */
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.editor-workspace {
    flex: 1; /* Takes all remaining width */
    position: relative; /* CRITICAL: Anchors the ribbon to THIS div only */
    display: flex;
    flex-direction: column; /* Stack Ribbon on top of Container */
	overflow: hidden;
    background: #1e1e1e;
}


/* Ensure the container is the reference point for the floating ribbon */
.editor-container {
    flex: 1;
    position: relative; /* CRITICAL */
    /* overflow: hidden; */
    background: #1e1e1e;
    display: flex;
}


/* Visual feedback for dragging a file over the editor */
.editor-container.drag-over {
	background-color: #2a2a2a;
	outline: 2px dashed #007acc;
	outline-offset: -10px;
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Above everything */
}

/* Modal Box */
.modal-content {
    background: #252526;
    padding: 30px;
    border-radius: 8px;
    width: 600px;
    max-width: 90%;
    border: 1px solid #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}
.modal-close:hover { color: white; }

.modal-body { line-height: 1.6; color: #ccc; }

.hidden { display: none !important; }
