:root {
    --hydra-glow:  #4A77D4;
    --hydra-light: #9CC0F5;
    --hydra-deep:  #1B3A7A;
    --royal-abyss: #5B3FB8;
    --royal-light: #8E7BE0;
    --royal-deep:  #28184F;
    --obsidiana:   #0A1430;
    --mid-teal:    #101F45;
    --abyss:       #05102A;
    --white:       #FFFFFF;
    --verdejante:  #1E9968;
    --ouro-velho:  #C99B2E;
    --vinho:       #9F2D3A;
    --gold-dark:   #A9821B;
    --gold-base:   #C99B2E;
    --gold-mid:    #E2B65C;
    --gold-light:  #F2D38A;

    --bg-base:        var(--obsidiana);
    --bg-elevated:    var(--mid-teal);
    --bg-sunken:      var(--abyss);
    --frame-border:   rgba(201, 155, 46, 0.40);
    --frame-border-strong: rgba(226, 182, 92, 0.68);
    --text-primary:   #EAF0FF;
    --text-secondary: #A9B8DD;
    --text-muted:     #7E8DB2;
    --header-bg:      linear-gradient(180deg, #112A5E 0%, var(--hydra-deep) 100%);
    --cta-bg:         linear-gradient(135deg, var(--gold-base) 0%, var(--gold-mid) 50%, var(--gold-base) 100%);
    --cta-bg-hover:   linear-gradient(135deg, var(--gold-mid) 0%, var(--gold-light) 50%, var(--gold-mid) 100%);
    --cta-text:       #1A1208;
    --cta-border:     var(--gold-dark);
    --link:           var(--hydra-light);
    --link-hover:     var(--hydra-glow);
    --shadow-frame:   0 4px 14px rgba(0, 0, 0, 0.55);
    --radius-frame:   6px;
    --font-base:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text-primary);
    font-family: var(--font-base);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
    font-family: inherit;
    font-weight: inherit;
}

/* ===== TransiÃ§Ã£o de pÃ¡gina (fade-in suave do conteÃºdo central) =====
   Sem fade-out: o conteÃºdo antigo fica firme atÃ© a pÃ¡gina nova carregar.
   IMPORTANTE: sÃ³ opacity â€” SEM transform. Um transform persistente (fill-mode both)
   cria containing block e quebra a posiÃ§Ã£o de elementos position:fixed dentro
   do .layout-col--center (ex: overlay de verificaÃ§Ã£o do login). */
@keyframes page-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.layout-col--center {
    animation: page-fade-in 300ms ease both;
}
@media (prefers-reduced-motion: reduce) {
    .layout-col--center { animation: none; }
}

h1, h2, h3, h4, .display, .title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

body {
    background-color: var(--bg-base);
    background-image: url("/static/img/bg/papot-bg.png");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 20, 48, 0.55) 0%, rgba(5, 16, 42, 0.85) 100%),
        radial-gradient(circle at 30% 20%, rgba(74, 119, 212, 0.08) 0%, transparent 55%);
    pointer-events: none;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

.site-header {
    background: linear-gradient(180deg, rgba(5, 16, 42, 0.92) 0%, rgba(10, 20, 48, 0.78) 100%);
    border-bottom: 1px solid var(--frame-border);
    padding: 10px 0;
    backdrop-filter: blur(4px);
}
.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo-img {
    height: 52px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    transition: filter 0.15s;
}
.site-logo:hover .site-logo-img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 6px rgba(156, 192, 245, 0.5));
}

.site-header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
}
.site-header-nav--center {
    flex: 1;
    justify-content: center;
}

.site-header-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    font-weight: 500;
}
.site-header-link:hover {
    color: var(--hydra-light);
    background: rgba(74, 119, 212, 0.08);
}
.site-header-link--plain {
    color: var(--text-muted);
    font-size: 12px;
    padding: 6px 4px;
}
.site-header-link--plain:hover { color: var(--hydra-light); background: transparent; }

