/* ====================================================================
 * BJ-Share custom CSS — Tema: BJ-Midnight
 * Versão: 2.0
 * Organização: seções revisadas, duplicidades removidas e declarações comentadas.
 * ==================================================================== */

/* ===== Variáveis globais ===== */
/* Reset global de box model. Todos os poucos elementos do arquivo que tinham
 *  width/height/min-width/max-height fixo JUNTO com padding/border na mesma
 *  regra foram individualmente compensados (comentado em cada um) para o
 *  tamanho renderizado continuar idêntico ao de antes. */

*,
*::before,
*::after {
   box-sizing: border-box;
}

:root {
   --bg-deep: #0e0e11;
   --bg-base: #131316;
   --bg-surface: #18181c;
   --bg-raised: #1d1d22;
   --bg-overlay: #25252e;
   --bg-header: #1a1a1f;
   --border: #2e2e38;
   --border-sub: #252530;
   --text-primary: #d4d5de;
   --text-muted: #7c7d8a;
   --text-bright: #eeeef4;
   --accent: #5b8dd9;
   --gold: #eebc58;
   --green: #4db87a;
   --red: #d95b5b;
   --focus-glow: #4281da;

   /* Cores reutilizadas em vários pontos do arquivo, extraídas
       * para variável apenas por organização (mesmo valor exato) */
   --input-text: #e0e0e8;
   --surface-1c: #1c1c22;
   --surface-1e: #1e1e24;
   --btn-grad-dark: #14141a;
   --btn-grad-mid: #2a2a38;
}

/* ===== Base global e tipografia ===== */
/* Textura de fundo compartilhada por body/#userinfo/#alerts/tooltip do BJinfoBox
 *  (mesmo valor exato nas 4 regras — agrupado aqui só para não repetir a
 *  declaração; renderiza de forma idêntica a repeti-la em cada seletor). */
body,
#userinfo,
#alerts,
a.BJinfoBox span,
form a.BJinfoBox span,
.post_return a.BJinfoBox span {
   background: url(https://i.bj-share.info/ec01898d04940834f4312bb56df3f8c6.png) repeat scroll 0 var(--bg-base) !important;
}

body {
   font-size: 11px;
   color: var(--text-primary);
   min-width: 950px;
   font-family: Roboto, tahoma, helvetica, sans-serif;
   overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
   margin: 5px 0;
   font-weight: 700;
   color: var(--text-bright);
}

h2 {
   text-align: center;
   font-size: 16px;
}

h4 {
   font-size: 10.67px;
}

p {
   margin: 10px 5px;
}

li {
   margin: 5px 5px;
}

ul {
   padding-left: 5px;
   left: 0.5%;
}

ol {
   margin-left: 1em;
}

/* ===== Links e estados de texto ===== */
a {
   text-decoration: none;
   border: none;
   color: var(--text-primary);
   transition:
      color 0.25s,
      text-decoration 0.25s,
      opacity 0.25s;
   font-weight: bold;
}

a:hover {
   text-decoration: underline;
   color: #a8bedd;
}

a.similar_artist {
   background-color: var(--bg-raised);
   display: block;
   padding: 1px 4px;
   color: var(--text-bright);
   border: 1px solid var(--border);
}

a.similar_artist:hover {
   background-color: var(--bg-overlay);
}

.similar_artist_header {
   color: var(--text-bright);
   background-color: var(--bg-header);
   border: 1px solid var(--border);
   padding: 3px 5px;
}

/* ===== Formulários, campos e mídia básica ===== */
input {
   padding: 2px 3px;
   background: var(--bg-surface);
   border: 1px solid var(--border);
   color: var(--input-text);
   box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.3);
   transition:
      border-color 0.15s linear,
      box-shadow 0.15s linear;
}

textarea {
   padding: 2px 3px;
   width: 100%;
   background: var(--bg-surface);
   border: 1px solid var(--border);
   color: var(--input-text);
   box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.3);
   transition:
      border-color 0.15s linear,
      box-shadow 0.15s linear;
   resize: vertical;
}

.BBCodeToolbar-icon {
   height: 20px;
   width: 20px;
   fill: #676e77;
}

input:focus,
form input:focus,
      form textarea:focus,
            textarea:focus,
form button:focus,
      /* Editor BBCode (SCEditor) */
      .sceditor-container iframe,
.sceditor-container textarea,
[contenteditable="true"]:focus {
   outline: none;
   border-color: #3463a7;
   box-shadow:
      inset 1px 2px 4px rgba(0, 0, 0, 0.3),
      0 0 15px var(--focus-glow);
}

/* Borda azul no container do SCEditor quando ativo */
.sceditor-container:focus-within {
   outline: none;
   border: 1px solid #3463a7;
   box-shadow: 0 0 15px var(--focus-glow);
}

/* max-width:100% aqui é de propósito FORA de qualquer @media: numa tela
 *  larga isso nunca faz efeito (a imagem já cabe), mas numa tela estreita
 *  impede que uma imagem grande de post/descrição force a página inteira
 *  a ficar mais larga que o celular (rolagem horizontal). height:auto
 *  evita esticar/achatar a imagem quando max-width entra em ação. */
img {
   border: none;
   max-width: 100%;
}

.dropzone {
   border-width: 1px;
}

