* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #121212; color: #f1f1f1; display: flex; flex-direction: column; min-height: 100vh; }

/* HEADER SLIM */
header { background: #1a1a1a; padding: 10px 20px; text-align: center; border-bottom: 2px solid #333; }
header h1 { font-size: 1.4rem; color: #fff; margin-bottom: 2px; }
header nav a { color: #7fbfff; font-size: 0.85rem; font-weight: bold; text-decoration: none; }

/* Layout imponente para Desktop */
main { flex: 1; padding: 20px; max-width: 1600px; margin: 0 auto; width: 100%; }

/* PAGINAÇÃO SEO */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.pagination a, .pagination span { padding: 10px 15px; background: #1f1f1f; border: 2px solid #333; border-radius: 5px; color: #fff; font-weight: bold; transition: 0.2s; text-decoration: none; }
.pagination a:hover { background: #7fbfff; color: #000; border-color: #7fbfff; }
.pagination span.current { background: #e74c3c; border-color: #e74c3c; cursor: default; }

/* ABAS */
.anime-tabs-nav { list-style: none; display: flex; gap: 8px; margin-bottom: 25px; border-bottom: 2px solid #333; padding-bottom: 15px; justify-content: center; flex-wrap: wrap; }
.anime-tabs-nav li { background: #1a1a1a; padding: 8px 18px; border-radius: 30px; cursor: pointer; font-weight: bold; border: 2px solid #333; transition: 0.3s; font-size: 0.9rem; }
.anime-tabs-nav li.active { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.tab-pane { display: none; animation: slideUp 0.4s ease forwards; }
.tab-pane.active { display: block; }

/* LAYOUT TIER LIST LADO A LADO */
.tier-game-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    .tier-game-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .tier-content-area {
        flex: 1;
    }

    .tier-pool-wrapper {
        width: 430px; 
        position: sticky;
        top: 20px;
        max-height: 90vh;
        overflow-y: auto;
        margin-top: 0 !important;
    }
}

/* TIER LIST - AJUSTE DE LARGURA DA LABEL (200px) */
.tierlist-wrapper { background: #000; border: 2px solid #333; border-radius: 8px; overflow: hidden; }
.tier-row { display: flex; border-bottom: 2px solid #333; min-height: 155px; } 
.tier-row:last-child { border-bottom: none; }

.tier-label { 
    width: 100px; /* Largura padrão Mobile */
    flex-shrink: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 900; 
    font-size: 1.3rem; 
    color: #000; 
    padding: 10px; 
    text-align: center;
    word-break: break-all; 
    overflow-wrap: break-word; 
    line-height: 1.1;
    outline: none;
}

@media (min-width: 1024px) {
    .tier-label {
        width: 200px; /* Largura fixa de 200px no Desktop conforme pedido */
        font-size: 1.5rem;
    }
}

.tier-dropzone { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; background: #111; align-content: flex-start; }
.tier-dropzone.drag-over { background: #222; }

.tier-card { 
    width: 100px; height: 135px; 
    position: relative; cursor: grab; border-radius: 6px; overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.6); border: 1px solid #444;
}
.tier-card:active { cursor: grabbing; }
.tier-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tier-card .tc-name-mini { position: absolute; bottom: 0; width: 100%; background: rgba(0,0,0,0.85); color: #fff; font-size: 0.65rem; text-align: center; padding: 4px 2px; font-weight: bold; }

.tier-pool-wrapper { margin-top: 20px; background: #1a1a1a; padding: 20px; border-radius: 10px; border: 2px solid #333; }
.tier-pool-wrapper h4 { margin-bottom: 15px; color: #888; text-align: center; border-bottom: 1px solid #333; padding-bottom: 10px; }
.tier-dropzone.pool { justify-content: center; }

.tier-controls { display: flex; gap: 10px; padding: 15px; justify-content: center; background: #111; border-top: 1px solid #333; }
.tier-controls button { padding: 8px 20px; cursor: pointer; font-weight: bold; border-radius: 5px; border: none; transition: 0.2s; }
.tier-controls button:hover { opacity: 0.8; }

/* CARDS GERAIS (Versus e Galeria) */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 15px; }
.trading-card { background: linear-gradient(135deg, #d4af37, #f3e5ab, #aa7700); padding: 4px; border-radius: 8px; aspect-ratio: 3/4; cursor: pointer; transition: 0.2s; position: relative; overflow: hidden; }
.tc-inner { background: #222; height: 100%; border-radius: 4px; display: flex; flex-direction: column; position: relative; border: 2px solid #8b6508; overflow: hidden; }
.tc-image { flex: 1; overflow: hidden; }
.tc-image img { width: 100%; height: 100%; object-fit: cover; }
.tc-name { background: rgba(0,0,0,0.85); color: #fff; text-align: center; font-size: 0.7rem; padding: 6px 2px; position: absolute; bottom: 0; width: 100%; font-weight: bold; }

/* DEMAIS JOGOS */
.caracara-secreto-spot { width: 140px; height: 180px; margin: 0 auto 20px; border: 4px dashed #e74c3c; position: relative; }
.caracara-secreto-spot img { width: 100%; height: 100%; object-fit: cover; }
.caracara-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.cara-card { aspect-ratio: 3/4; cursor: pointer; perspective: 1000px; }
.cara-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; }
.cara-card.flipped .cara-card-inner { transform: rotateY(180deg); }
.cara-card-front, .cara-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 6px; overflow: hidden; }
.cara-card-front img { width: 100%; height: 100%; object-fit: cover; }
.cara-card-back { background: #333; transform: rotateY(180deg); display: flex; align-items: center; justify-content: center; border: 2px solid #555; color: #fff; font-size: 2rem; font-weight: bold; }
.cara-card-front .nome { position: absolute; bottom: 0; width: 100%; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.6rem; text-align: center; padding: 4px 0; }
.btn-start { display: block; margin: 0 auto 20px; padding: 12px 25px; background: #e74c3c; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }

/* FOTO */
.foto-container { text-align: center; max-width: 500px; margin: 0 auto; }
.foto-misterio-wrapper { position: relative; margin-bottom: 20px; overflow: hidden; border-radius: 12px; border: 4px solid #333; height: 300px; background: #000; }
#foto-imagem-reveal { width: 100%; height: 100%; object-fit: cover; transition: filter 0.5s ease; pointer-events: none; }
.foto-stats { display: flex; justify-content: space-around; margin-bottom: 15px; font-weight: bold; font-size: 1.1rem; }
.foto-feedback { padding: 10px; border-radius: 8px; margin-bottom: 10px; font-weight: bold; display: none; }
.foto-feedback.acertou { background: #2ecc71; color: #fff; }
.foto-feedback.errou { background: #e74c3c; color: #fff; }
.autocomplete-wrapper { position: relative; width: 100%; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #1f1f1f; border: 2px solid #333; border-radius: 8px; z-index: 100; max-height: 200px; overflow-y: auto; display: none; }
.autocomplete-item { padding: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; border-bottom: 1px solid #333; text-align: left; }
.autocomplete-item:hover { background: #333; }
.autocomplete-item img { width: 35px; height: 35px; border-radius: 4px; object-fit: cover; }

/* PIP CAMERA */
#camera-pip-wrapper {
    position: fixed;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    border: 4px solid #e74c3c;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: grab;
    display: none;
    resize: both;
    overflow: hidden;
    min-width: 100px;
    min-height: 100px;
    max-width: 400px;
    max-height: 400px;
    background: #000;
}
#camera-pip-wrapper:active { cursor: grabbing; }

#camera-pip {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* so wrapper handles drag and resize */
}

/* RANDOM GAMEMODE */
.random-layout { display: flex; flex-direction: column; gap: 20px; align-items: center; }
@media (min-width: 768px) {
    .random-layout { flex-direction: row; align-items: flex-start; justify-content: center; }
    .random-rankings { flex: 1; max-width: 400px; }
    .random-left-area { width: 300px; position: sticky; top: 20px; text-align: center; }
}
.random-rankings { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.random-tier-row { display: flex; border: 1px solid #333; border-radius: 4px; overflow: hidden; background: #111; min-height: 110px; }
.random-label { width: 50px; font-size: 1.5rem; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.random-dropzone { flex: 1; display: flex; align-items: center; justify-content: center; background: #1a1a1a; transition: 0.2s; padding: 5px; }
.random-dropzone.drag-over { background: #333; }
