/* ────────────────────────────────────────────────────────────────────────────────
 *      MyPassWord - Estilos - 2025
 * ──────────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

:root {
    /* OBRIGATÓRIO: Diz ao navegador que o site aceita ambos os temas */
    color-scheme: light dark;

/*  ──────────────────────────────────────────────────────────────────────────────────────
    PALETA DE CORES COM LIGHT-DARK()
    Sintaxe: light-dark(versão-clara, versão-escura)
    ────────────────────────────────────────────────────────────────────────────────────── */
    /* NEOMORPHIC - Paleta Base */
    --color-bg-main:        light-dark(oklch(96% 0.0100 267),oklch(20% 0.0100 267));
    --color-bg-alt:         light-dark(oklch(94% 0.0111 243),oklch(24% 0.0111 243));
    --color-bg-alt:         light-dark(#e5ecf2,#1b2024);
    
    --color-fg-light:       light-dark(oklch(80% 0.0149 238),oklch(45% 0.0149 238));
    --color-fg-dark:        light-dark(oklch(59% 0.0294 243),oklch(88% 0.0294 243));

    --color-gray-light:     light-dark(oklch(80% 0.0149 238),oklch(45% 0.0149 238));
    --color-gray-dark:      light-dark(oklch(59% 0.0294 243),oklch(88% 0.0294 243));

    /* NEOMORPHIC - Sombras */
    --shadow-light-color:       light-dark(oklch(99% 0.0055 275),oklch(28% 0.0100 267 / 0.4));
    --shadow-dark-color:        light-dark(oklch(22% 0.0085 224 / 0.23),oklch(10% 0.0050 267 / 0.7));
    --btn-shadow-light:         light-dark(oklch(99% 0.0001 271 / 0.9),oklch(28% 0.0100 267 / 0.35));
    --btn-shadow-dark:          light-dark(oklch(22% 0.0085 224 / 0.15),oklch(10% 0.0050 267 / 0.65));
    --shadow-btn-alt-shadow-1:  light-dark(oklch(99% 0.0001 271 / 0.9),oklch(28% 0.0100 267 / 0.35));
    --shadow-btn-alt-shadow-2:  light-dark(oklch(22% 0.0085 224 / 0.15),oklch(10% 0.0050 267 / 0.65));

    --radius-sm: .8rem;
    --radius-md: 1.6rem;
    --radius-lg: 2.4rem;

    /* ───────────    FONT FAMILY    ─────────── */
    --font-head: "Google Sans Flex", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;    
    --font-body: "Google Sans Flex", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;    
    --font-mono: "Google Sans Code", monospace;
    
    /* ───────────   TAMANHOS DE FONT   ─────────── */
    /* Tamanho padrão para calculo dos outros tamanhos */
    ---fs-default: 10px;        
    --fs-md: clamp(1.2rem, 0.3vw + 1rem, 1.6rem); /* 12px a 16px */

    /* Tamanhos menores */
    --fs-sm: calc(var(--fs-md) - .1rem);
    --fs-sm1: calc(var(--fs-md) - .1rem);
    --fs-sm2: calc(var(--fs-md) - .15rem);
    --fs-sm3: calc(var(--fs-md) - .2rem); 
    --fs-sm4: calc(var(--fs-md) - .25rem);

    /* Tamanhos maiores*/
    --fs-lg: calc(var(--fs-md) + .3rem);
    --fs-lg1: calc(var(--fs-md) + .4rem);
    --fs-lg2: calc(var(--fs-md) + .8rem);
    --fs-lg3: calc(var(--fs-md) + 1.2rem);
    --fs-lg4: calc(var(--fs-md) + 1.6rem);

    --gap-padrao: 16px;
}

*{-webkit-tap-highlight-color: transparent;}
*,
*::before,
*::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;        
}
/* Força o navegador a renderizar o light-dark() como CLARO */
html[data-theme="light"] {color-scheme: light;}
/* Força o navegador a renderizar o light-dark() como ESCURO */
html[data-theme="dark"] {color-scheme: dark;}