/* ===== Chat, formulários e controles ===== */
table.shoutTable {
   width: 100%;
   border-collapse: collapse;
   border: none;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

td.shoutTable {
   border: 1px solid #2a2a34;
   padding: 8px;
   text-align: left;
   font-size: 11.6px;
}

table.shoutTable a {
   color: #4aa8e8;
}

tr.row1 {
   background: #1d1d23;
}

tr.row2 {
   background: #202028;
}

form tr {
   background-color: #1f1f25;
}

.field_div {
   margin-bottom: 10px;
   margin-top: 1px;
}

.edit_changelog textarea {
   width: 600px;
}

/* ===== Placeholder =====
 * Só a versão sem prefixo é necessária hoje: Firefox suporta ::placeholder
 * sem prefixo desde a v51 (2017), e -ms-input-placeholder era só pro Edge
 * antigo/IE11 (mortos desde 2021/2022) — removidos por serem peso morto. */
input::placeholder,
textarea::placeholder {
   color: var(--text-muted);
   opacity: 1;
}

/* ===== Indicadores de ratio ===== */
.r01,
.r02 {
   color: #d95b5b;
}

.r03 {
   color: #d96e4d;
}

.r04 {
   color: #d9844d;
}

.r05,
.r06 {
   color: #d9a04d;
}

.r07 {
   color: #d9b44d;
}

.r08 {
   color: #d9c64d;
}

.r09 {
   color: #d9d94d;
}

.r10 {
   color: #9dd96a;
}

.r20,
.r50,
.r99 {
   color: var(--green);
}

/* ===== Tamanhos BBCode ===== */
span.size1 {
   font-size: 0.75em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size2 {
   font-size: 1em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size3 {
   font-size: 1.25em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size4 {
   font-size: 1.5em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size5 {
   font-size: 1.75em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size6 {
   font-size: 2em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size7 {
   font-size: 2.25em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size8 {
   font-size: 2.5em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size9 {
   font-size: 2.75em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

span.size10 {
   font-size: 3em;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

ul.thin {
   margin: 0 0 0 25px;
   padding: 0;
}

ul.thin li {
   margin: 0;
   padding: 0;
}

/* ===== Estrutura principal da página ===== */
#header {
   background: url(https://i.bj-share.info/685f346b9388f264967429b6a7b0be56.png) no-repeat top center;
   width: 100%;
   padding: 0;
   background-color: #000;
}

#content {
   margin: auto;
   width: 100%;
   overflow: hidden;
   position: relative; /* necessário para o top: 60px afastar do menu fixo */
   top: 60px;
}

#wrapper {
   width: 100%;
   margin: 0 auto;
}

#footer {
   margin-top: 140px;
   width: 100%;
   text-align: center;
   padding: 1em 0;
   color: #aaa;
   background: var(--bg-surface) url(https://i.bj-share.info/d210bb554ad0ef1587d32763755ecc4d.png) repeat-x center 184px;
   border-top: 3px solid var(--border);
   clear: both;
   box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.5);
}

#logo {
   width: 100%;
   height: 290px;
   margin: 0 auto;
}

#logo a {
   border: none;
   width: 320px;
   height: 150px;
   display: block;
}

/* ===== Menu principal e dropdowns ===== */
#menu {
   position: absolute;
   top: 295px;
   width: 100%;
   text-align: center;
   font-size: 13.33px;
   z-index: 1001;
   min-width: 850px;
   background-color: var(--bg-surface);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

#menudrop ul {
   list-style: none;
   position: relative;
   float: left;
   margin: 0;
   padding: 0;
}

#menudrop ul a {
   display: block;
   color: #b8b9c8;
   text-decoration: none;
   font-weight: 700;
   font-size: 12px;
   line-height: 32px;
   padding: 0 15px;
   transition: color 0.2s;
}

#menudrop ul li {
   position: relative;
   float: left;
   margin: 0;
   padding: 0;
   width: 145px;
}

#menudrop ul li.current-menu-item {
   background: rgba(91, 141, 217, 0.08);
   border-bottom: 2px solid var(--accent);
}

#menudrop ul ul {
   display: none;
   position: absolute;
   top: 100%;
   left: 0;
   background-color: var(--bg-raised);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
   padding: 0;
   text-align: left;
}

#menudrop ul ul ul {
   top: 0;
   left: 100%;
   background-color: var(--bg-raised);
}

#menudrop ul ul ul ul {
   max-height: 300px;
   overflow-y: auto;
   position: absolute;
   left: 100%;
   top: 0;
   background-color: var(--bg-raised);
   z-index: 1;
}

#menudrop ul li:hover {
   background-color: var(--bg-overlay);
}

#menu ul li a.active,
#menu ul li a:focus,
#menu ul li a:hover {
   color: var(--text-bright);
   text-decoration: none;
}

#menudrop ul ul li {
   float: none;
   width: 145px;
}

#menudrop ul ul li:last-child {
   border-bottom: none;
}

#menudrop ul ul a {
   line-height: 120%;
   padding: 10px 15px;
   color: var(--text-primary);
}

#menudrop ul ul a:hover {
   color: var(--text-bright);
   background-color: var(--bg-overlay);
}

#menudrop ul li:hover > ul {
   display: block;
}

/* ===== Barra de usuário e estatísticas ===== */
#userinfo {
   color: var(--text-muted);
   width: 100%;
   text-align: center;
   font-size: 10.67px;
   padding: 3px 0;
   z-index: 10;
   min-width: 850px;
   position: relative;
   top: 35px;
}

#userinfo ul {
   display: inline;
   margin: 0 0.8%;
   padding: 4px;
}

#userinfo ul li {
   position: relative;
   display: inline;
   margin: 0 0.1em;
   line-height: 20px;
   vertical-align: middle;
   padding: 2px;
   color: #c8c9d4;
}

#userinfo a {
   color: #9ea0b0;
}

#userinfo a:hover {
   text-decoration: underline;
   color: #c0c2d0;
}

#userinfo b a {
   font-weight: 400;
   font-size: 0.9em;
}

#stats_bjpontos .stat,
#stats_leeching .stat,
#stats_ratio .stat,
#stats_seeding .stat {
   font-weight: 700;
}

#stats_seeding .stat {
   color: var(--green);
}

#stats_leeching .stat {
   color: var(--red);
}

#stats_bjpontos .stat {
   color: var(--gold);
}

#userinfo_username,
#userinfo_major {
   position: absolute;
   top: 10px;
   width: 202px; /* 200px + 1px de borda em cada lado (compensado p/ box-sizing: border-box) */
   background: var(--bg-surface);
   color: var(--text-muted);
   text-align: center;
   font-size: 10.67px;
   padding: 3px 0;
   z-index: 10;
   border-radius: 4px;
   border: 1px solid var(--border-sub);
}

#userinfo_username {
   left: 4%;
}

#userinfo_major {
   right: 4%;
}

#userinfo_major .brackets:before,
#userinfo_major .brackets:after {
   font-weight: 700;
}

/* ===== Busca, alertas e seletores ===== */
#searchbars {
   position: absolute;
   top: 265px;
   width: 100%;
   text-align: center;
   padding: 4px 0;
   min-width: 850px;
}

#searchbars input {
   position: relative;
   padding: 4px 10px;
   background: rgba(24, 24, 28, 0.98);
   font-size: 0.9em;
   color: var(--input-text);
   border: 1px solid var(--border);
   border-radius: 3px;
}

#searchbars input:focus {
   border-color: #3463a7;
   box-shadow:
      inset 1px 2px 4px rgba(0, 0, 0, 0.3),
      0 0 15px var(--focus-glow);
}

#searchbars ul {
   margin: 0 auto;
   display: block;
}

#searchbars ul li {
   display: inline;
   margin: 0 1px;
   list-style: none;
   position: relative;
}

#searchbars ul li ul {
   display: block;
   position: absolute;
   top: 1em;
   left: 0;
   z-index: 1000;
   width: 12em;
   margin-top: 12px;
}

#searchbars ul li ul li {
   margin: 0;
   padding: 0;
   display: block;
   width: 100%;
   background: var(--bg-raised);
   border-bottom: 1px solid var(--border-sub);
}

#searchbars ul li ul li.highlight {
   background: var(--bg-overlay);
}

#searchbars ul li form {
   display: inline;
}

#alerts {
   position: relative;
   margin-top: 32px;
   margin-bottom: -60px;
   padding: 10px 0;
   width: 100%;
   min-width: 850px;
}

#alerts a {
   color: #b8b9ca;
}

