/* gallery_v13.css — skin gallery + custom skin creator */

/* ── Cabeçalho com botão fechar ────────────────────────────────── */
#gallery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#gallery-close-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #94a3b8;
    border-radius: 8px;
    width: 28px; height: 28px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex; align-items: center; justify-content: center;
}
#gallery-close-btn:hover { background: rgba(248,81,73,0.22); color: #f87171; border-color: rgba(248,81,73,0.35); }

/* ── Barra de abas — topo (sempre visível) ─────────────────────── */
#gallery-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Botões de aba compartilhados ──────────────────────────────── */
.gallery-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.83rem;
    font-weight: 700;
    font-family: 'Ubuntu', Arial, sans-serif;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all 0.18s ease;
    outline: none;
    white-space: nowrap;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Minhas Skins — roxo/violeta */
#private-tab,
.gal-tab-private {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 2px 10px rgba(124,58,237,0.38);
}
#private-tab:hover,
.gal-tab-private:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 18px rgba(124,58,237,0.55);
    transform: translateY(-1px);
}
#private-tab.active,
.gal-tab-private.active {
    background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
    box-shadow: 0 0 0 2.5px rgba(139,92,246,0.5), 0 4px 14px rgba(124,58,237,0.45);
}

/* Skins Públicas — azul */
#public-tab,
.gal-tab-public {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 2px 10px rgba(37,99,235,0.38);
}
#public-tab:hover,
.gal-tab-public:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 18px rgba(37,99,235,0.55);
    transform: translateY(-1px);
}
#public-tab.active,
.gal-tab-public.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    box-shadow: 0 0 0 2.5px rgba(59,130,246,0.5), 0 4px 14px rgba(37,99,235,0.45);
}

/* ── Barra de abas duplicada (gallery-body) ─────────────────────
   Maior e mais espaçada no desktop. Oculta no mobile.           */
.gallery-tabs-body {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 6px;
}
.gallery-tabs-body .gallery-tab {
    padding: 9px 24px;
    font-size: 0.88rem;
}

/* ── Botões de paginação ────────────────────────────────────────── */
.pagination-controls {
    text-align: center;
    padding: 10px 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-paginacao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border: none;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Ubuntu', Arial, sans-serif;
    color: #fff;
    cursor: pointer;
    transition: all 0.18s ease;
    outline: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.btn-paginacao:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-paginacao:active { transform: scale(0.95); }

/* « Primeira — cinza ardósia */
.btn-primeira {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 2px 8px rgba(71,85,105,0.40);
}
/* ‹ Anterior — âmbar/laranja */
.btn-anterior {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 2px 8px rgba(217,119,6,0.40);
}
/* Próxima › — esmeralda/verde */
.btn-proxima {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 2px 8px rgba(5,150,105,0.40);
}
/* Última » — violeta */
.btn-ultima {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 2px 8px rgba(124,58,237,0.40);
}

.pagina-atual {
    font-weight: 700;
    font-size: 0.83rem;
    color: #60a5fa;
    padding: 0 4px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   MOBILE — esconde abas do gallery-body, mantém só
   as do topo (#gallery-tabs) para ganhar espaço.
   ══════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Abas do topo: compactas mas bem visíveis */
    #gallery-tabs { padding: 8px 10px 6px; gap: 6px; }
    .gallery-tab  { padding: 7px 14px; font-size: 0.78rem; }

    /* Skins menores no mobile */
    .skin img { width: 56px !important; height: 56px !important; }

    /* Paginação compacta */
    .btn-paginacao { padding: 6px 10px; font-size: 0.75rem; }
    .pagina-atual  { font-size: 0.78rem; }
}

#gallery {
    display: none;
    position: fixed !important;
    z-index: 999999 !important;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.72);
    justify-content: center;
    align-items: center;
}

