/* --- 1. RESET & BASE --- */
body {
    margin: 0;
    background: #1b1b1b;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* font-family: 'Courier New', Courier, monospace; */
    font-family: 'VT323', 'Courier New', Courier, monospace;
}


/* Apply to the whole site */
html, body {
    cursor: url('assets/cursor_default.png'), auto;
}

/* Change cursor for anything clickable (buttons, links, sliders, grass) */
a, button, .clickable, .drag-item, .pixel-checkbox-container, input[type="range"] {
    cursor: url('assets/cursor_pointer.png'), pointer !important;
}

/* Optional: Different cursor when actually dragging */
/* .drag-item:active {
    cursor: url('assets/cursor_grab.png'), grabbing !important;
} */


/* --- 2. ANIMATIONS --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 230, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 5px rgb(255, 60, 0)); }
}

/* --- 3. SCALING ENGINE --- */
.game-layer {
    width: 640px;
    height: 360px;
    flex-shrink: 0; 
    min-width: 640px;
    min-height: 360px;
    position: absolute;
    transform-origin: center center;
    image-rendering: pixelated;
}

#scene {
    z-index: 1;
    position: relative;
    background: #000;
}

#background {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- 4. CLICKABLES & HOVERS --- */
.clickable {
    position: absolute;
    cursor: pointer;
    transition: transform 0.1s ease;
}

/* Solid Pixel Outline Hover Effect */
.clickable:hover img {
    filter: 
        drop-shadow(1px 0 0 #a2fd10) 
        drop-shadow(-1px 0 0 #a2fd10) 
        drop-shadow(0 1px 0 #a2fd10) 
        drop-shadow(0 -1px 0 #a2fd10);
}



/* Object Positions */
#laptop { left: 190px; top: 70px; }
#mood   { left: 430px; top: 40px; position: absolute; }
#me     { left: 300px; top: 120px; }
#todo   { left: 440px; top: 95px; position: absolute;}
#painting { left: 350px; top: 50px; }
#plant  { left: 150px; top: 202px; position: absolute; }

/* #counter { left: 420px; top: 120px; } */
#mark {
    position: absolute;
    left: 312px;
    top: 92px;
    z-index: 10;
    pointer-events: none; /* Let clicks pass to 'Me' sprite */
    animation: float 2s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
}

/* --- 5. MOOD BOX --- */
#mood-box {
    position: absolute;
    left: 420px;
    top: 52px;
    z-index: 2;
    width: 60px;
    font-size: 9px;
    font-weight: bold;
    color: #3b3b3b;
    text-align: center;
}

#mood-text { white-space: pre-line; margin: 0; }
/* #mood-face { width: 13px; margin-top: -7px;} */
#mood-img { width: 40px; padding-left: 11px; }

/* --- 6. MODALS & OVERLAYS --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

/* Desktop Metaphor Styling */
#laptop-screen-content { position: relative; width: 100%; height: 100%; }
#screen { width: 100%; height: 100%; }
.desktop-icon { position: absolute; }
#pdf-icon { left: 149px; top: 91px; }
#folder-icon { left: 222px; top: 91px; }


/* --- SHARED RPG BOX STYLE (The "Skin") --- */
.rpg-box {
    background-color: #2c2c2c;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 0 #000;
    image-rendering: pixelated;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    position: relative;
}

/* --- INTRO DIALOG BOX (Specific Size) --- */
.intro-box {
    width: 420px;
    height: 70px;
    padding: 12px;
}

/* --- PROJECT MODAL (RPG THEME) --- */

.project-window {
    width: 480px; 
    height: 280px; 
    padding: 0; /* Header handles its own padding */
    overflow: hidden;
}

.window-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header for the Project Window */
.rpg-window-header {
    background: #444;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid white;
    color: #a2fd10;
    font-size: 11px;
}

.project-list {
    flex: 1;
    overflow-y: auto;  /* Enable scrolling if too many projects */
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: #a2fd10 #2c2c2c;
}

/* Individual Project Style */
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    padding: 10px 0;
    margin-bottom: 5px;
}

.project-text {
    flex: 1;
    padding-right: 15px;
}

.project-text h4 {
    margin: 0;
    color: #a2fd10;
    font-size: 14px;
}

.project-text h4 a {
    color: #fff;
    font-size: 10px;
    text-decoration: none;
    margin-left: 10px;
    opacity: 0.7;
}

.project-text h4 a:hover { opacity: 1; color: #a2fd10; }

.project-text p {
    margin: 5px 0 0 0;
    font-size: 10px;
    color: #ddd;
    line-height: 1.4;
}

/* The Figure on the right */
.project-figure {
    width: 50px;
    height: 50px;
    background: #444; /* Placeholder background */
    border: 1px solid #888;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-figure img {
    max-width: 90%;
    image-rendering: pixelated;
}

.footer-item {
    border-bottom: none;
    justify-content: center;
    opacity: 0.6;
    font-style: italic;
    color: #ddd;
    font-size: 10px;
}

/* CUSTOM SCROLLBAR for that pixel feel */
.project-list::-webkit-scrollbar { width: 8px; }
.project-list::-webkit-scrollbar-track { background: #2c2c2c; }
.project-list::-webkit-scrollbar-thumb { background: #a2fd10; border: 2px solid #2c2c2c; }

/* Buttons */
.close-btn {
    position: absolute;
    top: 46px; 
    right: 102px;
    background: #a2fd10; color: #333;
    width: 11px; height: 11px;
    text-align: center; font-size: 11px;
    cursor: pointer; border: 2px solid #333;
}

.close-btn-small {
    background: #a2fd10; color: #333;
    border: 2px solid #333;
    width: 11px; height: 11px;
    cursor: pointer; text-align: center; line-height: 14px;
}

/* --- 7. RPG DIALOG BOX --- */
.dialog-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    display: flex;
    justify-content: center;
    z-index: 999;
}


.rpg-layout {
    display: flex;
    height: 100%;
}

.rpg-content {
    flex: 1;
    position: relative;
}

.rpg-content h3 {
    margin: 0;
    color: #a2fd10;
    font-size: 12px;
    text-transform: uppercase;
}

.rpg-content p {
    font-size: 12px;
    line-height: 1.4;
    margin: 4px 0 0 0;
    color: #eee;
}

#avatar {
    width: 60px;
    border-left: 2px solid #555;
    margin-left: 12px;
    padding-left: 12px;
    display: flex;
    align-items: center;
}

#avatar img {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.next-arrow {
    position: absolute;
    bottom: 0;
    right: 5px;
    color: #a2fd10;
    font-size: 10px;
    animation: float 1s infinite;
}

/* --- ART WINDOW SIZE --- */
/* This matches the logic of .project-window but slightly wider */
.art-window {
    width: 580px;
    height: 320px;
    border: 4px solid #444;
    overflow: hidden;
}

/* --- THE INTERNAL CANVAS (Background) --- */
.art-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #f4f4f4;
}