.alertbar {
   background-color: var(--bg-raised);
   border: 1px solid var(--border);
   text-align: center;
   color: #ddd;
   font-weight: 700;
   font-size: 0.93em;
   width: 432px; /* 410px + padding(20px) + borda(2px) (compensado p/ box-sizing: border-box) */
   margin: 0 auto 3px auto;
   padding: 10px;
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
   border-radius: 3px;
}

.alertbar.blend {
   border: 1px solid var(--border);
   width: 432px; /* mesma compensacao de .alertbar (herda o padding:10px dela) */
   margin-top: -1px;
}

.alertbar a {
   color: var(--accent);
   text-decoration: underline;
}

.alertbar a:hover {
   color: #c0c8d8;
   text-decoration: none;
}

#cat-selector ul {
   width: 100%;
}

#cat-selector ul li {
   display: inline;
   width: 12em;
   height: 1em;
   float: left;
}

.autocomplete-suggestions {
   background: var(--bg-raised);
   border: 1px solid var(--border);
   color: var(--text-primary);
}

/* ===== Utilitários de visibilidade e alinhamento ===== */
.hidden,
input.hidden {
   display: none;
}

.thin {
   max-width: 1228px;
   margin: 0 auto;
}

.widethin {
   width: 95%;
   margin: 0 auto;
}

div.linkbox {
   text-align: center;
   padding: 5px;
}

.center {
   text-align: center;
}

.right {
   text-align: right;
}

.min_padding {
   padding: 0;
   margin: 0;
}

p.min_padding {
   margin: 2px 0;
}

.nobr {
   white-space: nowrap;
}

.number_column {
   text-align: center;
   padding-left: 5px;
}

.linkbox .brackets:after,
.linkbox .brackets:before,
.top10_quantity_links .brackets:after,
.top10_quantity_links .brackets:before {
   color: var(--text-muted);
}

.spellcheck {
   margin: 25px 0;
   font-size: 1.25em;
   font-weight: 700;
}

.two_columns {
   width: 47%;
}

/* ===== Containers, caixas, sidebar e imagens ===== */
.pad {
   padding: 0.5em;
   font-family: inter, Roboto, tahoma, helvetica, sans-serif;
   /* Protege contra texto/número longo sem espaço (ex: "109.683.503" ou uma
       * URL colada) forçando estouro horizontal numa sidebar estreita — sem
       * isto, uma palavra/token longo ignora a largura do container e força
       * rolagem lateral na página inteira em telas de celular. */
   overflow-wrap: break-word;
   word-break: break-word;
}

.sidebar .pad {
   padding: 0;
}

.vertical_space {
   margin-bottom: 10px;
}

.box {
   font-size: 11.87px;
   background-color: var(--bg-raised);
   border: 1px solid var(--border);
   margin-bottom: 10px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
   border-radius: 2px;
}

.box2 {
   font-size: 11.87px;
   background-color: var(--surface-1e);
   border: 1px solid var(--border);
   margin-bottom: 10px;
   border-radius: 2px;
}

.pad h3,
.pad h4,
.padbox h3,
.padbox h4 {
   margin-top: 0;
   padding-top: 0;
}

.sidebar {
   float: right;
   /* Fluido em vez de degraus fixos por @media: encolhe suavemente de
       * 276px (telas largas) até um mínimo de 135px (celular), sem "pular"
       * de tamanho nos breakpoints. Fórmula: 22.6vw + 44.6px passa exatamente
       * por (1024px de tela -> 276px) e (400px de tela -> 135px); fora dessa
       * faixa o clamp() trava no mínimo/máximo. Pra recalcular se um dia
       * mudar os alvos: A = (max-min)/(V_max-V_min); B = max - V_max*A. */
   width: clamp(135px, calc(22.6vw + 44.6px), 276px);
}

.sidebar img {
   max-width: 98%;
   margin: 3px 0 0 0;
}

.featimg {
   max-width: 100% !important;
   margin: 4px 0 0 7px !important; /* precisa vencer .sidebar img (especificidade
      mais alta: classe+elemento). Sem isso o destaque perde os 7px de margem
      esquerda e fica deslocado pra esquerda. */
}

ul.collage_images {
   padding: 0;
   border-collapse: collapse;
   display: grid;
   grid-template-columns: auto auto auto auto;
   grid-gap: 15px;
}

ul.collage_images img {
   height: 100%;
   width: 100%;
   max-width: 215px;
   max-height: 321px;
   margin-left: 2%;
   margin-top: 2%;
   margin-bottom: 0;
}

.head {
   padding: 4px;
   background-color: var(--bg-header);
   color: var(--text-bright);
   border-bottom: 2px solid var(--bg-deep);
}

.body {
   padding-left: 4.5px;
   padding-right: 4.5px;
}

.main_column {
   overflow: hidden;
   padding-right: 10px;
}

.main_column table {
   margin-bottom: 10px;
}

.tags {
   padding: 0 0 0 20px;
   font-style: italic;
}

.tags a {
   color: var(--text-muted);
}

.tags a:hover {
   color: #ccc;
   text-decoration: none;
}

.noborder {
   border: none;
}

ul.nobullet {
   list-style-type: none;
   color: var(--input-text);
}

div.sidebar #event_div {
   margin-left: -232px;
}

