
/* Main content row, below the banner and menu */
.main-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    max-width: 1400px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

/* All content panels */
.content-box {
    flex: 1;
    min-width: 0;
    min-height: 450px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

/* Main, wider panel */
.content-box.large {
    flex: 2;
}

/* Panel headings */
.content-box h2 {
    margin-top: 0;
    color: #ffffff;
}

/* Links */
.content-box a {
    display: block;
    max-width: 100%;
    color: #8fa7ff;
    transition: color 0.2s ease;
}

.content-box a:hover {
    color: #ffffff;
}

/* Discord button container */
.discord-container {
    display: flex;
    justify-content: center;
    margin: 24px 0 10px;
}

/* Discord join button */
.content-box .discord-container .discord-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: max-content;
    flex: 0 0 auto;
    padding: 12px 28px;
    background-color: #5865F2;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.content-box .discord-container .discord-button:hover {
    background-color: #4752C4;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
}

.content-box .discord-container .discord-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* Images inside panels */
.content-box img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Box hover effect */
.content-box:hover {
    transform: translateY(-10px);
    border-color: rgba(50, 62, 168, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.75);
}

/* Standard horizontal divider */
hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.65);
}

/* Blue divider with gradient fading upward */
hr.glow-divider {
    position: relative;
    border: none;
    height: 1px;
    background: #323ea8;
}

hr.glow-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(
        to top,
        rgba(50, 62, 168, 0.35),
        transparent
    );
    pointer-events: none;
}

/* Stack panels on smaller screens */
@media (max-width: 800px) {
    .main-content {
        flex-direction: column;
    }

    .content-box,
    .content-box.large {
        flex: auto;
        width: 100%;
        min-height: 220px;
    }
}

/* Mobile layout */
@media (max-width: 600px) {
    .main-content {
        margin-top: 35px;
        padding: 0 12px;
    }

    .content-box {
        min-height: 220px;
        padding: 18px;
    }

    .content-box:hover {
        transform: translateY(-4px);
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .content-box,
    .content-box a,
    .discord-button {
        transition: none;
    }

    .content-box:hover,
    .content-box .discord-container .discord-button:hover {
        transform: none;
    }
}

/* Blue gradient frame around selected images */
.image-frame {
    display: inline-block;
    padding: 3px;
    border-radius: 9px;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #323ea8 35%,
        #6b8cff 65%,
        #323ea8 100%
    );
    box-shadow: 0 0 12px rgba(50, 62, 168, 0.45);
    max-width: 100%;
    box-sizing: border-box;
}

/* Remove the default gap around the page */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    padding-top: 0px;
    box-sizing: border-box;
}

/* Make the top section reach both screen edges */
.top-section {
    width: 100%;
    margin: 0;
    padding: 6px;
    box-sizing: border-box;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.40) 0%,
        rgba(50, 62, 168, 0.40) 25%,
        rgba(107, 140, 255, 0.40) 50%,
        rgba(50, 62, 168, 0.40) 75%,
        rgba(255, 255, 255, 0.40) 100%
    );
    box-shadow: 0 0 18px rgba(50, 62, 168, 0.4);
}

/* Keep navigation fixed at the top while scrolling */
.site-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2000;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 18px 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        #323ea8 25%,
        #6b8cff 50%,
        #323ea8 75%,
        #ffffff 100%
    );
}

/* Navigation links and dropdown button */
.site-navigation a,
.dropdown-button {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 1.2s ease;
}

/* Navigation links transition from white to black */
.site-navigation > a:hover,
.site-navigation > a:focus-visible {
    color: #000000;
}

/* Keyboard navigation outline */
.site-navigation a:focus-visible,
.dropdown-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* Dropdown positioning */
.dropdown {
    position: relative;
}

/* Server Information button */
.dropdown-button {
    padding: 0;
}

/* Keep Server Information black while the dropdown is active */
.dropdown:hover > .dropdown-button,
.dropdown:focus-within > .dropdown-button {
    color: #000000;
}

/* Hide dropdown links by default */
.site-navigation .dropdown > .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 190px;
    margin: 0;
    padding: 8px 0;
    background: rgba(15, 20, 55, 0.70);
    border: 1px solid #323ea8;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

/* Invisible bridge between button and dropdown menu */
.site-navigation .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

/* Show dropdown only when hovered or keyboard-focused */
.site-navigation .dropdown:hover > .dropdown-menu,
.site-navigation .dropdown:focus-within > .dropdown-menu {
    display: block;
}

/* Dropdown links */
.site-navigation .dropdown-menu a {
    display: block;
    padding: 12px 18px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: color 1.2s ease, background-color 0.2s ease;
}

/* Dropdown links transition to black on hover */
.site-navigation .dropdown-menu a:hover,
.site-navigation .dropdown-menu a:focus-visible {
    color: #000000;
    background: #8fa7ff;
}

/* Fixed background image with mouse-controlled movement */
#parallax-background {
    position: fixed;
    top: -15px;
    left: -15px;
    width: calc(100% + 30px);
    height: calc(100% + 30px);
    background-image: url("/images/site_bg_01.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: translate(0, 0);
    pointer-events: none;
    z-index: -1;
}

/* Header containing the logo, audio player, and navigation */
#top-section {
    position: sticky;
    top: 0;
    z-index: 2000;
    transition: padding 0.3s ease;
}

/* Logo and audio controls */
.brand-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0 12px;
    transition: padding 0.3s ease, gap 0.3s ease;
}

.brand-media img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: max-height 0.3s ease;
}

.brand-media audio {
    width: 300px;
    max-width: 90%;
    transition: width 0.3s ease;
}

/* Compact header after scrolling */
#top-section.scrolled .brand-media {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    padding: 4px 0;
}

#top-section.scrolled .brand-media img {
    max-height: 45px;
}

#top-section.scrolled .brand-media audio {
    width: 220px;
}

/* Keep navigation visible and usable */
#top-section .site-navigation {
    position: relative;
    top: auto;
}

/* Perfection35 server status box */
#wurm-server-status {
    border: 2px solid rgba(107, 140, 255, 0.8);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 15px auto;
    max-width: 450px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 12px rgba(107, 140, 255, 0.25);
    text-align: left;
}

#wurm-server-status p {
    margin: 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#wurm-server-status p:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#wurm-state.status-online {
    color: #00ff00;
    font-weight: bold;
}

#wurm-state.status-offline {
    color: #ff3333;
    font-weight: bold;
}

#wurm-lore-preview #wurm-lore-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

#wurm-lore-preview .wurm-lore-emoji {
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    object-fit: contain;
    vertical-align: -0.25em;
}
