/* --- VARIABLES & BASE --- */
:root {
    --quest-bg: #ffffff; 
    --quest-line: #eeeeee; 
    --quest-text: #212121;
    /* Assure-toi d'avoir importé ta police pixel quelque part */
    /* --pixel-font: 'VT323', monospace; */
}

body {
    min-height: 100%;
    background-color: var(--quest-bg); 
    background-image: 
        linear-gradient(var(--quest-line) 1px, transparent 1px), 
        linear-gradient(90deg, var(--quest-line) 1px, transparent 1px); 
    background-size: 50px 50px;
    color: var(--quest-text);
}

/* --- SECTION PRINCIPALE --- */
#quest-section {
    padding: 100px 20px;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* --- LE CARNET (NOTEBOOK) --- */
.notebook { 
    background: white;
    width: 100%;
    max-width: 800px;
    padding: 40px 60px;
    box-shadow: 0 0 0 3px black; 
    border-left: 0;
    position: relative;
    z-index: 2;
    margin-top: 250px;
}

.notebook h2 {
    font-family: var(--pixel-font);
    font-size: 3rem;
    border-bottom: 2px solid black;
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: black;
}

/* --- ITEMS DE QUÊTE --- */
.quest-item {
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.quest-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: black;
    font-family: var(--pixel-font);
}

.quest-date {
    font-family: var(--pixel-font);
    font-size: 1.4rem;
    color: #888;
}

.quest-desc {
    font-size: 1.4rem;
    color: #333;
    font-style: italic;
}

/* --- OBJETS & DÉCORATIONS --- */
.pixel-lightbulb { 
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); 
    width: 4px;
    height: 200px;
    background: #222;
    z-index: 10;
    cursor: pointer;
    transition: height 0.3s ease;
}

.pixel-lightbulb:active {
    height: 210px;
}

.lightbulb-bulb { 
    position: absolute;
    bottom: -60px;
    left: -30px; 
    width: 64px;
    height: 64px;
    background: #111;
    border-radius: 50%; 
    transition: background 0.3s, box-shadow 0.3s;
}

.pixel-laptop {
    position: absolute;
    bottom: 0;
    left: -140px;
    width: 120px;
    z-index: 5;
}

.pixel-mewo {
    position: absolute;
    bottom: 0;
    right: -100px;
    width: 80px;
    height: 60px;
    z-index: 5;
    animation: sleep 4s ease-in-out infinite;
    transition: opacity 0.5s;
}

.pixel-something {
    position: absolute;
    top: 100px;
    right: 10%;
    width: 100px;
    height: 200px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    animation: floatSomething 6s infinite ease-in-out;
}

.pixel-something.visible {
    opacity: 0.8;
}

/* --- BLACK SPACE MODE (EASTER EGG) --- */
body.lights-off {
    background-color: #000000 !important;
    background-image: none !important;
}

body.lights-off .notebook {
    filter: invert(100%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

body.lights-off .lightbulb-bulb {
    background: #222;
    box-shadow: inset 0 0 20px #000;
}

body.lights-off .pixel-mewo {
    opacity: 0;
    transition: opacity 0.5s;
}

body.lights-off #Omori {
    opacity: 0;
    transition: opacity 0.5s;
}

body.lights-off .pixel-mewo {
    opacity: 0;
    transition: opacity 0.5s;
}

body.lights-off::after {
    content: '';
    position: absolute;
    top: 150px;
    right: 15%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #fff 10%, transparent 10%), 
                radial-gradient(circle, #000 60%, transparent 60%);
    background-size: 60px 60px;
    opacity: 0.2;
    pointer-events: none;
    filter: blur(2px);
}

/* --- ANIMATIONS --- */
@keyframes sleep {
    0%, 100% { transform: scaleY(1); } 
    50% { transform: scaleY(0.95); } 
}

@keyframes floatSomething {
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-20px); } 
}

/* --- RESPONSIVE --- */
@media (max-width: 1150px) { 
    .pixel-laptop {
        left: 0;
        bottom: -80px;
    } 
    
    .pixel-mewo {
        right: 0;
        bottom: -60px;
    } 
    
    .notebook {
        margin-bottom: 100px;
    } 
}

.pixelart-to-css-omori {
    position: absolute;
    top: 500px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}