/* ===== Tabelas, cabeçalhos e mensagens ===== */
table {
   width: 100%;
   border-collapse: collapse;
   border: 1px solid var(--border);
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

tr.resolution_header,
tr.season_header,
td.season_header {
   background: linear-gradient(0deg, hsl(240, 6%, 8%) 0, hsl(240, 12%, 19.6%));
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

tr {
   border: 1px solid var(--border);
}

td,
th {
   box-shadow: none;
   padding: 5px;
   text-align: left;
}

.colhead {
   background-color: var(--bg-header);
   font-weight: 700;
   color: var(--text-bright);
   border-bottom: 1px solid var(--bg-deep);
}

.width5 {
   width: 3%;
}

.width50 {
   width: 60%;
}

.message_table .width95 {
   width: 37%;
}

.colhead td {
   padding-left: 10px;
   padding-right: 20px;
   border-bottom: 1px solid var(--bg-deep);
}

.colhead th {
   padding-left: 10px;
   padding-right: 10px;
}

td.colhead {
   padding-left: 10px;
   padding-right: 10px;
}

.colhead_dark {
   background-color: var(--bg-header);
   color: var(--text-bright);
   vertical-align: middle;
   border-bottom: 2px solid var(--bg-deep);
}

.colhead_dark a {
   color: var(--text-bright);
}

td.label {
   font-weight: 700;
   width: 180px;
   padding-top: 10px;
}

table.slice {
   margin-top: -1px;
}

.error_message {
   border: 1px solid #8c3030;
   padding: 3px 0;
   background-color: #7a2a2a;
   text-align: center;
   color: #f5c0c0;
   font-weight: 700;
}

.save_message {
   border: 1px solid #8a7020;
   padding: 3px 0;
   background-color: #3d3010;
   text-align: center;
   color: #e8c94d;
   font-weight: 700;
}

.noty_text {
   margin: 0 0 0 23px;
}

.noty_message {
   background: var(--bg-raised) url(https://bj-share.info/static/common/icons/bj.svg) no-repeat 4px 7px;
   color: #eee;
   height: 33px;
   background-size: 26px 16px;
   display: block;
}

.noty_buttons {
   background: var(--bg-overlay) !important;
}

.noty_buttons a {
   border-radius: 3px;
   margin: 5px;
   padding: 2px 5px;
   color: #ddd;
}

.elem_error {
   border: 3px solid #8c0d0d;
}

ul.stats li {
   padding: 0 0 1px 0;
}

/* ===== Listagem e filtros de torrents ===== */
.show_torrents {
   width: 28px;
   height: 28px;
   display: inline-block;
   background: url("https://bj-share.info/static/common/icons/plus.svg") no-repeat;
   background-size: contain;
}

.hide_torrents {
   width: 28px;
   height: 28px;
   display: inline-block;
   background: url("https://bj-share.info/static/common/icons/minus.svg") no-repeat;
   background-size: contain;
}

.show_torrents_link {
   border: none;
   width: 28px;
   height: 28px;
   display: block;
}

.filter_torrents {
   width: 100%;
   margin: auto;
}

.filter_torrents .submit {
   text-align: right;
   padding-top: 5px;
}

#content form.search_form + .torrent_table {
   margin-top: 20px;
}

.cat_list tr td {
   border: none;
}

.torrent_table tr {
   vertical-align: top;
}

#torrent_table {
   border-collapse: collapse;
   font-size: 100%;
}

.colhead .sign,
.colhead_dark .sign {
   padding: 0 8px;
   vertical-align: middle;
   text-align: center;
   font-size: 16px;
   font-weight: 700;
}

.torrentinfo_release {
   color: #d4b882;
}

.torrent_table tr.group {
   background-color: var(--surface-1e);
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
   box-shadow: 0 -2px 4px -3px rgba(0, 0, 0, 0.5);
}

tr.group_torrent {
   background-color: #212128;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

tr.torrent {
   background-color: var(--surface-1e);
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
   border-left: 1px solid var(--border-sub) !important;
   border-right: 1px solid var(--border-sub) !important;
   font-size: 11.84px;
   transition: background-color 0.2s ease;
}

tr.torrent:hover,
tr.group_torrent:hover,
tr.group:hover {
   background-color: var(--bg-overlay);
}

.torrent {
   transition: background-color 0.2s ease;
}

.torrent_table div.tags {
   font-weight: 400;
}

.torrent_table tr .center {
   vertical-align: middle;
   text-align: center;
}

.torrentdetails {
   background-color: var(--surface-1c) !important;
}

.group_torrent span {
   float: right;
}

.torrent span {
   font-weight: 400;
   float: right;
}

table#torrent_table.torrent_table {
   margin: auto;
}

tr.torrent .bookmark > a:before,
tr.torrent .bookmark > a:after {
   color: var(--text-muted);
}

/* ===== Citações e mídia embutida ===== */
/* Level 1, 4, 7... */
blockquote,
blockquote blockquote blockquote blockquote,
blockquote blockquote blockquote blockquote blockquote blockquote {
   background-color: rgba(38, 38, 46, 0.92);
   border-left: 2px solid rgb(80, 80, 93);
   border-right: 2px solid rgb(80, 80, 93);
   border-top: 1px solid rgba(0, 0, 0, 0.2);
   border-bottom: 1px solid rgba(0, 0, 0, 0.2);
   border-radius: 4px;
   margin: 10px;
   padding: 10px;
}

/* Level 2, 5, 8... */
blockquote blockquote,
blockquote blockquote blockquote blockquote blockquote {
   background-color: rgba(32, 33, 40, 0.92);
   border-left: 2px solid rgb(95, 85, 115);
   border-right: 2px solid rgb(95, 85, 115);
   border-top: 1px solid rgba(0, 0, 0, 0.2);
   border-bottom: 1px solid rgba(0, 0, 0, 0.2);
   border-radius: 4px;
   margin: 10px;
   padding: 10px;
}

/* Level 3, 6, 9... */
blockquote blockquote blockquote,
blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
   background-color: rgba(28, 29, 38, 0.92);
   border-left: 2px solid rgb(80, 80, 120);
   border-right: 2px solid rgb(80, 80, 120);
   border-top: 1px solid rgba(0, 0, 0, 0.2);
   border-bottom: 1px solid rgba(0, 0, 0, 0.2);
   border-radius: 4px;
   margin: 10px;
   padding: 10px;
}

:is(iframe.youtube, iframe.dailymotion) {
   display: block;
   margin: 0 auto;
   width: 100%;

   /* Solução: Força uma largura e altura máximas ou iniciais */
   max-width: 100%;
   contain-intrinsic-size: 1600px 900px;

   /* Ajuda o navegador a prever o tamanho */
   aspect-ratio: 16 / 9;
   height: auto;
   border: none;

   /* Garante que o container tenha um tamanho mínimo se estiver oculto/carregando */
   min-height: 200px;
}

strong.quoteheader {
   color: #888;
}

/* ===== Fórum, leitura e estados de tópicos ===== */
.last_read {
   width: 15px;
   height: 15px;
   background: url(https://bj-share.info/static/styles/bj-black/images/go_last_read.png) no-repeat center center;
   margin-left: 5px;
}

.last_read a {
   border: none;
   width: 100%;
   height: 100%;
   display: block;
}

.unread_locked_sticky {
   background: url("https://bj-share.info/static/common/icons/unread_locked_sticky.svg") no-repeat center / 17px;
}

.read_locked_sticky {
   background: url("https://bj-share.info/static/common/icons/read_locked_sticky.svg") no-repeat center / 17px;
}

.unread_sticky {
   background: url("https://bj-share.info/static/common/icons/unread_sticky.svg") no-repeat center / 17px;
}

.read_sticky {
   background: url("https://bj-share.info/static/common/icons/read_sticky.svg") no-repeat center / 17px;
}

.unread_locked {
   background: url("https://bj-share.info/static/common/icons/unread_locked.svg") no-repeat center / 17px;
}

.read_locked {
   background: url("https://bj-share.info/static/common/icons/read_locked.svg") no-repeat center / 17px;
}

.unread {
   background: url("https://bj-share.info/static/common/icons/unread.svg") no-repeat center / 17px;
}

.read {
   background: url("https://bj-share.info/static/common/icons/read.svg") no-repeat center / 17px;
}

table.forum_post {
   margin: 10px 0;
}

table.forum_post td {
   border: 1px solid #30303a;
}

td.avatar {
   width: 158px; /* 150px + padding(8px) (compensado p/ box-sizing: border-box) */
   padding: 4px;
}

table.forum_post td.body {
   max-width: 675px;
}

tbody {
   background-color: #1d1d23;
}

tr.unreadpm {
   background-color: #4a1f1f;
}

.post_id {
   font-weight: 400;
}

#forum_search_cat_list,
#forum_search_cat_list tr {
   border: none;
}

