
:root {
    --win-width: clamp(6rem, 2.786rem + 8.571vw, 10.5rem);
    --win-height-base: clamp(6rem, 2.786rem + 8.571vw, 10.5rem);
    --gap: 0.5em;
}

body {
    background-size: cover;
}

.purple{
    color: var(--purple);
}

#bgvideo{
    position: fixed;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

marquee{
    margin: 1vh 0 1vh 0;
    background-color: var(--sec-black-trans);
    color: white;
    padding: 0.2rem;
    backdrop-filter: blur(2px);
}


/*Janelas Gerais*/

.grid-container {
    display: grid;
    justify-content: center;
    align-content: center; 
    padding: 2rem;
    grid-template-columns: repeat(3, var(--win-width));
    grid-template-rows: repeat(3, var(--win-height-base)); 
    gap: var(--gap);
    grid-template-areas:
        "box-a box-a box-b"
        "box-c box-d box-e"
        "box-c box-d box-f";
}

.window {
    background: linear-gradient(to bottom, rgba(0, 48, 191, 0.619) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 50%,rgba(165, 220, 255, 0.299) 100%);
    backdrop-filter: blur(3px);
    border-radius: 8px;
    box-shadow: 3px 10px 6px -3px var(--sec-black-trans), 0px 3px 4px rgba(196, 248, 255, 0.313) inset;
    position: relative;
    will-change: transform;
    z-index: 1;
    width: 100%;
    height: 100%; 
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.window.dragging {
    opacity: 0.85;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.window-header {
    color: #ffffff;
    padding: 0.4rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.window-header:active {
    cursor: grabbing;
}

.title {
    font-weight: 600;
    font-size: 0.8em;
}

.minimize-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.5s;
}
    .minimize-btn:hover {
        background: rgba(255, 255, 255, 0.4);
    }

/* --- MÁGICA DA ANIMAÇÃO DO CONTEÚDO --- */
.content-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.3s ease;
    flex-grow: 1;
    min-height: 0;
}

/* Quando minimizado, o grid do conteúdo vai para 0 */
.window.minimized .content-wrapper {
    grid-template-rows: 0fr;
}
.window.minimized {
    height: fit-content !important;
    min-height: 0 !important;
    flex-grow: 0 !important;
    padding-bottom: 0; /* Garante que não sobre espaço embaixo do header */
}

/* Esconde o que sobrar quando a altura for 0 */
.window-content {
    overflow: hidden;
}

/* O padding real fica aqui dentro para não atrapalhar a animação da altura */
.content-inner {
    scrollbar-color: #fff transparent;
    scrollbar-width: thin;
    padding: 0 0.45rem 0.45rem 0.45rem;
    height: 100%; 
    min-height: 2rem; 
    box-sizing: border-box;
    overflow-y: auto;
}

/* Arredonda os cantos de baixo quando minimizado */
.window.minimized .window-header {
    border-radius: 8px;
    transition: border-radius 0.3s step-end;
}

.window.minimized {
    height: fit-content;
    align-self: start; 
}

/* abouts */
#about{
    min-height: 100%;
    background: url("../../IMG/arquive/whattile.png");
    background-repeat: repeat;
    animation: diagonalSlide 20s linear infinite;
    color: var(--main-black-rgb);
    padding: 0.3rem;
}
@keyframes diagonalSlide {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 200px 200px; 
    }
}

#about h3{
    margin: 0;
}
#about p{
    margin: 0.2rem;
}
#about img{
    width: 6rem;
}
/*socials*/
#socials{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    max-width: 18rem;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--main-black-rgb) 0%, var(--sec-black-trans) 100%);
    padding: 0.4rem;
}
.socialitem {
        max-width: 40px;
        max-height: 40px;
        display: flex;
        filter: drop-shadow( 0px 3px 5px var(--main-black-rgb) );
        transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
        }
        .socialitem:hover{
                 transform: scale(1.1);
                 filter: drop-shadow( 0px 5px 8px #000);
            }
#socials p{
    color: #ffffff;
    font-size: 0.8em;
    margin: 0;
    width: 100%;
}
#socials span{
    font-size: 0.74em;
}

/*art*/

.art-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.art-blur-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../../IMG/arquive/mini/2026\ Stemley\ 15-02.webp);
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    z-index: 1;
}

.art-main-img {
    position: relative;
    z-index: 2;
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.art-footer-link {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 0.7em;
    z-index: 3;
}

/*changelog*/
#log{
    min-height: 100%;
    background: linear-gradient( rgb(0, 0, 0), rgba(0, 0, 0, 0.5) ), url(https://upload.wikimedia.org/wikipedia/commons/1/17/Digital_rain_animation_small_letters_clear.gif);
    color: greenyellow;
    font-size: 0.9em;
    margin: 0;
    padding: 0.2rem;
    font-family: 'digitaltxt';
    text-shadow: 0 0 6px greenyellow;
}
#log p h3{
    margin: 0;
}

/*firend*/

#friend{
    position: relative;
    width: 99%;
    height: 99%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#friend img{
    position: relative;
    height: 100%;
    width: 100%;
}
#friend p{
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.2rem;
    background: rgba(0, 0, 0, 0.618);
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 0.6em;
    z-index: 3;
}

/*snail*/
#snailguy{
    width: 99%;
    height: 99%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#snailguy img{
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* mobs */

@media (max-width: 768px) {
    :root {
        --win-width: 85vw; 
        --win-height-base: 250px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto; 
        grid-template-areas: 
            "box-a" "box-b" "box-c" "box-d" "box-e" "box-f";

        justify-items: center; 
        padding: 20px 0; 
        gap: 1.5em;
    }
    .window {
        width: var(--win-width);
        max-width: 100%;
        margin: 0 auto; 
    }

    .window-header {
        padding: 0.8rem;
    }

    .title {
        font-size: 1em;
    }

    .content-inner {
        min-height: 100px;
    }

    .art-container {
        height: 250px;
    }

    .window[style*="grid-area: box-a;"],
    .window[style*="grid-area: box-d;"] {
        min-height: 200px;
    }

    .window[style*="grid-area: box-e;"],
    .window[style*="grid-area: box-f;"] {
        height: 180px;
    }

    #friend img, .snailguy {
        object-fit: contain; 
        max-height: 100%;
    }
}

#others{
    background: linear-gradient(var(--sec-black-trans), var(--main-black-rgb));
    margin: 0;
    backdrop-filter: blur(2px);
    
}

#others h1{
    margin: 0;
    padding: 2rem 0;
    color: #fff;
    text-shadow: 0 5px 0 var(--purple);
    text-align: center;
    font-size: clamp(1.4rem, 0.257rem + 3.048vw, 3rem);
}

#others ul{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(0.500rem, calc(-0.308rem + 3.077vw), 2.000rem);
    list-style-type: none;
    margin: 0;
    gap: var(--gap);
}

#interest img{
    max-width: clamp(6.000rem, calc(4.856rem + 4.359vw), 8.125rem);
    height: auto;
    filter: drop-shadow(0 4px 8px var(--main-black-rgb));

}

.pal{
    max-width: auto;
    height: clamp(12rem, 6.286rem + 15.238vw, 20rem);
    filter: drop-shadow(0 4px 8px var(--main-black-rgb));
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}
    .pal:hover{
        transform: scale(1.1);
    }
#others p {
    margin: 0;
    padding: 0;
    padding: 2rem;
    color: var(--purple);
}

#outro{
    display: flex;      
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0;
    padding: 1rem;
}
