@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --hxh-bg: #0b0e14;
    --hxh-bg-alt: #0f131b;
    --hxh-surface: #141a24;
    --hxh-surface-hover: #1b2330;
    --hxh-border: #2a3342;
    --hxh-border-strong: #3a4557;
    --hxh-text: #eae3d2;
    --hxh-text-muted: #8b93a3;
    --hxh-text-dim: #5c6577;
    --hxh-gold: #c9a227;
    --hxh-gold-bright: #e6c358;
    --hxh-emerald: #1b8a5a;
    --hxh-emerald-bright: #2fbd7c;
    --hxh-ice: #4fa8d8;
    --hxh-blood: #8a2332;
    --hxh-blood-bright: #c9394e;
    --hxh-font-display: 'Cinzel', serif;
    --hxh-font-body: 'Rajdhani', sans-serif;
    --hxh-radius: 8px;
}

* { box-sizing: border-box; }

html {
    margin: 0;
    padding: 0;
}

body.hxhome_body, body {
    margin: 0;
    padding: 0;
    background: var(--hxh-bg);
    font-family: var(--hxh-font-body);
    color: var(--hxh-text);
    overflow-x: hidden;
}

.hxhome_container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER — l'immagine caricata dall'utente è l'elemento firma
   della pagina: Gon/Kurapika/Leorio/Killua su una mappa color
   seppia. Overlay scuro sfumato verso il basso per far confluire
   l'immagine nel resto della pagina e garantire leggibilità al
   testo sopra.
   ============================================================ */
.hxhome_header {
    position: relative;
    min-height: 280px;
    background-image: url('../../../../imgs/homepage/hero_backdrop.jpg');
    background-size: cover;
    background-position: center 30%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-bottom: 1px solid var(--hxh-border);
}

.hxhome_header_overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11,14,20,0.15) 0%, rgba(11,14,20,0.55) 55%, var(--hxh-bg) 100%),
        linear-gradient(90deg, rgba(11,14,20,0.75) 0%, rgba(11,14,20,0.1) 40%, rgba(11,14,20,0.1) 60%, rgba(11,14,20,0.75) 100%);
}

.hxhome_header_content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px 24px 16px;
    text-align: center;
}

.hxhome_logo {
    font-family: var(--hxh-font-display);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0;
    color: var(--hxh-text);
    text-shadow: 0 2px 18px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.6);
}
.hxhome_logo_x { color: var(--hxh-gold-bright); }

.hxhome_subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hxh-gold-bright);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* ============================================================
   LAYOUT PRINCIPALE — 3 colonne: azioni / login / news
   ============================================================ */
.hxhome_main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: -20px auto 0;
    padding: 0 20px 18px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.15fr 1.3fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .hxhome_main { grid-template-columns: 1fr; }
}

.hxhome_col { display: flex; flex-direction: column; }

.hxhome_card {
    background-color: var(--hxh-surface);
    background-image:
        radial-gradient(circle at 15% 20%, rgba(201,162,39,0.05), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(27,138,90,0.05), transparent 40%);
    border: 1px solid var(--hxh-border);
    border-radius: var(--hxh-radius);
    padding: 18px;
}

.hxhome_card_title {
    font-family: var(--hxh-font-display);
    font-size: 15px;
    color: var(--hxh-gold-bright);
    text-align: center;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hxh-border);
}

/* ---- Azioni ---- */
.hxhome_action_btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hxh-bg-alt);
    border: 1px solid var(--hxh-border);
    border-radius: 6px;
    padding: 11px 14px;
    margin-bottom: 8px;
    color: var(--hxh-text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.hxhome_action_btn:hover {
    border-color: var(--hxh-gold);
    color: var(--hxh-gold-bright);
    transform: translateX(2px);
}
.hxhome_action_icon { font-size: 16px; }

.hxhome_discord_wrap { margin-top: 14px; padding-top: 14px; }
.hxhome_discord_link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #5865F2;
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: filter .15s ease;
}
.hxhome_discord_link:hover { filter: brightness(1.1); }
.hxhome_discord_icon { width: 18px; height: 18px; }

