html {
    background-color: rgb(247, 245, 241);
    font-family: monospace;
    cursor: crosshair;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

canvas {
    display: block;
}

.next {
    position: absolute;
    right: 60px;
    bottom: 60px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: black !important;
    opacity: 0.5;
    z-index: 100;
    user-select: none;
    transition: opacity 0.2s;
}

.next:hover {
    opacity: 0.8;
}

.prev {
    position: absolute;
    left: 60px;
    bottom: 60px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: black !important;
    opacity: 0.5;
    z-index: 100;
    user-select: none;
    transition: opacity 0.2s;
}

.prev:hover {
    opacity: 0.8;
}

.title {
    position: absolute;
    left: 60px;
    top: 60px;
    font-size: 20px;
    font-weight: bold;
    color: black !important;
    opacity: 0.5;
    margin: 0;
    padding: 0;
    z-index: 100;
    user-select: none;
}

.menu {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Only enable pointer events on interactive buttons */
.next,
.prev,
.about,
.keep-reading {
    pointer-events: auto;
}

/* Title should not block raycasts to 3D text */
.title {
    pointer-events: none;
}

.about {
    position: absolute;
    top: 60px;
    right: 60px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: black !important;
    opacity: 0.5;
    z-index: 100;
    user-select: none;
    transition: opacity 0.2s;
    text-decoration: none;
}

.about:hover {
    opacity: 0.8;
}

/* About page styles */
.about-page {
    background-color: rgb(0, 0, 0);
    overflow: hidden;
    cursor: crosshair;
}

.keep-reading {
    position: fixed;
    bottom: 60px;
    /* text-align: center; */
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: black !important;
    opacity: 0.5;
    z-index: 100;
    user-select: none;
    transition: opacity 0.2s;
    text-decoration: none;
}

.keep-reading:hover {
    opacity: 0.8;
}

/* Text Editor Styles */
.text-editor {
    position: fixed;
    top: 0;
    right: 0;
    width: 25%;
    height: 100vh;
    background-color: rgb(247, 245, 241);
    border-left: 2px solid rgba(0, 0, 0, 0.1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.text-editor.hidden {
    transform: translateX(100%);
}

.text-editor-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.7);
}

.text-editor-textarea {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    background-color: transparent;
    color: #000;
    resize: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
}

/* Layout shifts when editor is open */
.about-page.editor-open #canvas-container {
    /* width: 75%; */
    /* left: 0; */
    /* transform: translateX(-50%); */
    transition: width 0.3s ease, left 0.3s ease, transform 0.3s ease;
}

.about-page.editor-open .keep-reading {
    left: 37.5%; /* Center in the left 75% area */
    transform: translateX(-50%);
}

/* Main page layout shifts when editor is open */
body.editor-open #canvas-container {
    /* transform: translateX(-12.5%); */
    transition: width 0.3s ease, left 0.3s ease, transform 0.3s ease;
    /* width: 75%;
    left: 0;
    transition: width 0.3s ease, left 0.3s ease; */
}

body.editor-open .menu {
    width: 75%;
    left: 0;
    transition: width 0.3s ease, left 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
    .next {
        right: 30px;
        bottom: 30px;
        font-size: 14px;
    }
    
    .prev {
        left: 30px;
        bottom: 30px;
        font-size: 14px;
    }
    
    .title {
        left: 30px;
        top: 30px;
        font-size: 14px;
    }
    
    .about {
        top: auto;
        right: auto;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
        text-transform: uppercase;
    }
    
    .keep-reading {
        bottom: 30px;
        font-size: 14px;
    }
}
