/* ==========================================================================
   PlanetPVP — shared theme layer
   Loaded after each page's inline <style>, so it can refine the base look
   without touching the existing page-specific rules.

   1. Tokens (darker ground, green shimmer)
   2. Backdrop
   3. Navigation
   4. Footer
   ========================================================================== */

/* ------------------------------ 1. Tokens ------------------------------- */
:root {
    --main-bg-color:   #080d12;
    --second-bg-color: #16222d;
    --text-color:      #e7eef5;
    --accent-color:    #2fa86a;
    --hover-color:     #37c47e;
    --glow-color:      #7ff0b4;
    --card-bg:         #111b24;
    --shadow:          0 2px 4px rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-hover:    0 4px 8px rgba(0, 0, 0, .25), 0 24px 60px rgba(0, 0, 0, .5);

    /* Additions used by the new nav/footer pieces */
    --line:        rgba(255, 255, 255, .075);
    --line-strong: rgba(255, 255, 255, .14);
    --text-dim:    #a4b3c2;
    --text-mute:   #7c8b9a;
    --accent-soft: #7ff0b4;
    --discord:     #5865f2;
}

/* ----------------------------- 2. Backdrop ------------------------------ */
/* Aurora glow + faint voxel grid behind everything. */
body {
    background-color: var(--main-bg-color);
    background-image: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% -8%,  rgba(47, 208, 125, .13), transparent 62%),
        radial-gradient(760px 480px at 96% 4%,   rgba(88, 101, 242, .10), transparent 60%),
        radial-gradient(900px 700px at 50% 108%, rgba(47, 208, 125, .07), transparent 62%),
        var(--main-bg-color);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
            mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
}

header {
    background-color: rgba(8, 13, 18, .92);
}

section {
    background-color: rgba(17, 27, 36, .82);
    border: 1px solid var(--line);
}

/* ---------------------------- 3. Navigation ----------------------------- */
nav#main-nav {
    background-color: rgba(8, 13, 18, .78);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
            backdrop-filter: blur(14px) saturate(160%);
}

/* The little "opens in a new tab" marker behind Punishments and Shop. */
nav#main-nav a .fa-up-right-from-square {
    font-size: .62em;
    opacity: .45;
    margin-left: 5px;
    vertical-align: baseline;
    transition: opacity .2s;
}

nav#main-nav a:hover .fa-up-right-from-square {
    opacity: .85;
}

/* ------------------------------ 4. Footer ------------------------------- */
footer.site-footer {
    margin-top: 90px;
    padding: 56px 0 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent), rgba(8, 13, 18, .6);
    border-top: 1px solid var(--line);
    box-shadow: none;
    text-align: left;
}

footer.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
}

.footer-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(120px, .6fr) repeat(3, minmax(140px, 1fr));
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--line);
}

.footer-brand img {
    height: 56px;
    margin-bottom: 14px;
}