/* Bottom-right hint text */
.wall-hint {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 9px;
    color: #f4f4f4;
    pointer-events: none; /* So it doesn't block dragging */
}

/* Styling the close button to look good on the wall */
#close-art {
    background: #a2fd10;
    color: #333;
    border: 2px solid #333;
}


.art-controls-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #333;
    border-top: 2px solid #a2fd10;
    padding: 5px 10px;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 10px;
    color: #a2fd10;
    z-index: 100;
}

.art-controls-bar input[type="range"] {
    accent-color: #a2fd10;
    vertical-align: middle;
    width: 100px;
}

.pixel-painting {
    display: block;
    max-width: 150px;
    max-height: 150px;
    border: 2px solid #a2fd10;
    background: #000;
}


/* --- DRAGGABLE ITEMS --- */
/* (These stay the same, but ensuring they are here for you) */
.drag-item {
    position: absolute;
    cursor: grab;
    transition: transform 0.1s;
    display: inline-block;
    padding-top: 15px; 
}

.drag-item:active {
    cursor: grabbing;
    z-index: 999 !important;
    transform: scale(1.02) !important;
}

.drag-item > img {
    max-width: 150px;
    max-height: 150px;
    display: block;
    border: 1px solid #444;
    background: white;
}

/* --- TAPE STYLES --- */
.tape {
    position: absolute;
    top: 5px;          /* Adjusted to overlap the painting slightly */
    left: 50%;         /* Move to the middle of the container */
    transform: translateX(-50%); /* Pull it back by half its own width to center */
    z-index: 10;
}


#grasspot { left: 205px; top: 254px; position: absolute; }
.grass {
    position: absolute;
    bottom: 23px; 
    transform-origin: bottom center; 
    transition: transform 0.1s ease-out;
    z-index: 10;
    image-rendering: pixelated;
    pointer-events: auto; /* The mouse only sees these */
}

.grass-hint {
    position: absolute;
    top: -30px;
    left: -10px;
    background: #ffffff;
    border: 2px solid #a2fd10;
    color: #333;
    font-size: 8px;
    padding: 2px 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    pointer-events: none;
}

/* When the grass is "active" (controlled via JS) */
.grass-hint.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Container for the whole label */
.pixel-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}

/* Hide the actual browser checkbox */
.pixel-checkbox-container input {
    display: none;
}

/* The custom checkbox "box" */
.pixel-check-box {
    width: 10px;
    height: 10px;
    background: #000;
    border: 2px solid #a2fd10;
    position: relative;
    display: inline-block;
    box-shadow: 2px 2px 0px #000; /* Retro shadow */
}

/* The "Checked" state - adding the green dot inside */
.pixel-checkbox-container input:checked + .pixel-check-box::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: #a2fd10;
    /* This makes the inner green box look like a pixel */
    box-shadow: 2px 0 0 #a2fd10, 0 2px 0 #a2fd10, 2px 2px 0 #a2fd10;
}

/* Hover effect */
.pixel-checkbox-container:hover .pixel-check-box {
    background: #222;
}

/* Active / Pressed effect */
.pixel-checkbox-container:active .pixel-check-box {
    transform: translate(1px, 1px);
    box-shadow: 0px 0px 0px #000;
}