/* ========= CONFIGURAÇÕES GERAIS ========= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'gg sans Normal', sans-serif;
    background-image: linear-gradient(rgb(247, 193, 112), rgb(243, 139, 113));
    background-repeat: repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-left: 230px;
}

:focus-visible {
    outline: 3px solid #1e1f22;
    outline-offset: 2px;
}

/* ========= HEADER ========= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 60px;
    width: 100%;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo {
    height: 42px;
    width: auto;
}

.menu-icon {
    display: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: white;
    background: none;
    border: 0;
    padding: 4px 8px;
}

/* ========= SIDEBAR ========= */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 230px;
    height: calc(100% - 60px);
    background-color: #1e1f22;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    transition: left 0.3s ease;
    z-index: 900;
    /* São 12 itens: em tela baixa o menu precisa rolar em vez de cortar. */
    overflow-y: auto;
}

.sidebar a {
    padding: 11px 25px;
    font-size: 17px;
    color: #ccc;
    text-decoration: none;
    transition: 0.2s;
}

/* Divisória das seções do menu. São 12 páginas, e sem agrupar vira uma
   lista longa demais para se achar alguma coisa nela. */
.sidebar-section {
    padding: 6px 25px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7d84;
}

.sidebar a:hover {
    background-color: #030303;
    color: #fff;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 800;
    border: 0;
}

/* ========= CONTEÚDO ========= */
.container {
    width: min(800px, 100%);
    margin: 80px auto 60px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.container .logo {
    display: block;
    margin: 0 auto 20px;
    width: 60%;
    height: auto;
}

.subtitle {
    font-size: large;
    color: #333;
}

/* ========= TABELA DE COMANDOS ========= */
.command-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

.command-table tr {
    border-bottom: 1px solid #dbdef4;
}

.command-table th,
.command-table td {
    padding: 12px;
    text-align: left;
}

.command {
    color: #5c65f2;
    background-color: #dbdef4;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    white-space: nowrap;
}

.command:hover {
    color: white;
    background-color: #5865f2;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 20px;
}

/* ========= TERMOS DO LIAR'S DECK ========= */
/* As cores dos naipes vêm do LiarsSuit no bot. O verde das joias foi escurecido
   de #00a51b para passar em contraste no card branco, que é mais claro que o
   embed do Discord de onde a cor original veio. */
.jewel {
    color: #008815;
    font-weight: bold;
}

.cookie {
    color: #1139c7;
    font-weight: bold;
}

.star {
    color: #8b5fb3;
    font-weight: bold;
}

.joker {
    color: #ae0f6e;
    font-weight: bold;
}

.donut {
    color: #604830;
    font-weight: bold;
}

/* ========= TERMOS DO IDLE ========= */
.injector {
    color: #b5479b;
    font-weight: bold;
}

.warp {
    color: #3a86c8;
    font-weight: bold;
}

.building {
    color: #b06a2c;
    font-weight: bold;
}

/* ========= BOTÕES ========= */
.button-container {
    margin-top: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.button {
    background-color: #f29158;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.2s;
    border: 0px;
    font: inherit;
    cursor: pointer;
}

.button:hover {
    background-color: #c46a47;
}

.button:disabled {
    background-color: #f3ad85;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========= ORDENAR ========= */
.sort-container {
    text-align: center;
    margin-bottom: 1rem;
}

#sort {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 6px;
    font: inherit;
}

/* ========= ITENS ========= */
.item-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    justify-items: center;
    margin-top: 1rem;
}

.item {
    background-color: #1d1d1d;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    max-width: 260px;
    text-align: center;
    color: #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
    cursor: pointer;
    font: inherit;
    display: block;
}

.item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    border-color: #883232;
}

.item p {
    margin: 6px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.item b {
    color: #ff7a7a;
}

.item i {
    color: #aaa;
    font-size: 0.9rem;
}

.item-image {
    display: block;
    margin: 6px auto 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}

.item-image.wide {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ========= TOAST ========= */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(12px);
    background-color: #1e1f22;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
    max-width: calc(100% - 32px);
    text-align: center;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========= OUTROS ========= */
.emoji {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.message {
    border-radius: 10px;
    display: block;
    margin: 20px auto;
    width: 100%;
    height: auto;
}

/* Vários prints lado a lado, para comparar variações sem empilhar
   três imagens altas uma embaixo da outra. */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.gallery .message {
    margin: 0;
}

.timestamp {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 1px 2px;
    border-radius: 3px;
}

/* ========= FOOTER ========= */
.footer {
    background-color: #333;
    color: white;
    padding: 18px;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.social {
    width: 36px;
    height: 36px;
    object-fit: contain;
    padding: 5px;
    border-radius: 100%;
    vertical-align: middle;
}

/* ========= MOBILE ========= */
@media (max-width: 900px) {
    body {
        padding-left: 0;
    }

    .menu-icon {
        display: block;
    }

    .sidebar {
        left: -230px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar.open~.sidebar-backdrop,
    .sidebar-backdrop.visible {
        display: block;
    }

    /* Trava o scroll do fundo enquanto o menu está aberto. */
    body.menu-open {
        overflow: hidden;
    }

    .container {
        width: min(800px, 100% - 2rem);
        margin-top: 90px;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .item-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .item {
        padding: 10px;
        font-size: 0.9rem;
    }

    .container .logo {
        width: 85%;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 12px;
    }

    .navbar .logo {
        height: 32px;
    }

    .navbar-right .button {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
