/* 
BRTibia - Modernização Sutil da Interface
Preserva a identidade visual medieval/fantástica com melhorias modernas
*/

/* =================== MELHORIAS GERAIS =================== */

/* Transições mais suaves e animações naturais */
* {
    transition: all 0.2s ease-out;
}

/* Remover transições do centro para evitar piscadas */
.center_box, .center_box * {
    transition: none !important;
}

/* Melhoria do scrollbar para manter o tema medieval */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cc7e0f, #8b5a0b);
    border-radius: 10px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff9000, #cc7e0f);
}

/* Melhor legibilidade do texto */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* =================== CONTAINERS E LAYOUT =================== */

/* Responsividade melhorada */
.container_main {
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Forçar visibilidade e posicionamento da sidebar direita */
.container_right {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    float: left !important;
    width: 246px !important;
    position: relative !important;
    clear: none !important;
    margin: 15px 0 0 0 !important;
}

.container_right .right_box {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin-bottom: 18px !important;
}

/* Verificar se o container principal tem espaço suficiente */
.container_main {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
}

.container_left {
    flex: 0 0 246px !important;
}

.container_mid {
    flex: 1 1 648px !important;
    margin: 0 15px !important;
}

.container_right {
    flex: 0 0 246px !important;
    margin-left: 0 !important;
}

@media (max-width: 1200px) {
    .container_main {
        width: 95%;
        margin: 320px auto 0 auto;
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    /* Garantir que sidebars permaneçam visíveis */
    .container_left, .container_right {
        display: block !important;
        flex-shrink: 0 !important;
    }
    
    .container_left {
        flex: 0 0 200px !important;
    }
    
    .container_mid {
        flex: 1 1 auto !important;
        margin: 0 10px !important;
    }
    
    .container_right {
        flex: 0 0 200px !important;
    }
}

@media (max-width: 768px) {
    .container_main {
        width: 100%;
        margin: 280px auto 0 auto;
        display: block !important;
        flex-direction: column !important;
    }
    
    .container_left, .container_right {
        width: 100% !important;
        float: none !important;
        margin: 10px 0 !important;
        flex: none !important;
    }
    
    .container_mid {
        width: 100% !important;
        float: none !important;
        margin: 10px 0 !important;
        flex: none !important;
    }
    
    /* Em mobile, garantir que sidebar direita esteja visível */
    .container_right {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* =================== BOXES E WIDGETS =================== */

/* Apenas sidebars com efeitos sutis, centro sem efeitos */
.left_box, .right_box {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.2s ease-out;
    position: relative;
}

.left_box:hover, .right_box:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

/* Centro sem efeitos para evitar piscadas */
.center_box {
    transition: none !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
}

.center_box:hover {
    transition: none !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
}

/* Efeito de brilho removido para evitar piscadas */
.left_box::before, .right_box::before, .center_box::before {
    display: none;
}

/* Melhor definição dos cantos */
.corner_lt, .corner_rt, .corner_rb, .corner_lb {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

/* =================== NAVEGAÇÃO E LINKS =================== */

/* Melhorias nos links da sidebar - tamanho compacto com ícones */
.left_box ul li a {
    padding: 6px 10px;
    border-radius: 4px;
    margin: 1px 0;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 144, 0, 0.0);
    font-size: 11px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Estilo para os ícones emoji */
.left_box ul li a:before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Garantir que emojis sejam exibidos corretamente */
.left_box ul li a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Melhorar o hover com os ícones */
.left_box ul li a:hover {
    background: rgba(255, 144, 0, 0.1);
    border-color: rgba(255, 144, 0, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Destacar botões importantes */
.left_box ul li a[href*="register"] {
    border-left: 2px solid rgba(255, 144, 0, 0.5);
    background: rgba(255, 144, 0, 0.05);
}

.left_box ul li a[href*="download"] {
    border-left: 2px solid rgba(34, 139, 34, 0.5);
    background: rgba(34, 139, 34, 0.05);
}

.left_box ul li a[href*="powergamers"] {
    border-left: 2px solid rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.05);
}

.left_box ul li a[href*="shop"] {
    border-left: 2px solid rgba(138, 43, 226, 0.5);
    background: rgba(138, 43, 226, 0.05);
}

.left_box ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 144, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.left_box ul li a:hover::before {
    left: 100%;
}

/* Efeito de pulso removido para ser mais discreto */
.left_box ul li a[href*="download"], 
.left_box ul li a[href*="register"] {
    /* animation: pulse-glow 2s infinite; */
    border-left: 2px solid rgba(255, 144, 0, 0.5);
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 3px rgba(255, 144, 0, 0.2);
    }
    50% { 
        box-shadow: 0 0 8px rgba(255, 144, 0, 0.4);
    }
}

/* =================== BOTÕES E FORMULÁRIOS =================== */

/* Melhorias nos botões - tamanho compacto */
.loginbtn, .createbtn, .download_client {
    position: relative;
    overflow: hidden;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    padding: 6px 12px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 2px !important;
    min-height: auto !important;
}

/* CSS específico para Quick Login na sidebar direita */
.right_box .loginbtn, .right_box .createbtn {
    display: inline-block !important;
    width: auto !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    text-align: center !important;
    vertical-align: middle !important;
    margin: 3px 2px !important;
    min-width: 80px !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 144, 0, 0.6) !important;
    border-radius: 4px !important;
    background: rgba(255, 144, 0, 0.4) !important;
    color: #2c1810 !important;
    font-weight: bold !important;
}

.right_box .loginbtn:hover, .right_box .createbtn:hover {
    background: rgba(255, 144, 0, 0.6) !important;
    border-color: rgba(255, 144, 0, 0.8) !important;
    transform: translateY(-1px) !important;
    color: #1a0f08 !important;
}

.right_box .createbtn {
    background: rgba(34, 139, 34, 0.4) !important;
    border-color: rgba(34, 139, 34, 0.6) !important;
    color: #1a3d1a !important;
}

.right_box .createbtn:hover {
    background: rgba(34, 139, 34, 0.6) !important;
    border-color: rgba(34, 139, 34, 0.8) !important;
    color: #0d1f0d !important;
}

/* Layout do Quick Login */
.right_box form {
    text-align: center !important;
    padding: 10px !important;
}

.right_box .inputtext {
    width: 90% !important;
    margin-bottom: 5px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Container para os botões do Quick Login */
.right_box form > .loginbtn, 
.right_box form > .createbtn {
    margin: 5px 2px !important;
    display: inline-block !important;
}

/* Texto do link de recuperação */
.right_box center {
    margin-top: 8px !important;
    font-size: 10px !important;
}

.right_box center a {
    color: #cc7e0f !important;
    text-decoration: none !important;
}

.right_box center a:hover {
    color: #ff9f0a !important;
    text-decoration: underline !important;
}

.loginbtn:hover, .createbtn:hover, .download_client:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

/* Efeito de ondulação nos botões */
.loginbtn::after, .createbtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.loginbtn:active::after, .createbtn:active::after {
    width: 300px;
    height: 300px;
}

/* Melhorias nos inputs - tamanho compacto */
.inputtext {
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    padding: 6px 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 2px !important;
    min-height: auto !important;
}

.inputtext:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.3);
    transform: scale(1.02);
}

.inputtext::placeholder {
    color: rgba(156, 125, 84, 0.7);
    transition: all 0.3s ease;
}

.inputtext:focus::placeholder {
    opacity: 0;
    transform: translateY(-20px);
}

/* =================== TABELAS =================== */

/* Melhorias nas tabelas */
table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

table tr {
    transition: all 0.3s ease;
}

table tr:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

table tr:hover td {
    background: linear-gradient(135deg, #e4d0b2, #d4c0a1);
}

/* Efeito simplificado nas linhas especiais */
tr.special {
    position: relative;
}

tr.special:hover {
    background: rgba(255, 144, 0, 0.05);
    transition: background 0.2s ease;
}

/* =================== INFORMAÇÕES DO SERVIDOR =================== */

/* Melhorias na tabela de informações */
.sinfotable {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(5px);
}

.sinfotable td {
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sinfotable td:hover {
    background: rgba(255, 144, 0, 0.1);
    transform: translateX(3px);
}

/* =================== NÍVEIS E RANKINGS =================== */

/* Melhorias nos níveis */
.lvl {
    background: linear-gradient(135deg, #ff9f0a, #cc7e0f);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lvl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.3s ease;
}

.lvl:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(204, 126, 15, 0.3);
}

/* =================== MENU DE CONTA =================== */

/* Melhorias no menu de conta */
.acc_menu a {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
}

.acc_menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 144, 0, 0.1));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.acc_menu a:hover::before {
    transform: scaleX(1);
}

.acc_menu a:hover {
    background: linear-gradient(135deg, rgba(255, 144, 0, 0.15), rgba(255, 144, 0, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* =================== SLIDER =================== */

/* Melhorias no slider */
.slider {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.slidesjs-pagination {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.7);
}

.slidesjs-pagination li a {
    transition: all 0.3s ease;
}

.slidesjs-pagination li a:hover,
.slidesjs-pagination li a.active {
    background: linear-gradient(135deg, #ff9f0a, #cc7e0f);
    box-shadow: 0 2px 8px rgba(255, 144, 0, 0.4);
}

/* =================== BARRA SUPERIOR =================== */

/* Melhorias na barra superior */
.top-bar {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 144, 0, 0.3);
    transition: all 0.3s ease;
}

.top-bar:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* =================== ANIMAÇÕES LOADING =================== */

/* Loader suave para elementos que carregam */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 144, 0, 0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* =================== MELHORIAS DE ACESSIBILIDADE =================== */

/* Melhor foco para navegação por teclado */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #ff9f0a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Redução de movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =================== EFEITOS ESPECIAIS =================== */

/* Efeito de partículas removido para ser mais discreto */
.download_client:hover,
.left_box ul li a[href*="register"]:hover {
    position: relative;
}

/* Partículas desabilitadas
.download_client:hover::after,
.left_box ul li a[href*="register"]:hover::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 12px;
    animation: sparkle 0.8s ease-in-out;
}
*/

@keyframes sparkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1) rotate(180deg); 
    }
}

/* =================== TEMA ESCURO MELHORADO =================== */

/* Melhor contraste para o tema escuro */
body {
    background-attachment: fixed;
    background-size: cover;
}

/* Melhor legibilidade do texto */
.center_box .content_bg {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
        url(img/mid_bot.png) no-repeat center bottom, 
        url(img/mid_top.png) no-repeat center top, 
        url(img/mid_mid.png) repeat-y center top;
}

/* =================== RESPONSIVIDADE AVANÇADA =================== */

@media (max-width: 480px) {
    .container_main {
        margin: 200px auto 0 auto;
    }
    
    .inputtext {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    
    .loginbtn, .createbtn {
        width: 100%;
        margin: 3px 0;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .download_client {
        width: 100%;
        max-width: 250px;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .slider {
        width: 100%;
        height: auto;
    }
}

/* =================== OTIMIZAÇÕES DE PERFORMANCE =================== */

/* Aceleração de hardware para animações */
.left_box, .right_box, .center_box,
.loginbtn, .createbtn, .download_client,
.left_box ul li a {
    transform: translateZ(0);
    will-change: transform;
}

/* Prevenção de layout shifts */
.slider, .left_box, .right_box, .center_box {
    contain: layout;
}

/* CSS DE EMERGÊNCIA - FORÇAR SIDEBAR DIREITA VISÍVEL */
.container_right {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    float: left !important;
    width: 246px !important;
    height: auto !important;
    overflow: visible !important;
    z-index: 1 !important;
    margin: 15px 0 0 0 !important;
    padding: 0 !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.container_right * {
    visibility: visible !important;
    opacity: 1 !important;
}

.container_right .right_box {
    display: block !important;
    width: 100% !important;
    margin-bottom: 18px !important;
} 