/* ===== Permissões, enquetes e overlays ===== */
.permission_head {
   width: 400px;
   margin: 0 auto;
}

.permissions {
   width: 930px;
   margin: 0 auto;
}

.permission_container {
   float: left;
   width: 310px; /* 300px + padding(10px) (compensado p/ box-sizing: border-box) */
   padding: 5px;
}

.permission_container input {
   margin: 0 3px 5px 0;
   vertical-align: top;
}

.submit_container {
   clear: both;
   text-align: right;
}

ul .invitetree {
   margin: 0 0 0 25px;
}

.invitetree li {
   list-style: none;
   margin: 10px 2px;
}

.user_options .options_list li {
   margin: 0;
}

.left_poll {
   width: 2px;
   height: 9px;
   background: url(images/bar_left.gif) no-repeat center;
   float: left;
   margin: 0;
   padding: 0;
}

.center_poll {
   height: 9px;
   background: url(images/bar.gif) repeat;
   float: left;
   margin: 0;
   padding: 0;
}

.right_poll {
   width: 2px;
   height: 9px;
   background: url(images/bar_right.gif) no-repeat center;
   float: left;
   margin: 0;
   padding: 0;
}

.curtain {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.85);
   z-index: 1001;
}

.lightbox {
   position: fixed;
   text-align: center;
   top: 5%;
   left: 5%;
   width: 90%;
   height: 90%;
   padding: 0;
   z-index: 1002;
   overflow: auto;
}

ul.poll li {
   padding: 0 0 0 10px;
   margin: 0;
   clear: left;
}

ul.poll li.graph {
   margin-bottom: 3px;
   padding-left: 20px;
}

.small_upvote,
.small_upvoted,
.vote_album_up,
.vote_artist_up,
.vote_tag_up {
   color: var(--green);
}

.small_downvote,
.small_downvoted,
.vote_album_down,
.vote_artist_down,
.vote_tag_down {
   color: var(--red);
}

.chat_mark_bg {
   background-color: rgb(50, 51, 71);
   border: none;
   padding: 5px;
   text-align: left;
}

/* ===== Selects, multiselect e dropdowns ===== */
select {
   -webkit-appearance: none;
   appearance: none;
   background-image: url(https://bj-share.info/static/common/icons/svg-viewer.svg);
   background-position: right 8px center;
   background-repeat: no-repeat;
   background-size: 10px 10px;
   border-radius: 5px;
   cursor: pointer;
   transition:
      background-color 0.1s linear,
      border-color 0.1s linear;
   background-color: var(--surface-1c);
   border: 1px solid var(--border);
   box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.3);
   color: #aaa;
   padding: 5px 25px 5px 5px;
}

select:hover {
   color: var(--text-primary);
}

select:focus {
   border-color: var(--accent);
   outline: none;
}

.open > .dropdown-menu {
   display: block;
   background-color: var(--bg-raised);
   border: 1px solid var(--border);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
   overflow-y: auto;
   z-index: 1;
   max-height: 227px; /* 225px + borda(2px) (compensado p/ box-sizing: border-box) */
   position: absolute;
}

.checkbox:hover {
   background-color: var(--border);
}

.multiselect-container > li > a > label.radio,
.multiselect-container > li > a > label.checkbox {
   margin: 0;
   color: #fff;
}

.btn-default {
   color: #aaa !important;
   background-color: #202028 !important;
   border-color: #3a3a44 !important;
}

.btn:hover,
.btn:focus {
   background: #1c1c24 !important;
   text-decoration: none !important;
}

/* ===== Atalhos fixos de navegação ===== */
/* #irtopo (botão "subir") e #irfinal (botão "descer") eram 2 blocos com
 *  TODAS as propriedades idênticas, só o "bottom" mudava — unificado aqui
 *  e cada um sobrescreve só o "bottom" logo abaixo. */
#irtopo,
#irfinal {
   position: fixed;
   right: 10px;
   cursor: pointer;
   width: 42px; /* 40px + borda(2px) (compensado p/ box-sizing: border-box) */
   height: 42px; /* idem */
   background: linear-gradient(180deg, var(--btn-grad-dark) 0, var(--btn-grad-mid) 1px, var(--btn-grad-mid) 2px, var(--btn-grad-dark));
   border: 1px solid var(--border);
   text-indent: -9999px;
   display: none;
   border-radius: 6px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

#irtopo {
   bottom: 60px;
}

#irtopo span {
   position: absolute;
   top: 50%;
   left: 50%;
   margin-left: -8px;
   margin-top: -12px;
   height: 0;
   width: 0;
   border: 8px solid transparent;
   border-bottom-color: #c0c0d0;
}

#irtopo:hover {
   background: linear-gradient(to top, #46464e, #14151a);
   opacity: 1;
}

#irfinal {
   bottom: 10px;
}

#irfinal span {
   position: absolute;
   top: 50%;
   left: 50%;
   margin-left: -8px;
   margin-top: -4px;
   height: 0;
   width: 0;
   border: 8px solid transparent;
   border-top-color: #c0c0d0;
}

#irfinal:hover {
   background: linear-gradient(to bottom, #46464e, #17171a);
   opacity: 1;
}

/* ===== Tooltips BJinfoBox ===== */
a.BJinfoBox {
   position: relative;
   display: inline;
}

a.BJinfoBox span,
form a.BJinfoBox span,
.post_return a.BJinfoBox span {
   position: absolute;
   min-width: 197px; /* 185px + padding(10px) + borda(2px) (compensado p/ box-sizing: border-box) */
   color: #eee;
   line-height: 15px;
   visibility: hidden;
   border-radius: 6px;
   text-decoration: none;
   font-weight: normal;
   padding: 7px 5px;
   margin-left: -25px;
   opacity: 0;
   bottom: 0;
   transition:
      opacity 0.3s,
      bottom 0.3s;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
   border: 1px solid var(--border);
}

form a.BJinfoBox span {
   padding: 10px 5px 5px;
   margin-left: -20px;
}

.post_return a.BJinfoBox span {
   line-height: 18px;
   padding: 4px 0 4px 2px;
   margin-left: -60px;
}

a.BJinfoBox:hover span {
   visibility: visible;
   bottom: 20px;
   left: 40%;
   margin-left: -76px;
   z-index: 3;
   opacity: 0.92;
}

a.BJinfoBox:hover {
   color: #eee;
}

/* ===== Tooltips data-tooltip ===== */
[data-tooltip] {
   position: relative;
   z-index: 2;
   cursor: pointer;
}

[data-tooltip]:after,
[data-tooltip]:before {
   visibility: hidden;
   opacity: 0;
   pointer-events: none;
}