/* ---- Login ---- */
.hxhome_login_card { display: flex; flex-direction: column; }
.hxhome_form { display: flex; flex-direction: column; }
.hxhome_input_group { margin-bottom: 12px; }
.hxhome_label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hxh-text-muted);
    margin-bottom: 5px;
}
.hxhome_input {
    width: 100%;
    font-family: var(--hxh-font-body);
    font-size: 14px;
    color: #ffffff !important;
    background: #14251b !important;
    background-color: #14251b !important;
    border: 1px solid #3d5c47 !important;
    border-radius: 5px;
    padding: 9px 11px;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.hxhome_input:focus { outline: none; border-color: var(--hxh-gold); }
.hxhome_input::placeholder { color: var(--hxh-text-dim); }

/* Chrome/Edge impongono uno sfondo proprio (di solito giallo/bianco
   chiaro) sui campi compilati dall'autofill del browser o dal
   gestore password, ignorando lo sfondo scuro del tema — il testo
   digitato può risultare illeggibile o "invisibile" a seconda dei
   colori. La transizione ritardata è il trucco standard per forzare
   lo sfondo desiderato, dato che Chrome non permette di impostare
   background-color direttamente su questo pseudo-stato. */
.hxhome_input:-webkit-autofill,
.hxhome_input:-webkit-autofill:hover,
.hxhome_input:-webkit-autofill:focus,
.hxhome_input:autofill,
.hxhome_input:autofill:hover,
.hxhome_input:autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #14251b inset !important;
    box-shadow: 0 0 0 1000px #14251b inset !important;
    background-color: #14251b !important;
    border-color: #3d5c47 !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.hxhome_submit {
    margin-top: 6px;
    font-family: var(--hxh-font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, var(--hxh-gold-bright), var(--hxh-gold));
    color: var(--hxh-bg);
    border: none;
    border-radius: 6px;
    padding: 11px;
    transition: filter .15s ease;
}
.hxhome_submit:hover { filter: brightness(1.08); }

.hxhome_login_help { margin-top: 14px; text-align: center; }
.hxhome_forgot_password { color: var(--hxh-ice); font-size: 12px; text-decoration: none; }
.hxhome_forgot_password:hover { text-decoration: underline; }
.hxhome_login_note { font-size: 11px; color: var(--hxh-text-dim); margin: 6px 0 0; }

/* ---- News ---- */
.hxhome_news_content { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }

.hxhome_news_item {
    background: var(--hxh-bg-alt);
    border: 1px solid var(--hxh-border);
    border-radius: 6px;
    padding: 12px 14px;
    position: relative;
}
.hxhome_news_important { border-left: 3px solid var(--hxh-gold); }

.hxhome_important_badge {
    display: inline-block;
    background: var(--hxh-gold);
    color: var(--hxh-bg);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.hxhome_news_header { margin-bottom: 6px; }
.hxhome_news_item_title {
    font-family: var(--hxh-font-display);
    font-size: 13px;
    color: var(--hxh-text);
    margin: 0 0 4px;
}
.hxhome_news_meta { display: flex; gap: 10px; font-size: 10px; color: var(--hxh-text-dim); }
.hxhome_news_text { font-size: 12px; color: var(--hxh-text-muted); line-height: 1.5; }

.hxhome_news_fallback { text-align: center; padding: 10px 4px; }
.hxhome_alpha_badge {
    display: inline-block;
    background: var(--hxh-emerald);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.hxhome_news_fallback p { font-size: 12px; color: var(--hxh-text-muted); line-height: 1.5; }

/* ============================================================
   FOOTER
   ============================================================ */
.hxhome_footer {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: var(--hxh-text-dim);
    border-top: 1px solid var(--hxh-border);
    margin-top: auto;
}
.hxhome_footer_separator { margin: 0 6px; }
.hxhome_footer_link { color: var(--hxh-ice); text-decoration: none; }
.hxhome_footer_link:hover { text-decoration: underline; }

/* Footer moderno — stesso linguaggio visivo del footer di main
   (left_frames.php), tre link centrali invece di uno solo, copyright
   a sinistra invece che impilato sopra. */
.hxhome_footer_moderno {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    text-align: left;
    padding: 12px 20px;
}
.hxhome_footer_sezione { display: flex; align-items: center; gap: 10px; }
.hxhome_footer_centro { flex: 1; justify-content: center; }
.hxhome_footer_copyright { font-size: 10px; opacity: 0.65; font-style: italic; }
@media (max-width: 600px) {
    .hxhome_footer_moderno { flex-direction: column; text-align: center; }
    .hxhome_footer_centro { order: -1; }
}

/* ============================================================
   MANUTENZIONE
   ============================================================ */
.hxhome_maintenance {
    max-width: 480px;
    margin: 60px auto;
    padding: 30px 24px;
    text-align: center;
    background: var(--hxh-surface);
    border: 1px solid var(--hxh-border);
    border-radius: var(--hxh-radius);
}
.hxhome_maintenance_title { font-family: var(--hxh-font-display); color: var(--hxh-gold-bright); font-size: 22px; }
.hxhome_maintenance_countdown p { color: var(--hxh-text-muted); font-size: 14px; }
.hxhome_maintenance_emoji { font-size: 24px; margin: 10px 0 20px; }
.hxhome_maintenance_login { text-align: left; margin-bottom: 20px; }
.hxhome_maintenance_news { text-align: left; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.hxhome_cookie_banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--hxh-surface);
    border-top: 1px solid var(--hxh-border);
    padding: 12px 20px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.hxhome_cookie_banner p { margin: 0; font-size: 12px; color: var(--hxh-text-muted); max-width: 700px; }
.hxhome_cookie_btn {
    font-family: var(--hxh-font-body);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    background: linear-gradient(180deg, var(--hxh-gold-bright), var(--hxh-gold));
    color: var(--hxh-bg);
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    flex-shrink: 0;
}
