/* Ficheiro: EXP/public/css/layout.css (VERSÃO FINAL COM MENU E FOOTER CRIATIVOS) */

html.christmas-theme {
    background: url('../images/background_christmas.jpg') no-repeat center center fixed;
    background-size: cover;
}

html.christmas-theme #guild-logo {
    content: url('../images/Logomarca_Natal.png'); /* Troca a imagem da logo */
}

html {
    background: url('../images/background.jpg') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

html::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 20, 30, 0.5) url('https://www.transparenttextures.com/patterns/black-felt.png');
    z-index: -1;
}

body {
    max-width: 960px;
    margin: 0 auto;
    background-color: transparent; 
    padding-top: 41px;
}

/* --- TOPO E MENU HORIZONTAL --- */

.header-content-wrapper {
    max-width: 960px;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

#header-image {
    width: 100%;
    display: block;
    max-height: 320px;
    object-fit: cover;
}

#guild-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: auto;
    z-index: 5;
    animation: power-pulse 5s infinite ease-in-out;
}

@keyframes power-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 100, 100, 0.7));
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    }
}


#page-header {
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
    position: relative; 
    z-index: 10;
}

/* === REGRAS CRIATIVAS DO MENU === */
#main-menu {
    display: flex;
    justify-content: space-between;
    background-color: var(--menu-bg);
    border-top: 2px solid var(--menu-accent-gold);
    align-items: center;
}

.menu-links-wrapper {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.menu-links-wrapper > a, .menu-links-wrapper .dropdown > a {
    color: var(--menu-text);
    text-decoration: none;
    padding: 15px 25px;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: block;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease, text-shadow 0.3s ease;
}

.menu-links-wrapper > a:hover, 
.menu-links-wrapper .dropdown:hover > a,
#theme-switcher:hover {
    color: var(--menu-text-hover);
    background-color: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 8px var(--menu-accent-gold);
}

.menu-links-wrapper > a::after, .menu-links-wrapper .dropdown > a::after {
    content: none;
}

#main-menu .fas {
    margin-right: 8px;
    opacity: 0.8;
    color: var(--menu-accent-gold);
}

#theme-switcher {
    padding: 15px 25px;
    color: var(--menu-text);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}

#main-menu .dropdown {
    position: relative;
}

#main-menu .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--menu-bg);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1000;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border: 1px solid var(--menu-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#main-menu .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#main-menu .dropdown-menu li a {
    color: var(--menu-text);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    font-size: 0.9em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#main-menu .dropdown-menu li a:hover {
    background-color: var(--menu-accent-gold);
    color: var(--menu-bg);
}

/* --- LAYOUT DE DUAS COLUNAS --- */
.page-wrapper {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    display: flex;
    gap: 2%;
    background-color: var(--bg-color);
    border-radius: 8px;
}

.main-column {
    width: 73%;
    flex-shrink: 0;
}

.main-column:only-child {
    width: 100%;
}

.sidebar-column {
    width: 25%;
    flex-shrink: 0;
}

/* --- CARDS DA BARRA LATERAL --- */
.info-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 15px;
    padding-bottom: 3px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.ad-placeholder {
    background-color: #e9ecef;
    border: 2px dashed var(--border-color);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 8px;
}

#page-footer {
    background-color: var(--menu-bg);
    color: var(--menu-text);
    padding: 20px 0 0 0;
    text-align: center;
    border-radius: 0 0 8px 8px;
    border-top: 4px solid var(--menu-accent-gold);
    margin-top: 20px;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-quote {
    font-style: normal;
    font-weight: 300;
    color: var(--menu-accent-gold);
    margin: 0;
    font-size: 1.2em;
    letter-spacing: 1px;
    font-family: 'Alegreya SC', serif;
}

.footer-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--menu-accent-gold), transparent);
    margin: -10px 0;
}

.dark-theme .footer-quote {
    color: var(--menu-accent-gold);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--menu-text);
    font-size: 1.4em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--menu-accent-gold);
    transform: scale(1.2) translateY(-2px);
}

.footer-legal {
    width: 100%;
    font-size: 0.8em;
    color: var(--menu-text);
    background-color: rgba(0,0,0,0.2);
    padding: 15px 0;
    border-top: 1px solid var(--menu-border);
}

.footer-legal p {
    margin: 5px 0;
}