html {
    font-size: var(---fs-default);
    scroll-behavior:smooth;
}
body {
    font-family: var(--font-body);
    font-size: var(--fs-md);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    
    background: var(--color-bg-main);
    color: var(--color-fg-dark);
    
    padding: 1rem;
    min-height:100vh;
    overflow-x:hidden;
    -webkit-font-smoothing: antialiased;
}
header{padding:2rem;margin:0;}
:where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-head);
}
:where(p,h1,h2,h3,h4,h5,h6) {
    margin: 0;
    overflow-wrap: normal;
    /* overflow-wrap: break-word; */
    /* hyphens: auto; */
}
:where(h1,h2,h3,h4) {
    text-wrap: balance;
    font-weight: 700;
    /* letter-spacing: -0.02em; */
}
:where(p,h5,h6) {
    font-weight: 600;
    text-wrap: pretty;
}
p { font-size: var(--fs-md) }
h1 { font-size: var(--fs-lg4) }
h2 { font-size: var(--fs-lg3) }
h3 { font-size: var(--fs-lg2) }
h4 { font-size: var(--fs-lg1) }
h5 { font-size: var(--fs-lg) }
h6 { font-size: var(--fs-md) }

button {
    font: inherit;
    cursor: pointer;
}
img,
svg {
    max-width: 100%;
    display: block;
}
svg:not(:root) {
    overflow: hidden;
}    
a {
    color: inherit;
    text-decoration: none;
    text-decoration-skip-ink: auto;
    font-size: inherit;
}
td {
    padding:1rem;
    border-bottom:1px solid transparent;
}
ul {
    list-style: none;
}
li{
    margin: 0.5rem 0;
}
hr {
    border: none;
    border-bottom: 1px solid var(--color-fg-dark);
    margin: 1rem 2rem;
}

/* ────────────────────────────────────────────────────────────────────────────────
 *      COMPONENTS
 * ──────────────────────────────────────────────────────────────────────────────── */
.main-grid{
    display: grid;
    grid-template-columns: 1fr;
    /* grid-template-rows: repeat(1,1fr); */
    
    /* min-height: 100vh; */
    

    align-items: start;
    justify-content: center;
    /* place-items: center; /* Centraliza vertical e horizontalmente ao mesmo tempo */

    gap: 2rem;
    padding: 1rem 1.6rem;
    margin: -1rem auto;
    
    border: 1px solid transparent;
    border:none;
    border-radius: var(--radius-md);
    background: var(--color-bg-main);
    box-sizing: border-box; /* Evita que o padding aumente o tamanho total da div */
    box-shadow: -10px -10px 20px var(--shadow-light-color), 
                10px 10px 20px var(--shadow-dark-color);
}
.grid{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap:1rem;
}
.gr-1-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap:1rem;
}   
.gc-1-1 {
    display: grid;
    grid-template-columns: 1fr;
    /* grid-template-rows: 1fr; */
}
.neo-card {
    display: grid;        
    width: 100%;
    background: var(--color-bg-main);
    border-radius: var(--radius-md);
    padding:2rem;
    /* margin-bottom: 20px; */
    gap:2rem;
    box-shadow: -10px -10px 20px var(--shadow-light-color), 
                10px 10px 20px var(--shadow-dark-color);
}
.font-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}
/* ==================== FORM INPUTS ==================== */
.neo-input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    outline: none;

    background-color: var(--color-bg-main);
    color: var(--color-gray-dark);

    font-family: var(--font-mono);
    font-size: var(--fs-sm1);
    border-radius: 12px;
    transition: .3s ease-in-out;
    
    /* Elementos de input normalmente usam sombra interna (X & Y: 5, Blur: 10) */
    box-shadow: inset -5px -5px 10px var(--shadow-light-color), 
                inset 5px 5px 10px var(--shadow-dark-color);
    &:focus {
        /* Efeito sutil ao focar para acessibilidade e design */
        box-shadow: inset -2px -2px 5px var(--shadow-light-color), 
                    inset 2px 2px 5px var(--shadow-dark-color),
                    0 0 0 2px var(--color-gray-light);
        }
}
.small {
    font-size: var(--fs-sm4);
    text-align: center;
}