[data-tooltip]:before {
   position: absolute;
   bottom: 150%;
   left: 50%;
   margin-left: -45px;
   padding: 7px;
   min-width: 66px; /* 50px + padding(14px) + borda(2px) (compensado p/ box-sizing: border-box) */
   border-radius: 3px;
   background-color: #0e0e12;
   color: #e8e8f0;
   content: attr(data-tooltip);
   text-align: center;
   font-size: 13px;
   line-height: 1.2;
   font-weight: 400;
   border: 1px solid var(--border);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

[data-tooltip]:after {
   position: absolute;
   bottom: 150%;
   left: 50%;
   margin-left: -5px;
   width: 0;
   border-top: 5px solid #0e0e12;
   border-right: 5px solid transparent;
   border-left: 5px solid transparent;
   content: " ";
   font-size: 0;
   line-height: 0;
}

[data-tooltip]:hover:after,
[data-tooltip]:hover:before {
   visibility: visible;
   opacity: 1;
   transition: all 0.3s;
}

a[data-tooltip]:hover {
   text-decoration: none;
}

/* ===== Info boxes ===== */
.homesldframe {
   /* Mesma lógica do .sidebar acima: encolhe fluido de 250px até 112px.
       * aspect-ratio troca a necessidade de redeclarar "height" a cada
       * degrau — a altura sempre acompanha a largura automaticamente,
       * mantendo a proporção 250:350 (5:7) do design original. */
   width: clamp(112px, calc(22.1vw + 23.5px), 250px) !important;
   aspect-ratio: 5 / 7;
   left: -12px;
   top: -4px;
   position: relative;
   overflow: hidden; /* sem isso, uma imagem mais alta que 350px vaza pra
      fora do quadro e pode sobrepor os botões Anterior/Próximo */
}

/* As imagens de destaque (pôsteres) chegam com resoluções variadas.
 *  Sem isto, cada uma herda so o "img { max-width:100%; height:auto }"
 *  global e renderiza numa altura diferente (proporcional à imagem
 *  original), deixando o carrossel inconsistente a cada slide. Forçando
 *  width/height fixos + object-fit:cover, toda imagem passa a preencher
 *  exatamente 250x350 — corta o excedente mantendo a proporção (sem
 *  esticar/achatar), do jeito que já acontecia por coincidência quando a
 *  imagem original já vinha em 250x350. */
li.bjqs-slide img,
#banner-fade img,
#banner-slide img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center;
   display: block;
}

/* ===== Slider BJQS ===== */
ul.bjqs {
   list-style: none;
   padding: 0;
   margin: 0;
   overflow: hidden;
   display: none;
}

li.bjqs-slide {
   position: absolute;
   display: none;
}

ul.bjqs-controls {
   list-style: none;
   margin: 0;
   padding: 0;
   z-index: 9999;
}

/* Agora o <ul> vira um flex container que sempre
 *  ocupa 100% da largura do frame e distribui os 2 botões nas pontas —
 *  funciona em qualquer tamanho de .homesldframe automaticamente. */
ul.bjqs-controls.v-centered {
   position: absolute;
   top: 104%; /* == 207px / 350px do frame original, mas em % escala com o frame */
   left: 5%;
   width: 100%;
   display: flex;
   justify-content: space-between;
   padding: 0 12px;
   box-sizing: border-box;
}

ul.bjqs-controls.v-centered li a {
   display: block;
   padding: 10px;
   background: #263a52;
   color: #fff;
   text-decoration: none;
   border-radius: 6px;
   font-size: 12px;
}

ul.bjqs-controls.v-centered li.bjqs-next a,
ul.bjqs-controls.v-centered li.bjqs-prev a {
   min-width: 100px; /* 83px + padding(16px) + borda(2px) (compensado p/ box-sizing: border-box) */
   cursor: pointer;
   background: linear-gradient(180deg, #141416 0, #303038 1px, #242430 2px, var(--surface-1c));
   vertical-align: middle;
   text-align: center;
   padding: 6px 8px;
   letter-spacing: 0.075em;
   color: #d8d8e4;
   text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

ul.bjqs-controls.v-centered li a:hover {
   background: var(--bg-overlay);
   text-decoration: none;
}

ol.bjqs-markers {
   list-style: none;
   padding: 0;
   margin: 0;
   width: 100%;
}

ol.bjqs-markers.h-centered {
   text-align: center;
}

ol.bjqs-markers li {
   display: inline;
}

ol.bjqs-markers li a {
   display: inline-block;
   padding: 5px 10px;
   background: #111116;
   color: #ccc;
   margin: 5px;
   text-decoration: none;
   border-radius: 3px;
}

ol.bjqs-markers li a:hover,
ol.bjqs-markers li.active-marker a {
   background: var(--border);
}

p.bjqs-caption {
   font-family: "Varela Round", sans-serif;
   display: block;
   width: 190px;
   margin: 25px;
   padding: 2%;
   position: absolute;
   bottom: -10px;
   font-size: 14px;
   color: var(--input-text);
   background: rgba(14, 14, 18, 0.82);
   border-radius: 3px;
}

#container {
   position: relative;
   width: 263px;
   padding-top: 10px;
   padding-bottom: 0;
}

#banner-fade,
#banner-slide {
   margin-bottom: 40px;
   margin-top: -12px;
}

/* ===== Marcadores internos e labels de torrent ===== */
.internalbox {
   background: #202026;
   padding: 1px 2px;
   color: var(--gold);
   border-left: 3px solid var(--gold);
   border-right: 3px solid var(--gold);
   border-radius: 4px;
   transition: background 0.2s ease;
   position: relative;
}

.internalbox:hover {
   background: #282832;
}

.internalbox::before {
   content: "\f2f7" !important;
   font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free" !important;
   font-size: 10px !important;
   color: #fffbee !important;
   margin-right: 2px !important;
}

.internalbox:hover::after {
   content: "Este é um lançamento Internal, feito por um uploader do BJ-Share.";
   position: absolute;
   bottom: 130%;
   left: 240%;
   transform: translateX(-50%);
   background-color: #1a1a22;
   color: #e8e8f0;
   padding: 6px 10px;
   border-radius: 4px;
   font-size: 11px !important;
   line-height: 1.4;
   white-space: nowrap;
   z-index: 9999;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
   border: 1px solid var(--border);
   font-weight: 500;
   pointer-events: none;
}

/* ===== Labels de torrent (ícones SVG) ===== */
.torrent_label.bjtooltip.leeching,
.torrent_label.bjtooltip.seeding,
.torrent_label.bjtooltip.tl_snatched,
.torrent_label.bjtooltip.snatched,
.torrent_label.bjtooltip.repack {
   display: inline-block;
   color: transparent;
   font-size: 0;
   line-height: 0;
   overflow: hidden;
   vertical-align: -3px;
   flex-shrink: 0;
   transition: transform 0.2s ease;
}

.torrent_label.bjtooltip.leeching {
   width: 15px;
   height: 14px;
   background: url("https://bj-share.info/static/common/Downloadv2.svg") center / contain no-repeat;
}