.site-header-link-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.site-header-link-icon--discord {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235865F2'><path d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.07.07 0 0 0-.074.035c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.074-.035A19.736 19.736 0 0 0 3.683 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.086-2.157-2.42 0-1.334.956-2.42 2.157-2.42 1.21 0 2.176 1.095 2.157 2.42 0 1.334-.956 2.42-2.157 2.42zm7.974 0c-1.183 0-2.157-1.086-2.157-2.42 0-1.334.955-2.42 2.157-2.42 1.21 0 2.176 1.095 2.157 2.42 0 1.334-.946 2.42-2.157 2.42z'/></svg>");
}
.site-header-link-icon--instagram {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e1306c'><path d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z'/></svg>");
}
.site-header-link-icon--download {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A77D4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' y1='15' x2='12' y2='3'/></svg>");
}

.site-header-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 8px;
}
.site-header-online strong { color: var(--verdejante); font-weight: bold; margin-right: 2px; }
.site-header-online-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E9968' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M23 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.site-header-langs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(5, 16, 42, 0.6);
    border-radius: 4px;
    padding: 4px;
    border: 1px solid var(--frame-border);
}
.site-header-lang {
    display: inline-block;
    padding: 2px;
    border-radius: 2px;
    line-height: 0;
    transition: background 0.15s;
}
.site-header-lang:hover { background: rgba(74, 119, 212, 0.15); }
.flag {
    display: inline-block;
    width: 24px;
    height: 16px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}
.flag--br {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 504'><rect width='720' height='504' fill='%23009c3b'/><polygon points='360,56 670,252 360,448 50,252' fill='%23ffdf00'/><circle cx='360' cy='252' r='98' fill='%23002776'/><path d='M270,260 Q360,210 450,260' stroke='%23fff' stroke-width='10' fill='none'/></svg>");
}
.flag--us {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7410 3900'><rect width='7410' height='3900' fill='%23b22234'/><path d='M0,450 H7410 M0,1050 H7410 M0,1650 H7410 M0,2250 H7410 M0,2850 H7410 M0,3450 H7410' stroke='%23fff' stroke-width='300'/><rect width='2964' height='2100' fill='%233c3b6e'/></svg>");
}
.flag--es {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 750 500'><rect width='750' height='500' fill='%23AA151B'/><rect y='125' width='750' height='250' fill='%23F1BF00'/></svg>");
}