label { display: block; margin-bottom: 5px; font-size: 13px; }

select {
    width: 100%;
    padding: 8px;
    color: #cccccc;
    background-color: #3c3c3c;
    border: 1px solid #3c3c3c;
    border-radius: 2px;
}

.checkbox-group {display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.checkbox-group label { display: flex; align-items: center; cursor: pointer; font-size: 13px; }
.checkbox-group input { margin-right: 8px; accent-color: #007acc; }

/* ────────────────────────────────────────────────────────────────────────────────
 *      BUTTONS
 * ──────────────────────────────────────────────────────────────────────────────── */
.neo-btn {
    display: inline-block;
    align-items: center;
    justify-content: center;

    width: 100%;
    padding: 14px 24px;

    border-radius: 12px;
    border: 1px solid transparent;
    outline: none;

    background-color: var(--color-bg-main);
    color: var(--color-gray-dark);

    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--fs-sm1);
    text-align: center;
    
    cursor: pointer;
    box-shadow: -10px -10px 20px var(--shadow-light-color), 
                10px 10px 20px var(--shadow-dark-color);
    transition: .25s ease-in-out;
    &:hover, &:active{
        box-shadow: inset -5px -5px 10px var(--shadow-light-color), 
                    inset 5px 5px 10px var(--shadow-dark-color);
        /* box-shadow: inset 1px 1px 10px var(--color-btn-alt-shadow-1), 
                    inset -1px -1px 10px var(--color-btn-alt-shadow-2); */
        transform: translateY(-1px);
    }
}
/* Botão Secundário usando a cor alternativa */
.neo-btn-alt {
    background-color: var(--color-bg-alt);
    box-shadow: -10px -10px 20px var(--color-btn-alt-shadow-1),        
                10px 10px 20px var(--color-btn-alt-shadow-2);
    /* transition: .25s ease-in-out; */
    /*&:active, &:hover {
         box-shadow: inset -5px -5px 10px var(--color-btn-alt-shadow-1), 
                    inset 5px 5px 10px var(--color-btn-alt-shadow-2); 
    }*/
}
  /* 1ª Caixa: Inner Shadows (X&Y: 5, Blur: 10) */
  .neo-shadow-inner-1 {
    box-shadow: inset -5px -5px 10px var(--shadow-light-color), 
                inset 5px 5px 10px var(--shadow-dark-color);
  }

  /* 2ª Caixa: Outer Shadows Suave (X&Y: 5, Blur: 10) */
  .neo-shadow-outer-1 {
    box-shadow: -5px -5px 10px var(--shadow-light-color), 
                5px 5px 10px var(--shadow-dark-color);
  }

  /* 3ª Caixa: Outer Shadows Média (X&Y: 10, Blur: 20) */
  .neo-shadow-outer-2 {
    box-shadow: -10px -10px 20px var(--shadow-light-color), 
                10px 10px 20px var(--shadow-dark-color);
  }

  /* 4ª Caixa: Outer Shadows Intensa (X&Y: 20, Blur: 40) */
  .neo-shadow-outer-3 {
    box-shadow: -20px -20px 40px var(--shadow-light-color), 
                20px 20px 40px var(--shadow-dark-color);
  }

/* ────────────────────────────────────────────────────────────────────────────────
 *      ESTILOS DO CHECKBOX
 * ──────────────────────────────────────────────────────────────────────────────── */
/* Container que envolve o checkbox e o texto descritivo */
.neo-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-body);
    color: var(--color-gray-dark);
    gap: 12px;
    /* padding: 8px; */
}