.footer-col h4 {
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin: 0 0 14px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col a {
    color: var(--text-dim);
    font-size: .93rem;
    text-decoration: none;
    transition: color .2s;
}

.footer-col a:hover {
    color: var(--accent-soft);
}

.footer-bottom {
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-mute);
    font-size: .78rem;
    flex: 1 1 auto;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    color: var(--text-dim);
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.footer-socials a:hover {
    background: var(--accent-color);
    color: #04140b;
    border-color: transparent;
    transform: translateY(-2px);
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 28px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* --------------------------- 5. Guide: hotbar --------------------------- */
/* Cleaner hover treatment for the interactive lobby / HG hotbars. */
.onevsone-hotbar-container {
    position: relative;
    max-width: 900px;
    margin: 30px auto 8px;
    overflow: visible;
}

.onevsone-hotbar-image {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    image-rendering: pixelated;
}

.onevsone-hotbar-click {
    position: absolute;
    top: 0;
    height: 100%;
    width: calc(100% / 9);
    border-radius: 10px;
    cursor: help;
    transition: background .18s, box-shadow .18s, transform .18s;
}

.onevsone-hotbar-click:hover {
    background: rgba(47, 208, 125, .16);
    box-shadow: inset 0 0 0 2px var(--hover-color), 0 0 22px rgba(47, 208, 125, .35);
    transform: translateY(-2px);
    border-radius: 10px;
    top: 0;
    z-index: 3;
    animation: none;
}

.onevsone-tooltip {
    display: block;
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    min-width: 230px;
    max-width: 300px;
    padding: 13px 16px;
    background: rgba(9, 14, 19, .97);
    border: 1px solid rgba(255, 201, 60, .35);
    border-radius: 12px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--text-dim);
    text-shadow: none;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 12;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.onevsone-hotbar-click:hover .onevsone-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.onevsone-tooltip b {
    display: inline-block;
    color: #ffc93c;
    font-size: 1em;
    text-shadow: none;
}

/* ------------------------- 6. Team: skin reveal ------------------------- */
/* The head sits in a framed tile; hovering the whole card grows the tile
   and cross-fades the head into the full skin. */
.minecraft-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: height .3s cubic-bezier(.4, 0, .2, 1);
}

.minecraft-avatar .avatar-img,
.minecraft-avatar .hover-skin {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
    background: none;
    box-shadow: none;
    transition: opacity .25s;
}

.minecraft-avatar .hover-skin {
    position: absolute;
    inset: 0;
    left: 0;
    transform: none;
    padding: 5px;
    opacity: 0;
}

.team-member:hover .minecraft-avatar {
    height: 215px;
}

.team-member:hover .minecraft-avatar .avatar-img {
    opacity: 0;
}

.team-member:hover .minecraft-avatar .hover-skin {
    opacity: 1;
}

/* --------------------- 7. Team: application note ------------------------ */
.apply-note {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 0 0 4rem;
    padding: 2rem;
    background: linear-gradient(165deg, rgba(88, 101, 242, .10), rgba(17, 27, 36, .85));
    border: 1px solid rgba(88, 101, 242, .32);
    border-radius: 3px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .8s ease, transform .8s ease;
}

.apply-note.visible {
    opacity: 1;
    transform: translateY(0);
}

.apply-note-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--discord);
    color: #fff;
    font-size: 1.25rem;
}

.apply-note-body h4 {
    margin: 2px 0 8px;
    color: #fff;
    font-size: 1.05rem;
}

.apply-note-body p {
    margin: 0 0 16px;
    color: var(--text-dim);
    font-size: .95rem;
    line-height: 1.6;
}

.apply-note-channel {
    font-family: 'Consolas', ui-monospace, monospace;
    font-size: .9em;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line-strong);
    color: var(--text-color);
    white-space: nowrap;
}

.apply-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border-radius: 6px;
    background: var(--discord);
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(88, 101, 242, .35);
    transition: transform .2s, filter .2s, box-shadow .2s;
}

.apply-note-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 10px 26px rgba(88, 101, 242, .5);
}

@media (max-width: 640px) {
    .apply-note {
        flex-direction: column;
        gap: 14px;
    }
}

/* --------------------- 8. Smooth scrolling & sidebar -------------------- */
/* Anchor jumps (guide sidebar, footer links) glide instead of teleporting. */
html {
    scroll-behavior: smooth;
}

/* The guide sidebar is a <nav>, so it inherited the grey top-bar background. */
nav.sidebar-nav {
    background-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    position: static;
    padding: 0;
    justify-content: flex-start;
}

.sidebar-btn {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line-strong);
    color: var(--text-dim);
    border-radius: 8px;
}

.sidebar-btn:hover,
.sidebar-btn:focus {
    background: var(--accent-color);
    border-color: var(--hover-color);
    color: #04140b;
}

/* --------------------------- 9. Back to top ----------------------------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(17, 27, 36, .92);
    border: 1px solid var(--line-strong);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s, background .2s, color .2s, border-color .2s;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
}

.to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.to-top:hover {
    background: var(--accent-color);
    color: #04140b;
    border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