.site-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    background: rgba(74, 119, 212, 0.08);
    border: 1px solid var(--frame-border);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.site-header-btn:hover {
    background: rgba(74, 119, 212, 0.16);
    border-color: var(--frame-border-strong);
    color: var(--white);
}
.site-header-btn--primary {
    background: linear-gradient(135deg, var(--gold-base) 0%, var(--gold-mid) 50%, var(--gold-base) 100%);
    border-color: var(--gold-dark);
    color: #1A1208;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 6px rgba(169, 130, 27, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.site-header-btn--primary:hover {
    background: linear-gradient(135deg, var(--gold-mid) 0%, var(--gold-light) 50%, var(--gold-mid) 100%);
    border-color: var(--gold-mid);
    color: #1A1208;
    box-shadow: 0 3px 10px rgba(226, 182, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.site-header-btn-icon { font-size: 14px; }

/* ===== Logged user / Admin / Logout (header) ===== */
.site-header-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: var(--royal-light);
    border: 1px solid rgba(142, 123, 224, 0.45);
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.site-header-admin:hover {
    background: rgba(91, 63, 184, 0.22);
    color: #fff;
    border-color: var(--royal-light);
}
.site-header-admin--notif {
    border-color: rgba(226, 86, 107, 0.75);
}
.site-header-admin .header-notif-badge {
    box-shadow: 0 0 0 1.5px rgba(10, 22, 40, 0.55);
}

.site-header-user {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    background: linear-gradient(135deg, var(--gold-base) 0%, var(--gold-mid) 50%, var(--gold-base) 100%);
    border: 1px solid var(--gold-base);
    color: #1A1208;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(169, 130, 27, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: filter 0.15s, transform 0.05s;
}
.site-header-user:hover { filter: brightness(1.06); }
.site-header-user:active { transform: translateY(1px); }
.site-header-user--notif {
    box-shadow: 0 0 0 2px rgba(226, 86, 107, 0.55), 0 2px 8px rgba(226, 86, 107, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.header-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e2566b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 1.5px rgba(26, 18, 8, 0.5);
    animation: notif-pulse 1.8s ease-in-out infinite;
}
@keyframes notif-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
/* Badge no botÃ£o "Minha Conta" da sidebar de login */
.login-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e2566b;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    margin-left: 4px;
    vertical-align: middle;
}
.login-notif-link {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    background: rgba(226, 86, 107, 0.12);
    border: 1px solid rgba(226, 86, 107, 0.4);
    color: #ff9aa6;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.login-notif-link:hover {
    background: rgba(226, 86, 107, 0.2);
    border-color: rgba(226, 86, 107, 0.7);
}
.site-header-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(26, 18, 8, 0.85);
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.site-header-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    max-width: 180px;
}
.site-header-user-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-header-user-email {
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(26, 18, 8, 0.7);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header-logout-form { margin: 0; }
.site-header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(159, 45, 58, 0.18);
    border: 1px solid rgba(159, 45, 58, 0.45);
    color: #ffb3bd;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.site-header-logout:hover {
    background: rgba(159, 45, 58, 0.35);
    color: #fff;
    border-color: rgba(220, 70, 85, 0.8);
}

.site-banner {
    max-width: 1400px;
    margin: 24px auto 0;
    padding: 0 24px;
    display: flex;
    justify-content: center;
}
.site-banner-link {
    display: inline-block;
    line-height: 0;
}
.site-banner-logo {
    max-height: 170px;
    width: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}
@media (max-width: 600px) {
    .site-banner-logo { max-height: 110px; }
}

.layout {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 16px;
    align-items: start;
    box-sizing: border-box;
}
.layout--single { grid-template-columns: minmax(0, 1fr); }
.layout-col { min-width: 0; }
.layout-col--center {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow-x: hidden;
}
.layout-col--left, .layout-col--right { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .site-header-inner { flex-wrap: wrap; }
    .site-header-nav--center { order: 3; flex: 1 0 100%; justify-content: flex-start; flex-wrap: wrap; }
}

.site-footer {
    background: linear-gradient(180deg, var(--abyss) 0%, var(--obsidiana) 100%);
    border-top: 1px solid var(--frame-border);
    box-shadow: inset 0 1px 0 rgba(74, 119, 212, 0.08);
    padding: 16px 0;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: 12px;
}
.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}
.site-footer-col { display: flex; align-items: center; gap: 8px; }
.site-footer-col--left { justify-content: flex-start; }
.site-footer-col--center { justify-content: center; color: var(--text-primary); }
.site-footer-col--right { justify-content: flex-end; }

.site-footer-copy { color: var(--text-muted); letter-spacing: 0.3px; }
.site-footer-col--left { gap: 14px; flex-wrap: wrap; }
.site-footer-credit { color: var(--text-muted); letter-spacing: 0.3px; }
.site-footer-credit a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.site-footer-credit a:hover { color: var(--hydra-light); text-decoration: underline; }
.site-footer-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--verdejante);
    box-shadow: 0 0 6px rgba(30, 153, 104, 0.7);
    display: inline-block;
}
.site-footer-online-dot + strong { color: var(--white); font-weight: 600; }
.site-footer-legal {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.site-footer-legal:hover { color: var(--hydra-light); }

@media (max-width: 768px) {
    .site-footer-inner { grid-template-columns: 1fr; text-align: center; }
    .site-footer-col { justify-content: center; }
}