/* --- AJUSTES DE RESPONSIVIDADE DO LAYOUT --- */
@media (max-width: 1024px) {
    .page-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .main-column, .sidebar-column {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #main-menu {
        flex-wrap: wrap;
    }

    #guild-logo {
        width: 90px;
        animation: none;
    }
}

/* CORREÇÃO APLICADA AQUI: O seletor agora é mais específico */
.sidebar-column .info-card {
  position: relative;
  overflow: hidden;
}

.sidebar-column .info-card::after {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 52px;
  height: 52px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #dcdcdc;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  opacity: 0.5;
  transform: rotate(15deg);
}

.sidebar-column #search-widget::after {
  background-image: url('../images/buscador.png');
}

.sidebar-column #summary-widget::after {
  background-image: url('../images/summary.png');
}

.sidebar-column #boost-widget::after {
  background-image: url('../images/demon_1.png');
}

.sidebar-column #poll-widget::after {
  background-image: url('../images/enquete.png');
}

/* --- ESTILOS PARA O LINK DE MENU ATIVO --- */
#main-menu a.active,
#main-menu .dropdown-toggle.active {
    color: var(--menu-text-hover);
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- BARRA DE AÇÕES DO USUÁRIO LOGADO (VERSÃO COMPACTA) --- */
@keyframes slideDown {
    from { top: -60px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

.action-bar-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.action-bar-welcome {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-bar-welcome img {
    height: 28px;
    width: 28px;
    image-rendering: pixelated;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-bar-welcome span {
    font-size: 0.8em;
    font-weight: 500;
}

.action-bar-welcome a.action-bar-profile-link {
    text-decoration: none;
    color: inherit;
}

.action-bar-welcome a.action-bar-profile-link strong {
    color: var(--accent-color);
    transition: color 0.2s ease;
}

.action-bar-welcome a.action-bar-profile-link:hover strong {
    color: white;
}

.action-bar-links a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 6px 12px;
    margin-left: 8px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.8em;
    transition: background-color 0.2s, color 0.2s;
}

.action-bar-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-bar-links a.action-primary {
    background-color: var(--accent-color);
    color: white;
}

.action-bar-links a.action-primary:hover {
    background-color: var(--accent-hover-color);
}

.action-bar-links a.action-admin {
    background-color: var(--danger-color);
    color: white;
}

.action-bar-links a.action-admin:hover {
    background-color: #c82333;
    color: white;
}

/* === ESTILOS PARA ANIMAÇÃO DE NOMES NO TOPO === */
#name-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    bottom: 49px;
    pointer-events: none;
    overflow: hidden;
    z-index: 6;
}

.animated-name {
    position: absolute;
    color: white;
    font-weight: 400;
    font-size: 1.0em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0; /* Começa invisível para o fade in */
    transition: opacity 1.5s ease-in-out;
    font-family: 'Goldman', sans-serif; /* Nova fonte */
}

/* --- BARRA DE AÇÕES DO USUÁRIO NÃO LOGADO --- */

#user-action-bar, 
#guest-action-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(22, 26, 30, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    animation: slideDown 0.5s ease-out forwards;
}

#datetime-container {
    font-size: 0.7em;
    font-weight: 500;
    color: #e0e0e0;
    text-transform: capitalize;
}

.action-bar-links a.action-bar-login-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.7em;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.action-bar-links a.action-bar-login-btn:hover {
    background-color: var(--accent-hover-color);
}

.header-image-container {
    position: relative;
    line-height: 0; 
}

@media (max-width: 768px) {

    #user-action-bar {
        height: auto;
        min-height: 40px;
    }

.action-bar-content {
    flex-wrap: wrap;
    padding: 5px 10px;
    height: auto;
    align-items: center;
}

#guest-action-bar .action-bar-content {
    justify-content: space-between;
}

#user-action-bar .action-bar-content {
    justify-content: center;
}

#user-action-bar .action-bar-welcome,
#user-action-bar .action-bar-links {
    flex-basis: 100%;
    justify-content: center;
    display: flex;
}

#user-action-bar .action-bar-welcome {
    text-align: center;
    padding-bottom: 5px;
    font-size: 0.75em;
}

#user-action-bar .action-bar-links a {
    font-size: 0.75em;
    padding: 5px 8px;
    margin-left: 5px;
}

}

body {
    padding-top: 41px; 
}