/* Esconde o input nativo do navegador de forma acessível */
.neo-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* O "Box" customizado (Estado padrão: Desmarcado / Convexo) */
.neo-checkbox-custom {
    position: relative;
    width: 24px;
    height: 24px;
    background-color: var(--color-bg-alt);
    border-radius: 6px; 
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sombra externa padrão (Elemento "saltando" para fora) */
    box-shadow: -4px -4px 10px var(--btn-shadow-light), 
                4px  4px 10px var(--btn-shadow-dark);
}

/* Efeito interno do "Check" (O marcador interno) */
.neo-checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
    
    /* Desenha o símbolo de "V" usando bordas */
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid var(--color-gray-dark);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    transition: 0.2s ease-in-out;
}

/* ==================== ESTADOS DO CHECKBOX ==================== */
/* 1. Quando Selecionado (:checked) */
/* O Box "afunda" na tela (Muda para Inner Shadow) */
.neo-checkbox-input:checked ~ .neo-checkbox-custom {
    box-shadow: inset -3px -3px 6px var(--shadow-light-color), 
                inset 3px 3px 6px var(--shadow-dark-color);
    background: var(--color-bg-main);
}

/* Mostra o símbolo de "V" */
.neo-checkbox-input:checked ~ .neo-checkbox-custom::after {
    display: block;
}

/* Opcional: Destaca a cor do texto quando marcado */
.neo-checkbox-input:checked ~ .neo-checkbox-text {
    font-weight: 400;
}

/* 2. Estado de Foco (Acessibilidade via Teclado) */
.neo-checkbox-input:focus-visible ~ .neo-checkbox-custom {
    outline: 2px solid var(--color-gray-light);
    outline-offset: 3px;
}


#statusMessage { margin-top: 15px; font-size: 12px; color:  var(--color-green); }




/* Estilização Barra */
.meter-background {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}



/* --------------------------------------------------------------------------
    1. CELULARES GRANDES / PAISAGEM (Landscape)
    Dispositivos de 576px ou mais.
-------------------------------------------------------------------------- */
@media (min-width: 576px) {
/* Estilos para celulares deitados ou smartphones muito grandes (Pro Max/Ultra) */
    .gc-1-1 {
        display: grid;
        grid-template-columns: 1fr;
        /* grid-template-rows: 1fr; */
    }
}

/* --------------------------------------------------------------------------
    2. TABLETS
    Dispositivos de 768px ou mais. Ex: iPad mini, iPad padrão, Galaxy Tab.
-------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .display-hide{display: block;}
    .main-grid {
        display:grid;
        min-height: 100vh;
        grid-template-columns: 1fr;
        /* grid-template-rows: auto 1fr;       */
        /* grid-template-rows: repeat(1,1fr); */
    }
    .grid{
        align-items: center;
        justify-content: center;
    }
    .gc-1-1 {
        display: grid;
        grid-template-columns: 1fr;
        /* grid-template-rows: 1fr; */
    }
    .gc-1-2 {
        display: grid;
        grid-template-columns: 1fr 2fr;
        grid-template-rows: 1fr;
    }
 
    
    /* O ponto de virada onde o layout geralmente ganha mais colunas */
    .container{
        width:min(var(--container),92%);
        margin:auto;
    }
}

/* --------------------------------------------------------------------------
    3. TABLETS GRANDES / NOTEBOOKS PEQUENOS
    Dispositivos de 992px ou mais. Ex: iPad Pro, Microsoft Surface, Laptops compactos.
-------------------------------------------------------------------------- */
@media (min-width: 992px) {    
/* Perfeito para mudar menus hambúrguer para menus horizontais extensos */
    .main-grid{
        max-width: 60vh; /* Garante que o elemento ocupe no máximo 560px em dispositivos maiores */
    }
    .grid{
        align-items: center;
        justify-content: center;
    }
    .gc-1-1 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
    .gc-1-2 {
        display: grid;
        grid-template-columns: 1fr 2fr;
        grid-template-rows: 1fr;
    }

}