/* ============================================
   THE MOON IS WATCHING — design
   ============================================
   LAYOUT MODE: responsive grid
   - the 5 columns are a CSS grid (auto-organized)
   - inside each column, retalhos stack (flex column)
   - sizes use % / vh / rem so it scales with the screen
   - the floating phone (celular) is the only free element
   ORDER OF SECTIONS:
   0. tokens  
   1. base  
   2. grid  
   3. shared
   4. social  
   5. left col   
   6. center col  
   7. right col
   8. kingdom   
   9. copyright
   ============================================ */
   
/* custom font */
@font-face {
  font-family: 'Realistic Nature';
  src: url('fonts/realistic_nature.otf') format('opentype');
  font-display: swap;   
}

/* ============================================
   0. TOKENS
   ============================================ */
:root {
    --fundo-escuro: #0d0a1a;
    --roxo: #6b4f9e;
    --verde: #4a7c59;
    --azul: #2d4a6b;
    --dourado: #c9a24b;
    --texto: #d8d0e8;
}


/* ============================================
   1. GLOBAL BASE
   ============================================ */

/* page background */
html {
    background-color: var(--fundo-escuro);
    background-image: url('pngs/estrelas.gif');
    background-repeat: repeat;
    height: 100%;
    overflow: hidden;
}