.torrent_label.bjtooltip.seeding {
   width: 15px;
   height: 13px;
   background: url("https://bj-share.info/static/common/Seedv2.svg") center / contain no-repeat;
}

.torrent_label.bjtooltip.tl_snatched,
.torrent_label.bjtooltip.snatched {
   width: 15px;
   height: 15px;
   background: url("https://bj-share.info/static/common/check.svg") center / contain no-repeat;
}

.torrent_label.bjtooltip.repack {
   width: 15px;
   height: 14px;
   background: url("https://bj-share.info/static/common/Repackv2.svg") center / contain no-repeat;
}

.torrent_label.bjtooltip.leeching:hover,
.torrent_label.bjtooltip.seeding:hover,
.torrent_label.bjtooltip.tl_snatched:hover,
.torrent_label.bjtooltip.snatched:hover,
.torrent_label.bjtooltip.repack:hover {
   transform: scale(1.15);
}

/* ===== Diálogos ===== */
dialog {
   position: fixed;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   margin: 0;
   border: 1px solid var(--border);
   border-radius: 8px;
   padding: 1.5rem;
   max-width: 90vw;
   max-height: 90vh;
   overflow: auto;
   background: var(--bg-raised);
   color: var(--text-bright);
   box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

/* ===== Animação jelly nos botões ===== */
@keyframes jelly-effect {
   0%,
   100% {
      transform: scale(1, 1);
   }
   25% {
      transform: scale(0.9, 1.1);
   }
   50% {
      transform: scale(1.1, 0.9);
   }
   75% {
      transform: scale(0.95, 1.05);
   }
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
   background: var(--bg-overlay);
   text-decoration: none;
   animation: jelly-effect 0.5s;
}

button,
input[type="button"],
input[type="submit"] {
   cursor: pointer;
   outline: 0;
   transition:
      background 0.15s linear,
      box-shadow 0.15s linear;
   background: linear-gradient(180deg, #17171b 0, #232332 1px, #20202a 2px, var(--surface-1c));
   border: 1px solid var(--border);
   border-radius: 5px;
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
   color: #d8d8e4;
   padding: 6px 10px;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
   margin: 0.5% 0 0 0;
   /* --- ANTI-BORRÃO --- */
   backface-visibility: hidden;
   transform: translateZ(0);
   -webkit-font-smoothing: antialiased;
}

button {
   display: inline-flex;
}

button[onclick="atualizarLancamentos()"] {
   background-color: var(--bg-raised);
   border: 1px solid var(--border-sub);
   padding-top: 8px;
   padding-bottom: 7px;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled {
   background: var(--surface-1e);
   color: #555;
   cursor: default;
}

/* ===== Botões destrutivos ===== */
input[value="Deletar"],
input[value="Delete"],
input[value="Remover"] {
   background: linear-gradient(180deg, #3a1010 0, #4a1a1a 1px, #3d1515 2px, #321010);
   border-color: #6b2020;
   color: #f0b0b0;
}

input[value="Deletar"]:hover,
input[value="Delete"]:hover,
input[value="Remover"]:hover,
input[value="Deletar"]:focus,
input[value="Delete"]:focus,
input[value="Remover"]:focus {
   background: var(--red);
   box-shadow: 0 0 40px #da4242;
   border: 1px solid #f57878;
   animation: jelly-effect 0.5s;
}

/* ===== Animação de atenção (gorjeta) ===== */
@keyframes attn-cycle {
   0%,
   12%,
   100% {
      transform: translateY(0);
      filter: brightness(1);
      box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
   }
   5% {
      transform: translateY(-2px);
      filter: brightness(1.25);
      box-shadow: 0 0 0 5px rgba(201, 168, 76, 0.35);
   }
   10% {
      transform: translateY(0);
      filter: brightness(1);
      box-shadow: 0 0 0 10px rgba(201, 168, 76, 0);
   }
}

.brackets[onclick*="gorjeta"] {
   display: inline-block;
   position: relative;
   color: var(--gold);
   cursor: pointer;
   border-radius: 50px;
   will-change: transform, box-shadow;
   transform: translateZ(0);
   transition:
      transform 0.2s,
      filter 0.2s;
   animation: attn-cycle 5s ease-in-out infinite;
}

/* ===== Acessibilidade: respeita "reduzir movimento" do sistema ===== */
@media (prefers-reduced-motion: reduce) {
   *,
   *::before,
   *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
      scroll-behavior: auto !important;
   }
}

/* ===== Alertas e ajustes finais ===== */
#noteAlertMsg {
   position: absolute;
   z-index: 6001;
   top: 0;
   left: 0;
   right: 0;
   text-align: center;
   line-height: 2.5;
   overflow: hidden;
}

.browse_rating {
   background: var(--bg-raised);
   border: 1px solid var(--border);
   border-radius: 3px;
}

.field_div label:first-child {
   width: max-content;
   text-align: left;
   margin-right: 10px;
}

/* ==========================================================================
 *  ++++++++++ MODO "MENU NO TOPO" — interruptor ++++++++++
 *
 *  LIGADO    ->  @media all {
 *  DESLIGADO ->  @media not all {
 *
 *  Troque APENAS a linha do @media logo abaixo. Com o bloco desligado, as
 *  regras originais.
 *  ========================================================================== */
@media all {
   #menu {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 2000;
   }

   #userinfo {
      position: fixed;
      top: 32px; /* altura do #menu (line-height 32px dos links) */
      left: 0;
      width: 100%;
      z-index: 1999;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
   }

   /* Empurra a página para o conteudo nao ficar embaixo da barra fixa.
    * 60px = 32 do #menu + ~28 do #userinfo. Se sobrar vao ou cortar,
    * ajuste este valor junto com o top do #userinfo acima. */
   body {
      padding-top: 60px;
   }

   /* O #content ja tinha top:60px pro menu antigo — ajustado para 65px
    * para acompanhar o offset de .thin/#searchbars abaixo. */
   #content {
      top: 65px;
   }

   /* .thin (margin: 0 auto original) e #searchbars ul (margin: 0 auto
    * original) ficariam colados/embaixo da barra fixa — empurra os dois
    * para baixo do menu+userinfo.
    * IMPORTANTE: usamos padding-top (nao margin-top) no .thin porque
    * #alerts tem margin-bottom:-60px no CSS base. Margens de vizinhos
    * "colapsam" (somam) — com margin-top aqui, o texto do .thin era
    * puxado para dentro da caixa do #alerts. padding-top nao colapsa,
    * entao cria um espaco em branco de verdade e o texto nunca invade
    * o #alerts, permitindo aproximar os dois ajustando so este valor. */
   .thin {
      margin: 0 auto;
      padding-top: 5px;
   }

   #searchbars ul {
      margin: 90px auto;
      display: block;
   }

   /* O margin:90px acima faz a caixa do #searchbars (position:absolute,
    * sem altura fixa) crescer e sobrepor o #alerts, que fica embaixo.
    * Como #searchbars nao tem z-index, ele bloqueia os cliques mesmo na
    * area vazia. Em vez de mexer em z-index (arriscado, tem dropdown
    * dentro de #searchbars ul li ul com z-index:1000), a area vazia do
    * #searchbars passa a ignorar cliques, e so os elementos realmente
    * clicaveis dentro dela (input, links, form) continuam funcionando. */
   #searchbars {
      pointer-events: none;
   }

   #searchbars * {
      pointer-events: auto;
   }

   /* Abaixo de 900px o cabecalho volta a rolar junto: a media query
    * original ja empilha menu/userinfo, e barra fixa ali comeria
    * metade da tela do celular. */
   @media (max-width: 900px) {
      #menu,
      #userinfo {
         position: static;
         top: auto;
      }

      body {
         padding-top: 0;
      }

      .thin {
         margin: 0 auto;
         padding-top: 0;
      }

      #searchbars ul {
         margin: 0 auto;
      }

      #searchbars {
         pointer-events: auto;
      }
   }
}