#gallery-content {
    background: var(--bg-primary, #0e1523);
    max-height: 88vh;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid var(--border-primary, #1e2e42);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.7));
}

#gallery-header {
    font-size: 1.05rem;
    font-weight: 800;
    background: var(--header-bg, linear-gradient(135deg,#0a1020,#121e30));
    color: var(--text-primary, #e6edf5);
    border-bottom: 1.5px solid var(--border-primary, #1e2e42);
    padding: 12px 20px;
    letter-spacing: 0.3px;
}

#gallery-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#skinsUL {
    flex: 1;
    min-height: 0;
    padding: 14px 10px 14px 14px;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 8px;
    background: var(--bg-primary, #0e1523);
    scrollbar-color: var(--border-primary, #1e2e42) var(--bg-primary, #0e1523);
    scrollbar-width: thin;
}

#skinsUL::-webkit-scrollbar       { width: 6px; }
#skinsUL::-webkit-scrollbar-track { background: transparent; }
#skinsUL::-webkit-scrollbar-thumb { border-radius: 6px; background: var(--border-primary, #c9d1de); }
#skinsUL::-webkit-scrollbar-thumb:hover { background: var(--text-muted, #6e7787); }

.skin {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-align: center;
    position: relative;
}
.skin img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; transition: transform 0.2s, opacity 0.2s; }
.skin img:hover { transform: scale(1.15); }
.skin.skin-pending img  { opacity: 0.4; cursor: not-allowed; filter: grayscale(80%); }
.skin.skin-pending img:hover  { transform: none; }
.skin.skin-rejected img { opacity: 0.3; cursor: not-allowed; filter: grayscale(100%) sepia(50%); }
.skin.skin-rejected img:hover { transform: none; }

.private-badge { display: block; font-size: 0.65em; color: #fff; background: linear-gradient(135deg,#7c3aed,#5b21b6); padding: 2px 6px; margin-top: 4px; border-radius: 6px; text-align: center; font-weight: 700; }
.pending-badge  { display: block; font-size: 0.65em; color: #fff; background: linear-gradient(135deg,#d97706,#b45309); padding: 2px 6px; margin-top: 4px; border-radius: 6px; text-align: center; font-weight: 700; }
.rejected-badge { display: block; font-size: 0.65em; color: #fff; background: linear-gradient(135deg,#6b7280,#4b5563); padding: 2px 6px; margin-top: 4px; border-radius: 6px; text-align: center; font-weight: 700; }
.gif-badge      { position: absolute; top: 2px; right: 2px; background: rgba(5,150,105,0.92); color: #fff; font-size: 8px; font-weight: 800; padding: 1px 4px; border-radius: 4px; pointer-events: none; }
.no-skins       { text-align: center; font-size: 0.9em; color: #6e7787; margin: 20px auto; width: 100%; }

.circular {
    /* increased from 50px → 72px for comfortable selection */
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: url(../img/checkerboard.png);
    background-repeat: no-repeat;
    background-size: 200px 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 0 0 2px var(--border-secondary, #e2e8f0);
    cursor: pointer;
    transition: box-shadow 0.18s, transform 0.18s;
}

.circular:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.22), 0 0 0 2.5px var(--accent, #2d74f5);
    transform: scale(1.06);
}

.skinName {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary, #a8b3c8);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.18s;
    margin: 0;
}

.circular:hover + .skinName {
    color: var(--accent, #2d74f5);
}

/* ── Custom Skin Creator ─────────────────────────────────────── */
#create {
    opacity: 0;
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.55);
    z-index: 201;
    display: flex;
    justify-content: center;
    align-items: center;
}

#create-content {
    background: var(--bg-primary, #0e1523);
    min-height: 500px;
    min-width: 500px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid var(--border-primary, #1e2e42);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.7));
}

#create-header {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--header-bg, linear-gradient(135deg,#0a1020,#121e30));
    color: var(--text-primary, #e6edf5);
    border-bottom: 1.5px solid var(--border-primary, #1e2e42);
    padding: 14px 20px;
    text-align: center;
}

#create-body {
    display: flex;
    min-height: 500px;
    min-width: 500px;
}