/* body */
body {
    color: var(--texto);
    font-family: Georgia, serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* mushroom cursor everywhere */
*, *:hover, *:active, *:focus, *:visited,
a, a:link, a:hover, a:active, a:visited {
    cursor: url('pngs/mushroom_clean.png') 0 0, auto !important;
}

/* main title */
h1 {
    color: var(--dourado);
    text-align: center;
    text-shadow: 0 0 10px var(--roxo);  /* glow */
    letter-spacing: 2px;
    margin: 0;
    font-family: 'Realistic Nature', cursive;
}

/* subtitles */
h2 {
    color: var(--verde);
    border-bottom: 1px solid var(--roxo);
    padding-bottom: 5px;
}

/* links */
a {
    color: var(--dourado);
    text-decoration: none;
}

a:hover {
    color: var(--verde);
    text-shadow: 0 0 8px var(--verde);
}

/* images */
img {
    display: block;
    margin: 20px auto;
    border: none
    border-radius: 8px;
}

/* nav menu */
nav {
    text-align: center;
    margin-bottom: 30px;
    padding: 12px;
    border: 1px solid var(--roxo);
    border-radius: 8px;
}

nav a {
    margin: 0 15px;
    font-size: 1.1em;
    letter-spacing: 1px;
}


/* ============================================
   2. LAYOUT GRID (responsive)
   ============================================
   Columns use fr units = they share the width
   proportionally, so the grid scales with screen.
   ============================================ */
.main-grid {
    display: grid;
    grid-template-columns: 0.4fr 1.2fr 2fr 1.2fr 0.4fr;
    gap: 1.5%;
    height: 100vh;
    width: 100%;
    margin: 0 auto;
    padding: 1.5%;
    box-sizing: border-box;
}

/* each column is an independent vertical stack */
.coluna-grid {
    display: flex;
    flex-direction: column;
    gap: 3vh;
    min-height: 0;
    overflow-y: visible;
    overflow-x: visible;
}


/* ============================================
   3. SHARED RETALHO STYLES + PLACEHOLDERS
   ============================================ */

.retalho-welcome {
    background-color: rgba(107, 79, 158, 0.15);
    border: 2px solid var(--roxo);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.retalho-moldura {
    background-color: rgba(45, 74, 107, 0.2);
    border: 2px solid var(--dourado);
    outline: 2px solid var(--verde);
    outline-offset: 4px;  /* double frame */
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.retalho-mini {
    display: inline-block;
    background-color: var(--fundo-escuro);
    border: 1px double var(--roxo);
    border-radius: 12px;
    padding: 8px 15px;
    font-size: 0.9em;
}

/* placeholder look (dashed gold = not built yet) */
.retalho-menu,
.retalho-conteudo,
.retalho-secretos,
.retalho-livro,
.retalho-neighbours,
.retalho-stickers {
    border: 4px solid var(--dourado);      
    box-shadow: 0 0 8px var(--dourado);
    padding: 20px;
    min-height: 60px; 
    text-align: center;
    box-sizing: border-box;
    border-radius: 4px;
}


/* ============================================
   4. SOCIAL TOOLBAR (far left)
   ============================================ */

.coluna-redes {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* center vertically */
    align-items: center;

    /* background photo */
    background-image: url('pngs/canto.jpg');
    background-size: cover;
    background-position: center; 
    background-repeat: no-repeat;
}
   
/* gray toolbox panel */
.painel-toolbox { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 6px;
    background-color: #4a3a6b;

    border-top: 2px solid #2a1f42;
    border-left: 2px solid #2a1f42;
    border-bottom: 2px solid #8a6fc0;
    border-right: 2px solid #8a6fc0;

    width: 110px;
    box-sizing: border-box;
}

/* each tool button */
.ferramenta {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4a3a6b;
    color: #e8dff5;
    font-size: 1.1em;
    border-top: 2px solid #8a6fc0;
    border-left: 2px solid #8a6fc0;
    border-bottom: 2px solid #2a1f42;
    border-right: 2px solid #2a1f42;
    transition: transform 0.15s, filter 0.15s;   
}

/* pressed = sinks in */
.ferramenta:active {
    border-top: 2px solid #2a1f42;
    border-left: 2px solid #2a1f42;
    border-bottom: 2px solid #8a6fc0;
    border-right: 2px solid #8a6fc0;
}

/* icon inside a tool button */
.ferramenta img {
    width: 60%;
    height: auto;
    border: none;
    margin: 0;
    border-radius: 0;
    image-rendering: pixelated;
}

.ferramenta:hover {
    transform: translateY(-4px);  
    filter: drop-shadow(0 0 6px var(--dourado));   
}

/* decorative buttons */
.ferramenta-deco {
    color: #2a1f42;
    cursor: default;
    pointer-events: none;
}


/* ============================================
   5. LEFT COLUMN (menu, mp3 + updates phone, pros/cons)
   ============================================ */

/* --- sizes for this column's retalhos --- */
/* tablet menu */
.retalho-menu { 
    width: 120%;
    align-self: center;
    margin-top: 1vh;
    margin-bottom: 15vh;   
    position: relative;   
    height: auto;         
    border: none;         
    padding: 0;           
}

/* tablet bg */
.tablet-bg {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
    position: relative;   
    z-index: 2;           
}

/* grid overlay (temporary) */
.grid-mira {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;   /* dont block clicks */
    background-image:
        repeating-linear-gradient(to right,  red 0 1px, transparent 1px 10%),
        repeating-linear-gradient(to bottom, red 0 1px, transparent 1px 10%);
    opacity: 0.4;
}

/* tablet button */
.botao-tablet {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -50%);   
    width: 4%;              
}

/* button image */
.botao-tablet img {
    width: 280%;
    height: auto;
    margin: 0;              
    border-radius: 0;
}

/* button hover */
.botao-tablet {
    transition: transform 0.15s, filter 0.15s;   /* smooth move */
}

.botao-tablet:hover {
    transform: translate(-50%, -50%) translateY(-6px);   /* jump up */
    filter: drop-shadow(0 0 8px var(--dourado));         /* glow */
}

/* button label */
.botao-label {
    position: absolute;
    bottom: 95%;              
    left: 135%;
    transform: translateX(-50%);   
    white-space: nowrap;    
    padding: 2px 6px;
    background: rgba(0,0,0,0.7);
    color: var(--dourado);
    font-size: 0.7em;
    opacity: 0;             
    pointer-events: none;   
    transition: opacity 0.15s;
}

/* show label on hover */
.botao-tablet:hover .botao-label {
    opacity: 1;
}

/* menu strip */
.faixa-menu {
    position: absolute;
    top: 1%;                
    left: 50%;
    transform: translateX(-50%);   
    width: 70%;             
    height:20%;             
    z-index: 1;             

    background-color: #4a3a6b;         
    border-top: 3px solid #8a6fc0;     
    border-left: 3px solid #8a6fc0;
    border-bottom: 3px solid #2a1f42;  
    border-right: 3px solid #2a1f42;
    box-sizing: border-box;
}

.retalho-mp3 {
    width: 100%;
    min-height: 130px;
    align-self: center;
}

/* --- mp3 player: disc + updates side by side --- */
.player-colunas {
    display: flex;
    gap: 100px;
    align-items: flex-start;
}

.player-coluna-cd,
.player-coluna-extra {
    flex: 1;
    text-align: center;
}

/* updates container = anchor for the floating phone */
.player-coluna-extra {
    position: relative;
}

/* --- cd disc --- */
.player-cd {
    width: 140px !important;
    height: 140px !important;
    border: none;
    margin: 0 auto;
    transition: filter 0.2s;
    animation: girar 10s linear infinite;
    margin-top: -15px;
}

@keyframes girar {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


.player-cd:hover {
    filter: drop-shadow(0 0 8px var(--dourado));  
    transform: translateY(-4px);                   
}

.player-cd.tocando:hover {
    transform: none;   /* cancela o pulinho pra não travar o giro */
}

/* --- updates box: phone frame (floats, stays in px) --- */
.retalho-updates {
    width: 340px;
    height: 294px;
    box-sizing: border-box;
    margin-bottom: 25px;

    position: absolute;
    top: -90px;
    right: -100px;

    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;

    /* push content into the screen hole */
    padding-top: 75px;
    padding-left: 77px;
    padding-right: 105px;
    padding-bottom: 40px;
}

/* phone frame as TOP layer (covers the corners) */
.retalho-updates .celular-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    border: none;
    margin: 0;
    border-radius: 0;
}

/* updates - title bar */
.retalho-updates .updates-titulo {
    background-image: url('pngs/updates.gif');
    background-size: cover;
    color: var(--dourado);
    padding: 20px;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

/* updates - scrollable area */
.retalho-updates .updates-scroll {
    height: 120px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* updates - screen */
.retalho-updates .lista-updates {
    list-style: none;
    margin: 0;
    padding: 12px;
    background-image: url('pngs/floresta.gif');
    background-size: cover;
    background-color: #051009;
    border: none;
    border-radius: 4px;
}

.retalho-updates .lista-updates {
    list-style: none;
    margin: 0;
    padding: 12px;
    line-height: 1;      
}

/* updates - scrollbar */
.retalho-updates .updates-scroll::-webkit-scrollbar {
    width: 8px;
}
.retalho-updates .updates-scroll::-webkit-scrollbar-track {
    background: #000000;
}
.retalho-updates .updates-scroll::-webkit-scrollbar-thumb {
    background: var(--dourado);
    border-radius: 8px;
    box-shadow: 0 0 6px var(--dourado);
}

/* updates - entry spacing */
.retalho-updates .lista-updates li {
    margin-bottom: 12px;
}

/* updates - date */
.retalho-updates .data {
    color: var(--dourado);
    display: inline;
    font-size: 0.8em;
}

/* updates - flea gif  */
.retalho-updates .lista-updates .pulga {
    width: 16px;
    height: auto;
    display: inline-block;
    margin: 0 4px 0 0;
    border: none;
    border-radius: 0;
    vertical-align: middle;
    image-rendering: pixelated;
}

/* updates - text */
.retalho-updates .texto {
    color: var(--texto);
    font-size: 0.9em;
}

/* --- pros / cons --- */
.retalho-pro-con {
    background-color: rgba(107, 79, 158, 0.15);
    border: 2px solid var(--roxo);
    border-radius: 1px;
    padding: 5px;
    margin-bottom: 25px;
    margin-top: 3vh;      
    width: 50%;        
    height: 40vh;      
    overflow: hidden;      
    display: flex;              
    flex-direction: column;
}

/* pc: fixed header */
.pc-header {
    display: flex;              
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--roxo);
    color: var(--verde);
    font-weight: bold;
}

/* PROS ocupa metade e centraliza */
.pc-titulo-pro,
.pc-titulo-con {
    flex: 1;                    
    text-align: center;
}

/* o "&" no meio, pequeno */
.pc-e {
    flex: 0 0 auto;            
    padding: 0 4px;
    color: var(--dourado);
}

/* pc: scroll area */
.pc-scroll {
    overflow-y: auto;
    flex: 1;               
    min-height: 0;
}

/* pc: scrollbar */
.pc-scroll::-webkit-scrollbar {
    width: 8px;                          
}
.pc-scroll::-webkit-scrollbar-track {
    background: #000000;                 
}
.pc-scroll::-webkit-scrollbar-thumb {
    background: var(--dourado);         
    border-radius: 8px;
    box-shadow: 0 0 6px var(--dourado);  
}

/* pc: year row */
.pc-ano {
    display: flex;
    align-items: center;
    justify-content: center;    
    gap: 10px;                   
    color: var(--dourado);
    margin: 12px 0 6px 0;
}

.pc-ano-num {
    letter-spacing: 2px;
}

.pc-ano-gif {
    width: 20px;
    height: auto;
    border: none;
    margin: 0;
    border-radius: 0;
    image-rendering: pixelated;
}

/* pro/con two columns */
.colunas {
    display: flex;
    gap: 1px;
}

.coluna {
    flex: 1;
    background-color: rgba(107, 79, 158, 0.05);
    border-radius: 0;
    padding: 2px;
    margin-bottom: 0;
}

.pc-scroll .coluna:first-child {
    border-right: 1px solid var(--dourado);  
    border-radius: 0;
}

.retalho-pro-con ul {
    padding-left: 0;   
    margin: 1px 0;
    font-size: 0.8em;    
    list-style: none;
}

/* pc: list items */
.retalho-pro-con li {
    padding-left: 15px;                        
    line-height: 1.3;
    margin-bottom: 10px;

    background-image: url('pngs/joaninha.gif'); 
    background-repeat: no-repeat;               
    background-position: left 2px;              
    background-size: 12px;                      
    image-rendering: pixelated;                 
}


.retalho-pro-con h3 {
    font-size: 1em;       
    margin: 0 0 5px 0;
}


/* ============================================
   6. CENTER COLUMN (title, main content, stickers)
   ============================================ */

.retalho-header {
    text-align: center;
}

/* main content, scrolls */
#conteudo-central {
    flex: 1; 
    overflow-y: auto;
    min-height: 0;
    position: relative;   
    z-index: 5;           

    background-image: url('pngs/wallpaper_principal.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: repeat-y;
}

/* minigame box */
.retalho-minigame {
    border: 2px solid var(--roxo);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    background-color: rgba(107, 79, 158, 0.1);
}

.retalho-minigame iframe {
    border: none;
    border-radius: 6px;
    display: block;
    width: 100%;
}

/* stickers strip */
.retalho-stickers {
    height: 8vh;
    flex-shrink: 0;
    background-image: url('pngs/gaything.gif');  
    background-repeat: repeat-x;                  
    background-position: center;                  
    background-size: auto 40%;                    
}


/* ============================================
   7. RIGHT COLUMN (secrets, book, neighbours)
   ============================================ */

.retalho-secretos,
.retalho-neighbours {
    width: 95%;
    align-self: center;
}

.retalho-secretos   { height: 22vh; }
.retalho-neighbours { height: 21vh; }

.retalho-livro {
    width: 100%;
    flex: 1;
    align-self: center;
}

/* open book: two pages */
.paginas-livro {
    display: flex;
    gap: 15px;  /* spine */
    height: 100%;
}

.pagina {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}


/* ============================================
   8. KINGDOM BUTTON (far right)
   ============================================ */

.coluna-reino {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.botao-reino {
    width: 45px;
    height: 45px;
    border: 2px dashed var(--dourado);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
}


/* ============================================
   9. FLOATING THINGS - copyright, mrmelancholy
   ============================================ */

.copyright {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 0.75em;
    opacity: 0.6;
}

/* floating moon */
.moon-corner {
  position: fixed;   
  top: 0%;           
  left: 60%;         
  width: 28vh;       
  z-index: 10;       
  pointer-events: none;  
}




