@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --bg-yellow: #FDF6C5;
    --nes-red: #E50000;
    --nes-blue: #0000FA;
    --nes-green: #00DF00;
    --nes-black: #000000;
    --nes-white: #FFFFFF;
    --nes-brown: #9A5A00;
    --nes-gray: #A0A0A0;
    
    --font-main: 'Press Start 2P', monospace;
    --pixel-size: 4px; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: crosshair;
}

body {
    background-color: var(--bg-yellow);
    color: var(--nes-black);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
}


body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}


h1, h2, h3 {
    text-transform: uppercase;
    line-height: 1.2;
}

.title-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(-3deg);
    z-index: 10;
    position: relative;
}

.title-word {
    display: flex;
    font-size: 5rem;
    letter-spacing: -5px;
    
    color: var(--nes-red);
    text-shadow: 
        
        -4px -4px 0 #000,  4px -4px 0 #000,
        -4px  4px 0 #000,  4px  4px 0 #000,
        -4px  0   0 #000,  4px  0   0 #000,
         0   -4px 0 #000,  0    4px 0 #000,
        
         4px  8px 0 var(--nes-green),
         8px  8px 0 var(--nes-green),
         8px 12px 0 var(--nes-green),
        12px 12px 0 var(--nes-green),
        
         0px 12px 0 #000,
         4px 16px 0 #000,
         8px 16px 0 #000,
         12px 16px 0 #000,
         16px 12px 0 #000,
         16px  8px 0 #000,
         12px  4px 0 #000,
          8px  0px 0 #000;
}

.title-word.miracle {
    font-size: 2rem;
    color: var(--nes-red);
    text-shadow: none;
    letter-spacing: 2px;
    margin-left: 100px;
    margin-bottom: -10px;
    z-index: 11;
    background: var(--bg-yellow);
    padding: 0 10px;
    transform: rotate(3deg);
}

.title-word span {
    display: inline-block;
    
}
.title-word span:nth-child(even) { transform: translateY(8px); }
.title-word span:nth-child(3n) { transform: translateY(-4px); }


.hud {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nes-black);
    color: var(--nes-white);
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    z-index: 100;
    font-size: 0.8rem;
    border-bottom: var(--pixel-size) solid var(--nes-gray);
}

.hud div span { color: var(--nes-green); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.dialog-box {
    background: var(--nes-white);
    border: var(--pixel-size) solid var(--nes-black);
    padding: 30px;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,1);
    margin-bottom: 40px;
}

.dialog-box::after {
    
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border: 2px solid var(--nes-black);
    pointer-events: none;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--nes-blue);
    text-shadow: 4px 4px 0 var(--nes-black);
}


.btn {
    display: inline-block;
    background: var(--nes-red);
    color: var(--nes-white);
    padding: 15px 30px;
    text-decoration: none;
    border: var(--pixel-size) solid var(--nes-black);
    font-family: inherit;
    text-transform: uppercase;
    position: relative;
    box-shadow: 4px 4px 0 var(--nes-black);
    transition: all 0.1s;
}

.btn:hover {
    background: var(--nes-white);
    color: var(--nes-red);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--nes-black);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--nes-black);
}

.blink {
    animation: blinker 1s step-end infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}


.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 40px;
}

.push-start {
    margin-top: 60px;
    font-size: 1.5rem;
    color: var(--nes-black);
    text-align: center;
}

.copyright {
    position: absolute;
    bottom: 20px;
    font-size: 0.8rem;
}


.vignette {
    position: absolute;
    border: var(--pixel-size) solid var(--nes-black);
    background: var(--nes-blue);
    overflow: hidden;
    box-shadow: -4px 4px 0 rgba(0,0,0,0.2);
}

.v-top-left {
    top: 15%;
    left: 5%;
    width: 200px;
    height: 200px;
}

.v-top-right {
    top: 10%;
    right: 10%;
    width: 250px;
    height: 150px;
}

.v-bottom-left {
    bottom: 15%;
    left: 10%;
    width: 180px;
    height: 250px;
}

.v-bottom-right {
    bottom: 20%;
    right: 5%;
    width: 120px;
    height: 300px;
}


.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stat-row {
    margin-bottom: 20px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.bar-container {
    width: 100%;
    height: 24px;
    background: var(--nes-black);
    padding: 4px;
    border: 2px solid var(--nes-white);
}

.bar-fill {
    height: 100%;
    background: var(--nes-red);
}
.bar-fill.hp { background: var(--nes-red); width: 100%; }
.bar-fill.mp { background: var(--nes-blue); width: 100%; }
.bar-fill.exp { background: var(--nes-green); width: 0%; animation: fillBar 2s forwards; }

@keyframes fillBar { to { width: 100%; } }


.quest-list {
    list-style: none;
}

.quest-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    border: 2px dashed var(--nes-black);
    background: rgba(255,255,255,0.5);
}

.quest-icon {
    width: 32px;
    height: 32px;
    background: var(--nes-black);
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}
.quest-icon::after {
    content: '?';
    color: var(--nes-yellow);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-yellow);
}



@media (max-width: 900px) {
    .title-word { font-size: 3rem; }
    .vignette { display: none;  }
    .stats-grid { grid-template-columns: 1fr; }
}


.sprite {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}