/* ==========================================================================
 *  ++++++++++ Media Queries / Layout Responsivo ("thin") ++++++++++
 *  ========================================================================== */

/* ----------------------------------------------------------------------
 *   Escalonamento do .thin para monitores grandes (min-width)
 *  Mantém o .thin atual (max-width: 1228px, regra original logo acima)
 *  como padrão para qualquer tela até 1080p (até 1920px de largura).
 *  A partir daí, aumenta progressivamente para aproveitar melhor
 *  monitores 1440p e 4K, sem deixar o conteúdo esticado demais.
 *  ---------------------------------------------------------------------- */
@media (min-width: 1921px) {
   /* Monitores 1440p (2560x1440) e telas largas entre 1080p e 4K */
   .thin {
      max-width: 1400px;
   }
}

@media (min-width: 3840px) {
   /* Monitores 4K (3840x2160) */
   .thin {
      max-width: 1600px;
   }
}

/* ----------------------------------------------------------------------
 * Breakpoint intermediário (tablets / janelas estreitas) <= 1024px
 * ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
   /* Libera os min-width fixos que forçam scroll horizontal */
   body,
   #menu,
   #userinfo,
   #searchbars,
   #alerts {
      min-width: 0;
   }

   body {
      overflow-x: hidden;
   }

   /* MANTÉM as 2 colunas lado a lado — sidebar continua float:right,
       * herdado da regra base, e agora encolhe sozinha via clamp() (não
       * precisa mais de override aqui, só o que realmente muda de estrutura
       * fica neste breakpoint). */
   .thin,
   .widethin {
      max-width: 100%;
      width: 100% !important;
   }

   .two_columns {
      width: 100%;
   }

   .permissions {
      width: 100%;
   }

   .permission_container {
      float: none;
      width: 100%;
   }
}

/* ----------------------------------------------------------------------
 * Ajustes finos de tipografia (a largura da sidebar já é fluida via
 * clamp() na regra base — aqui só sobra reduzir fonte/padding do que
 * NÃO escala sozinho: texto dos boxes e botões do carrossel).
 * ---------------------------------------------------------------------- */
@media (max-width: 768px) {
   .box,
   .box2 {
      font-size: 10.5px;
   }

   ul.bjqs-controls.v-centered li.bjqs-next a,
   ul.bjqs-controls.v-centered li.bjqs-prev a {
      min-width: 0;
      font-size: 10px;
      padding: 5px 6px;
   }
}

/* ----------------------------------------------------------------------
 * Pequeno respiro extra pra coluna principal (a sidebar em si já está
 * fluida via clamp(); isso só sobra de espaço horizontal pro texto).
 * ---------------------------------------------------------------------- */
@media (max-width: 550px) {
   .main_column {
      padding-right: 6px;
   }
}

/* ----------------------------------------------------------------------
 * Celular comum estreito (320-420px, ex: iPhone SE/mini) — a sidebar
 * já está no mínimo do clamp() (135px) nessa faixa; aqui só encolhe mais
 * o texto dos botões do carrossel, que não tem clamp() próprio.
 * ---------------------------------------------------------------------- */
@media (max-width: 420px) {
   ul.bjqs-controls.v-centered li.bjqs-next a,
   ul.bjqs-controls.v-centered li.bjqs-prev a {
      font-size: 9px;
      padding: 4px 3px;
      letter-spacing: 0;
   }
}

/* ----------------------------------------------------------------------
 * Último recurso: só empilha em telas absurdamente minúsculas (abaixo de
 * qualquer celular real em uso hoje — 320px, o menor celular comum,
 * ainda fica em 2 colunas).
 * ---------------------------------------------------------------------- */
@media (max-width: 300px) {
   .sidebar {
      float: none;
      width: 100%;
      margin: 0 0 10px 0;
   }

   .main_column {
      padding-right: 0;
   }

   div.sidebar #event_div {
      margin-left: 0;
   }

   .homesldframe {
      width: 250px !important;
      margin: 0 auto;
   }
}

/* ----------------------------------------------------------------------
 *   Cabeçalho: menu, userinfo e busca em fluxo normal (empilhados)
 *  Abaixo desse ponto o posicionamento absoluto com offsets fixos.
 *  ---------------------------------------------------------------------- */
@media (max-width: 900px) {
   #header {
      height: auto;
      padding-bottom: 10px;
      background-size: contain;
   }

   #logo {
      position: static;
      height: auto;
      padding: 10px 0;
   }

   /* #logo a tem width:320px fixo na regra base (linha ~420) — é só uma
       * área clicável (link pra home), sem imagem própria; a imagem visual
       * vem do background do #header, que já vira "contain" logo abaixo.
       * Sem isto, o link de 320px força rolagem horizontal em qualquer tela
       * mais estreita que 320px (a causa do "quebrado" no celular). */
   #logo a {
      margin: 0 auto;
      width: 100%;
      max-width: 320px;
      height: auto;
      aspect-ratio: 320 / 150;
   }

   #userinfo_username,
   #userinfo_major {
      position: static;
      width: 90%;
      margin: 4px auto;
      left: auto;
      right: auto;
   }

   #userinfo {
      position: static;
      top: auto;
   }

   #menu {
      position: static;
      top: auto;
      width: 100%;
   }

   #menudrop ul {
      float: none;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
   }

   #menudrop ul li {
      float: none;
      width: auto;
   }

   #menudrop ul ul {
      position: static;
      box-shadow: none;
   }

   #menudrop ul ul ul,
   #menudrop ul ul ul ul {
      position: static;
      left: auto;
      top: auto;
   }

   #searchbars {
      position: static;
      top: auto;
      width: 100%;
      min-width: 0;
   }

   #searchbars ul li {
      display: inline-block;
      margin: 2px;
   }

   #alerts {
      position: static;
      margin-top: 10px;
      margin-bottom: 10px;
      min-width: 0;
   }

   #content {
      top: 0;
      width: 100%;
      padding: 0 10px;
   }

   #footer {
      margin-top: 20px;
   }
}
