/* Global Styles */
:root {
    --primary-color: #d4af37;
    /* Metallic Gold - User Preference */
    --secondary-color: #4b5320;
    /* Olive Drab - Swapped */
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #ffffff;
    --dark-grey: #1a1a1a;
    --light-grey: #e5e5e5;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Rank Accordion */
.rank-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition);
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background: var(--white);
    transition: background 0.3s ease;
}

.rank-header:hover {
    background: #f9f9f9;
}

.rank-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-color);
    flex-grow: 1;
}

.rank-time {
    font-size: 0.9rem;
    color: var(--dark-grey);
    background: rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 20px;
    margin-right: 15px;
    white-space: nowrap;
}

.rank-toggle {
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.rank-item.active .rank-toggle {
    transform: rotate(180deg);
}

.rank-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.rank-item.active .rank-content {
    max-height: 500px;
    /* Arbitrary large height for expansion */
}

.rank-detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
}

.rank-detail strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.rank-detail p {
    font-size: 0.95rem;
    color: #444;
}

@media (max-width: 768px) {
    .rank-detail-grid {
        grid-template-columns: 1fr;
    }

    .rank-time {
        display: none;
        /* Hide time on very small screens if needed, or adjust layout */
    }
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #303514;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark-grey);
}

.btn-login {
    background-color: #5865F2;
    /* Discord Color */
    color: white;
    border-radius: 4px;
    margin-left: 20px;
}

.btn-login:hover {
    background-color: #4752c4;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 900;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.text-white {
    color: var(--white);
}

.bg-light {
    background-color: var(--white);
}

.bg-dark {
    background-color: var(--dark-grey);
}

.bg-dark .section-title::after {
    background-color: var(--white);
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.8s ease, padding 0.8s ease;
}

.header.scrolled {
    background-color: #333;
    /* Dark Grey Background when scrolled */
    padding: 0;
    /* Shrink header slightly */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    transition: height 0.8s ease;
}

.header.scrolled .header-content {
    height: 80px;
    /* Smaller header height */
}

.branding {
    flex-shrink: 0;
    margin-right: 40px;
    /* Ensure spacing from menu */
    display: flex;
    /* Fix for alignment */
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    /* For Pseudo-elements */
    transition: color 0.3s ease;
}

/* Header Glitch on Scroll (Simplified Text-Shadow) */
.header.scrolled .header-title-text {
    color: var(--white);
    position: relative;
    animation: glitch-shadow-text 2s infinite;
}

/* Remove problematic clipping pseudos */
.header.scrolled .header-title-text::before,
.header.scrolled .header-title-text::after {
    content: none;
    display: none;
}

@keyframes glitch-shadow-text {
    0% {
        text-shadow: 2px 0 #ff00c1, -2px 0 #00fff9;
    }

    5% {
        text-shadow: 2px 0 #ff00c1, -2px 0 #00fff9;
    }

    6% {
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
    }

    10% {
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
    }

    11% {
        text-shadow: 0 0 transparent;
    }

    50% {
        text-shadow: 0 0 transparent;
    }

    55% {
        text-shadow: 1px 0 #ff00c1, -1px 0 #00fff9;
    }

    56% {
        text-shadow: 0 0 transparent;
    }

    100% {
        text-shadow: 0 0 transparent;
    }
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
    max-width: 200px;
    opacity: 1;
    margin-right: 15px;

    /* Default Transition (Scroll UP / Restore) */
    /* 1. Width expands/Margin restores effectively immediately or smoothly */
    /* 2. Opacity fades in AFTER width is done */
    transition: max-width 0.5s ease-out, margin-right 0.5s ease-out, opacity 0.4s ease-in 0.4s;
}

/* Hide Logo on Scroll */
.header.scrolled .logo-img {
    max-width: 0;
    opacity: 0;
    margin-right: 0;
    padding: 0;
    overflow: hidden;

    /* Scrolled Transition (Scroll DOWN) */
    /* 1. Opacity fades out first */
    /* 2. Width/Margin collapses AFTER opacity is gone */
    transition: opacity 0.3s ease-out, max-width 0.5s ease-in 0.3s, margin-right 0.5s ease-in 0.3s;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.header-title-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 1px;

    /* Default Transition */
    transition: font-size 0.5s ease, color 0.5s ease;
}

/* Enlarge Text and Change Color on Scroll */
.header.scrolled .header-title-text {
    font-size: 2.2rem;
    /* Larger Text */
    color: var(--white);
    /* White text on dark bg */
}

.header.scrolled .nav-link {
    color: #ddd;
    /* Lighter nav links on dark bg */
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--primary-color);
}

.header.scrolled .mobile-menu-btn {
    color: var(--white);
}

.footer-logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
    display: inline-block;
    mix-blend-mode: multiply;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
    z-index: 2;
    /* Ensure nav is clickable */
}

.nav-list {
    display: flex;
    gap: 25px;
}


.nav-link {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    color: var(--dark-grey);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.discord-link {
    color: #5865F2;
}

.discord-link:hover {
    color: #4752c4;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-grey);
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero {
    height: 90vh;
    /* Increased height to accommodate widget */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    /* Restore Row Layout */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.hero-text-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    text-align: left;
    flex: 1;
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    /* Buttons side-by-side */
    gap: 20px;
}

.hero-text-block {
    max-width: 600px;
}

.hero-widget {
    flex-shrink: 0;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 600px;
}

/* About Us - Feature Grid */
#ueber-uns {
    background-color: #111;
    /* Dark background like reference */
    color: var(--white);
    padding: 80px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns as requested */
    gap: 40px;
    margin-top: 50px;
}

.feature-item {
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease;
    /* Optional: subtle background for cards */
    /* background: rgba(255, 255, 255, 0.03); */
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
}

/* Icon Animation - Continuous Pulse/Float */
.feature-item:hover .feature-icon,
.feature-icon {
    animation: iconFloat 3s ease-in-out infinite;
}

.feature-item h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.feature-item p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Requirements Grid 3x3 Style */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.req-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.req-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.req-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

/* Rotation Animation on Hover */
.req-item:hover .req-icon {
    background: var(--primary-color);
    color: #111;
    border-color: var(--primary-color);
    transform: rotateY(360deg);
    /* 3D Rotation */
}

.req-content h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
}

.req-content p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* About Story Box */
.about-story {
    max-width: 900px;
    margin: 40px auto 60px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.about-story p {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.about-story .story-intro {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.about-story .highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.card-image h3 {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-content {
    padding: 25px;
}

/* About Section */
.about-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-list {
    margin-top: 30px;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.feature-list i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.2rem;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: #aaa;
}

/* Slider */
.slider-wrapper {
    position: relative;
    padding: 0 50px;
    /* Space for buttons */
}

.unit-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 30px;
    padding-bottom: 20px;
    /* Space for scrollbar (if visible) */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar */
.unit-slider::-webkit-scrollbar {
    display: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: 1px solid var(--secondary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--secondary-color);
    color: var(--dark-grey);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}


/* Unit Cards in Slider */
/* Unit Cards in Slider */
/* Unit Cards in Slider */
.unit-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    /* Fixed width for slider items */
    flex: 0 0 300px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #ffcc00;
}

.unit-card h3 {
    margin: 15px 0 10px;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 800;
    /* Bold sans-serif */
    font-family: inherit;
    /* Use site default sans-serif */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unit-short {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 15px;
}

.unit-icon {
    font-size: 3rem;
    color: #a8b2bd;
    margin-bottom: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.unit-icon img {
    height: 140px;
    /* Reset height */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.unit-card:hover .unit-icon img {
    transform: scale(1.1) rotate(5deg);
}

.unit-card h3 {
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.unit-short {
    font-size: 0.95rem;
    color: #ccc;
}

@media (max-width: 768px) {
    .unit-card {
        flex-direction: column-reverse;
        text-align: center;
        flex: 0 0 300px;
        min-width: 300px;
    }

    .unit-icon {
        margin-bottom: 20px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--dark-grey);
    color: var(--white);
    margin: 10% auto;
    padding: 40px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
}

#modal-body-content h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

#modal-body-content h5 {
    color: var(--white);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

#modal-body-content p {
    margin-bottom: 10px;
}

#modal-body-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

#modal-body-content li {
    margin-bottom: 5px;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    /* Forced fixed position */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}


/* Server Section */
/* Server Section */
#server {
    position: relative;
    padding-top: 120px;
    /* Extra padding for fixed header */
}

/* Background Wireframe Globe Canvas INSIDE Card */
.card-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Layer 1: Above Background */
    pointer-events: none;
    opacity: 0.6;
    /* Increased visibility */
    border-radius: 8px;
    /* Match card border radius */
}

/* Server Section Wide Layout */
#server .container {
    max-width: 95%;
    /* Widen container mainly for the slider */
}

.server-grid {
    position: relative;
    z-index: 5;
    /* Ensure above section bg if any */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    justify-content: center;
    flex: 1;
    min-width: 300px;
    max-width: none;
    /* Changed from 650px to allow full width */
}

.server-info-box {
    /* Darker background for readability against light page bg */
    background: linear-gradient(-45deg, rgba(0, 0, 0, 0.85), rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.85), rgba(30, 30, 30, 0.9));
    background-size: 400% 400%;
    animation: liquidBackground 15s ease infinite;
    border: 1px solid var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

@keyframes liquidBackground {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.server-info-box h3 {
    color: var(--white);
    /* Black text */
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: none;
    animation: textBlinkRed 2s infinite;
    /* Red blinking title */
}

.server-info-box p {
    color: #fff;
    /* White text for contrast */
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 500;
}

.server-info-box p:last-child {
    margin-bottom: 0;
    font-weight: 700;
}

/* Fog Animation */
.fog-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background-color: #666666;
    /* Darker Grey as requested */
}

.fog-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png') repeat-x;
    background-size: contain;
    opacity: 0.8;
}

.fog-layer-1 {
    animation: fogMove 60s linear infinite;
    z-index: 1;
}

.fog-layer-2 {
    background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png') repeat-x;
    background-size: contain;
    animation: fogMove 40s linear infinite reverse;
    z-index: 2;
    opacity: 0.3;
}

@keyframes fogMove {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Glassmorphism & CMD Card Style - Refactored Stacking */
.server-item {
    width: 100%;
    max-width: 650px;
    /* Slightly wider */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 50px 30px;
    /* More vertical padding inside card */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.3);
    background: transparent;
    /* IMPORTANT: Transparent so we see pseudos */
    isolation: isolate;
    /* Create new stacking context */
}

/* 1. Background Layer (The Dark Card) */
.server-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #080808;
    /* Very dark mostly opaque background */
    z-index: 0;
    /* Layer 0: Bottom */
}

/* 2. Coding Animation Layer (Visible Text) REMOVED - using global background now */
.matrix-canvas {
    display: none;
}

/* 3. Content Layer */
.server-title,
.iframe-container,
.status-pulse {
    position: relative;
    z-index: 2;
    /* Layer 2: Top */
}

/* Hover Interaction */
.server-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #0f0;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.15);
}

.server-item:hover::after {
    opacity: 0.3;
    /* Brighter on hover */
}

.server-title {
    color: var(--white);
    margin-bottom: 35px;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

/* Pulsing Status Indicator */
.status-pulse {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #2ea44f;
    /* Reverted to Green */
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(46, 164, 79, 0.8);
    animation: pulse 1.5s infinite;
}

.status-pulse.offline {
    background-color: #ff0700;
    box-shadow: 0 0 5px rgba(255, 7, 0, 0.8);
}

.iframe-container {
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
}

.server-item:hover .iframe-container {
    border-color: #0f0;
}

/* Unit Modal Layout */
.modal-body-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    /* Vertically center */
    justify-content: space-between;
}

.modal-text {
    flex: 1;
    text-align: left;
}

.modal-image {
    flex: 0 0 320px;
    /* Fixed width container for the large image */
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image img {
    width: 100%;
    /* Fill container */
    max-width: 320px;
    /* Significant size increase */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    /* Enhanced glow */
}

@media (max-width: 768px) {
    .modal-body-grid {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .modal-image img {
        max-width: 100px;
        margin-bottom: 20px;
    }
}

/* --- Advanced Visual Effects --- */

/* 1. Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Glitch Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    color: var(--white);
    font-size: 4rem;
    /* Adjust as needed */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* No background to blend */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip-path: inset(54% 0 4% 0);
    animation: glitch-anim-2 3.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {

    0%,
    80% {
        clip-path: inset(50% 0 50% 0);
    }

    85% {
        clip-path: inset(20% 0 80% 0);
    }

    90% {
        clip-path: inset(60% 0 10% 0);
    }

    95% {
        clip-path: inset(40% 0 50% 0);
    }

    100% {
        clip-path: inset(80% 0 5% 0);
    }
}

@keyframes glitch-anim-2 {

    0%,
    80% {
        clip-path: inset(50% 0 50% 0);
    }

    85% {
        clip-path: inset(10% 0 65% 0);
    }

    90% {
        clip-path: inset(80% 0 5% 0);
    }

    95% {
        clip-path: inset(30% 0 50% 0);
    }

    100% {
        clip-path: inset(60% 0 25% 0);
    }
}

/* 4. Canvas Particles */
#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* Behind content info but over background */
    pointer-events: none;
    /* Let clicks pass through */
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    margin-left: 5px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* 3D Card Hover Base */
.unit-card,
.server-item {
    transition: transform 0.1s ease-out;
    /* Snap back is handled by JS on leave */
    transform-style: preserve-3d;
    perspective: 1000px;
}

@keyframes scrollText {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50%);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 164, 79, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(46, 164, 79, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 164, 79, 0);
    }
}

@keyframes textBlinkRed {

    0%,
    100% {
        color: #fff;
        text-shadow: none;
    }

    50% {
        color: #ff0000;
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
}



/* Unit Tabs */
.unit-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    /* Reduced from 40px */
}

.unit-tab-btn {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--white);
    padding: 10px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
    transition: var(--transition);
}

.unit-tab-btn:hover,
.unit-tab-btn.active {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.slider-wrapper {
    display: none;
    /* Hidden by default */
}

.slider-wrapper.active-slider {
    display: flex;
    /* Show when active */
    padding: 100px 100px 80px 100px;
    /* Final increase: Top 100px represents original gap but is needed for shadows. Sides 100px. */
    overflow-x: auto;
    /* Enable scrolling */
    overflow-y: hidden;
    /* Must hide V-scroll for H-scroll to work */
    align-items: center;
    scroll-behavior: smooth;
    /* Hide scrollbar standard */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-wrapper.active-slider::-webkit-scrollbar {
    display: none;
}

/* Ensure Parent Container doesn't clip */
.units-slider-container {
    overflow: visible !important;
    padding: 20px 0;
}


/* Rank Selectors */
.rank-selectors {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.rank-selector-btn {
    background: var(--white);
    border: none;
    padding: 20px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-transform: uppercase;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
}

.rank-selector-btn:hover {
    transform: translateY(-3px);
}

.rank-selector-btn.active {
    border-bottom: 4px solid var(--secondary-color);
}

.rank-category-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background-color: #f0f0f0;
    /* Changed from dark #111 to light for black text visibility */
    color: #333;
    padding-top: 60px;
    border-top: 4px solid var(--secondary-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    /* Added column for partners */
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #ccc;
    align-items: start;
}

.footer h4 {
    color: #000;
    /* Requested black */
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 800;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #333;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: #000;
    /* Requested black */
    transition: transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #555;
}

/* Responsive */
@media (max-width: 1200px) {
    .branding-center {
        position: static;
        transform: none;
        width: auto;
        margin: 0 20px;
        max-width: none;
    }

    .header-content {
        justify-content: space-between;
    }

    .site-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .hero {
        height: auto;
        padding: 120px 0 100px 0;
        /* Increase top padding to clear fixed header */
    }

    /* Allow height to grow */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .header-content {
        height: auto;
        min-height: 70px;
        /* Ensure minimum height */
        padding: 10px 15px;
        /* Reduced side padding to give more space to text */
        /* Switch to Grid for stability during resizing */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0;
    }

    .branding {
        justify-self: start;
        min-width: 0;
        /* Allow flex/grid shrinking */
        /* Ensure text doesn't overflow grid cell */
        overflow: hidden;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
        margin: 0;
        justify-self: center;
        z-index: 20;
        /* Ensure strictly above other elements */
        position: relative;
    }

    /* Check brace */

    .header-right {
        justify-self: end;
        gap: 0;
    }



    .glitch {
        font-size: 2.2rem;
    }

    .hero-widget {
        margin-top: 40px;
        width: 100%;
        /* Ensure widget container takes full width */
    }

    .hero-widget iframe {
        max-width: 100%;
        /* Prevent iframe overflow */
    }

    /* Fix Unit Slider on Mobile (Remove huge padding) */
    .slider-wrapper.active-slider {
        padding: 20px 10px 40px 10px;
        /* Minimal padding to maximize space */
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        display: none;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    /* Force dark text on mobile menu even when header is scrolled */
    .header.scrolled .nav-link {
        color: var(--dark-grey);
    }

    /* Old flex rules removed for grid stability */

    /* Branding rule moved up to grid section */

    /* Header Right rule moved up to grid section */

    /* Hide text on very small screens to fit login button */
    @media (max-width: 500px) {
        .header-title-text {
            /* Changed from display: none to allow transition */
            display: inline-block;
            max-width: 0;
            opacity: 0;
            overflow: hidden;
            white-space: nowrap;
            transition: max-width 0.4s ease-out 0.3s, opacity 0.4s ease-in 0.3s;
            /* Delay appearance */
        }

        /* SHOW text when scrolled on mobile */
        .header.scrolled .header-title-text {
            max-width: 160px;
            /* Increased to fit "PZGRENBTL24" */
            /* Expand to shown width */
            opacity: 1;
            font-size: 1rem;
            /* Reduced to ensure it fits */
            color: var(--white);
            margin-right: auto;
        }
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .ranks-container {
        flex-direction: column;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile/tablet */
    }

    /* Mobile Rank Selectors */
    .rank-selectors {
        flex-wrap: wrap;
        /* Allow wrapping */
        gap: 15px;
        margin-bottom: 30px;
    }

    .rank-selector-btn {
        padding: 15px 20px;
        /* Smaller padding */
        font-size: 1rem;
        /* Smaller font */
        flex: 1 1 auto;
        /* Allow buttons to size flexibly */
        min-width: 200px;
        /* Prevent being too thin */
    }
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #111;
    /* Dark border bg */
    z-index: 10001;
    /* Higher than news box (9999) */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    padding: 20px;
    /* Space for rounded corners effect */
}

#intro-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 40px);
    /* Inset for border */
    height: calc(100vh - 40px);
    /* Inset for border */
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    border-radius: 60px;
    /* Rounded corners */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures consistent coverage */
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 60px;
}

.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content vertically */
    height: 100vh;
    padding-bottom: 0;
    /* Remove bottom padding */
    width: 100%;
    gap: 40px;
    /* Space between logo and button */
}

/* Logo removed styled */
.intro-logo-small {
    width: 300px;
    /* Much larger logo */
    height: auto;
    margin-bottom: 0;
    max-width: 80vw;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
    animation: fadeInDown 1s ease-out 4s backwards;
    /* Synced with button */
}

#enter-btn {
    font-size: 1.5rem;
    padding: 15px 40px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 4s backwards;
    /* Synced with logo */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

#enter-btn:hover {
    background: var(--primary-color);
    color: var(--dark-grey);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Server Section Polish */
.server-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    /* Stretch items to same height */
    gap: 40px;
    margin-top: 40px;
    height: 480px;
    /* Force fixed height for uniformity */
}

/* Info Box */
.server-info-box {
    flex: 0 0 400px;
    /* Fixed width for info box */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    /* Fill container */
    max-width: none;
    /* Override previous max-width */
}

/* Slider Container */
.server-slider-container {
    flex: 1;
    /* Take remaining space */
    min-width: 0;
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Fill container */
    display: flex;
    align-items: center;
    /* Center slider vertically if needed */
    padding: 0 60px;
    /* Space for buttons */
}

.server-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 0;
    /* Remove padding to fit height exactly */
    /* REMOVED scroll-behavior: smooth to allow instant loop reset */
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: 100%;
    /* Fill container */
    align-items: stretch;
    /* Stretch cards to full height */
    cursor: grab;
    /* Cursor indicates draggable */
}

.server-slider.active {
    cursor: grabbing;
    /* Cursor while dragging */
    cursor: -webkit-grabbing;
}

.server-slider::-webkit-scrollbar {
    display: none;
}

.server-slider .server-item {
    flex: 0 0 520px;
    max-width: 520px;
    height: 100%;
    /* Fill slider height */
    background: rgba(0, 0, 0, 0.6);
    /* Darker background for polish */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* Flex content centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.server-slider .server-content {
    /* Ensure content is centered */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.unit-icon {
    font-size: 3rem;
    color: #a8b2bd;
    margin-bottom: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    /* Darker button bg */
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
    /* Semi-transparent by default */
}

.slider-nav-btn:hover {
    background: var(--primary-color);
    color: var(--dark-grey);
    box-shadow: 0 0 15px var(--primary-color);
    opacity: 1;
}

.slider-nav-btn.prev {
    left: 10px;
    /* Inside padding area */
}

.slider-nav-btn.next {
    right: 10px;
    /* Inside padding area */
}

/* Manual News Box */
.hero-news-box.manual-news {
    /* .unit-card flex styles removed */
    position: fixed;
    /* Fixed to viewport */
    bottom: 20px;
    right: 20px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    padding: 20px;
    width: 350px;
    /* Fixed Width */
    max-width: 90vw;
    backdrop-filter: blur(10px);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
    /* Always on top */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    /* Flex to manage header/content */
    flex-direction: column;
    max-height: 380px;
    /* Constraint to keep it square-ish */
}

.hero-news-box.manual-news:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border-color: var(--primary-color);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    flex-shrink: 0;
    /* Keep header static */
    /* Keep header static */
    background: transparent;
    /* Ensure header covers scroll */
    z-index: 2;
}

@media (max-width: 768px) {
    .hero-news-box.manual-news {
        width: auto;
        max-width: calc(100vw - 30px);
        /* Fit screen with margin */
        right: 15px;
        bottom: 15px;
        padding: 15px;
    }

    .news-content {
        height: 200px;
        /* Reduced height on mobile */
    }
}

/* Minimized State (Radio Signal Mode) */
.hero-news-box.manual-news.minimized {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
    /* Circular */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    /* Hide overflowing bits */
    background: rgba(10, 10, 10, 0.95);
    border-left: 2px solid var(--primary-color);
}

.hero-news-box.manual-news.minimized .news-content,
.hero-news-box.manual-news.minimized .news-close,
.hero-news-box.manual-news.minimized .news-header i.fa-discord {
    display: none !important;
}

.hero-news-box.manual-news.minimized .news-header {
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-news-box.manual-news.minimized .news-header>span {
    font-size: 0;
    /* Hide "FUNKKREIS" text */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-news-box.manual-news.minimized .audio-wave {
    margin: 0;
    /* Center it */
    transform: scale(1.2);
}

.news-close {
    color: #666;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.news-close:hover {
    color: #fff;
}

/* Scroll Container */
.news-content {
    position: relative;
    height: 270px;
    /* reduced height to match square aspect */
    overflow: hidden;
    /* Hide scrollbars, let animation handle it */
}

/* Moving Track */
.news-scroll-track {
    width: 100%;
    animation: scrollNews 88s linear infinite;
    /* Slow smooth scroll */
}

@keyframes scrollNews {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
        /* Move up by half the height (original content) */
    }
}

.news-item {
    margin-bottom: 20px;
    color: #fff;
    /* Improved Readability */
    font-size: 0.95rem;
    line-height: 1.5;
}

.news-text {
    color: #fff;
    /* Brighter text */
    font-size: 1rem;
    line-height: 1.4;
}

.news-footer {
    margin-top: 15px;
    text-align: right;
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-link:hover {
    text-decoration: underline;
}

/* Audio Wave Animation */
.audio-wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 12px;
    margin-left: 10px;
    vertical-align: middle;
}

.audio-wave span {
    display: block;
    width: 3px;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 1px;
    animation: audioWaveAnim 1.2s infinite ease-in-out;
}

.audio-wave span:nth-child(1) {
    animation-delay: 0.0s;
    height: 60%;
}

.audio-wave span:nth-child(2) {
    animation-delay: 0.2s;
    height: 100%;
}

.audio-wave span:nth-child(3) {
    animation-delay: 0.4s;
    height: 50%;
}

.audio-wave span:nth-child(4) {
    animation-delay: 0.1s;
    height: 80%;
}

.audio-wave span:nth-child(5) {
    animation-delay: 0.3s;
    height: 40%;
}

@keyframes audioWaveAnim {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-direction: row;
    /* Explicitly row */
    align-items: center;
    /* Align items vertically */
    gap: 60px;
    /* Increased gap */
    margin-top: 50px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 3rem;
    /* Larger icon */
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    width: 80px;
    /* Larger icon container */
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 204, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
    /* Add glow */
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3.5rem;
    /* Much larger number */
    font-weight: 900;
    line-height: 1;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 1.1rem;
    /* Larger label */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

@media (max-width: 768px) {
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 30px;
        flex-direction: column;
        /* Stack on mobile only */
    }
}

/* Discord Message Styling */
.news-author-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.news-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.news-author-info {
    display: flex;
    flex-direction: column;
}

.news-author-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.news-timestamp {
    color: #949BA4;
    font-size: 0.75rem;
}

.discord-mention {
    background-color: rgba(88, 101, 242, 0.3);
    color: #C9CDFB;
    padding: 0 4px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.discord-mention:hover {
    background-color: rgba(88, 101, 242, 0.6);
    color: #fff;
}

.discord-reactions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.discord-reaction {
    background-color: #2f3136;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #b9bbbe;
    cursor: pointer;
    transition: all 0.2s;
}

.discord-reaction:hover {
    border-color: #5865F2;
    background-color: rgba(88, 101, 242, 0.1);
}

.discord-reaction img {
    width: 16px;
    height: 16px;
}

.discord-reaction-count {
    font-weight: 600;
}

/* Server Page Mobile Fixes */
@media (max-width: 992px) {
    .server-layout {
        flex-direction: column;
        height: auto !important;
        /* Override fixed height */
        margin-top: 20px;
        padding-bottom: 60px;
        /* Ensure space before footer */
        overflow: visible;
        /* Allow content to push container */
    }

    .server-info-box {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 30px;
    }

    .server-slider-container {
        width: 100%;
        padding: 0 15px;
        /* DRASTICALLY Reduced padding to give more room for card */
        min-height: 400px;
        /* Ensure space for cards */
        flex: 0 0 auto;
        height: auto;
    }


    .server-slider .server-item {
        flex: 0 0 100%;
        /* Full width cards */
        max-width: 100%;
        height: 350px;
        /* Adjust height for mobile */
    }

    .server-content {
        padding: 0 10px;
    }

    .server-title {
        display: flex;
        flex-direction: column;
        /* Stack vertically to save width */
        align-items: center;
        gap: 5px;
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
    }

    .server-title h3 {
        font-size: 1.1rem;
        /* Smaller font */
        white-space: normal;
        /* Force wrap */
        margin-left: 0 !important;
        text-align: center;
        width: 100%;
        line-height: 1.4;
        word-wrap: break-word;
        /* legacy support */
        overflow-wrap: break-word;
        /* modern support */
    }
}

/* Specific fix for iframe cutoff on small screens */
@media (max-width: 550px) {
    .iframe-container {
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

    .iframe-container iframe {
        width: 500px !important;
        /* Force full widget width */
        max-width: none !important;
        /* Override constraint */
        transform: scale(0.65);
        /* Scale down to fit mobile (500 * 0.65 = 325px) */
        transform-origin: center center;
        margin: -10px 0;
        /* Compensate for blank space from scaling */
    }
}

/* CSS Medal Animation */
.medal-wrapper {
    float: right;
    margin-left: 30px;
    margin-bottom: 15px;
    width: 150px;
    /* Increased width */
    height: 200px;
    /* Increased height */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    animation: floatMedal 4s ease-in-out infinite;
    transform: scale(1.3);
    /* Make it 30% bigger */
    transform-origin: top center;
}

.medal-container {
    position: relative;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.medal-ribbon {
    width: 60px;
    height: 60px;
    background: #333;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
    display: flex;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.ribbon-stripe {
    height: 100%;
}

.ribbon-stripe.left {
    width: 30%;
    background: #000;
}

.ribbon-stripe.center {
    width: 40%;
    background: #D32F2F;
    /* Red */
}

.ribbon-stripe.right {
    width: 30%;
    background: #FFC107;
    /* Gold/Yellow base */
}

.medal-coin {
    width: 80px;
    /* Bigger coin */
    height: 80px;
    background: linear-gradient(135deg, #FFD700, #FDB931, #C08209);
    border-radius: 50%;
    margin-top: -10px;
    border: 4px solid #F0C420;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
    overflow: hidden;
}

.medal-star {
    font-size: 2.5rem;
    /* Bigger star */
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.medal-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 60%);
    transform: rotate(45deg);
    animation: shineMedal 5s infinite linear;
}

@keyframes floatMedal {

    0%,
    100% {
        transform: translateY(0) scale(1.3);
    }

    50% {
        transform: translateY(-10px) scale(1.3);
    }
}

@keyframes shineMedal {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    20% {
        transform: translateX(150%) rotate(45deg);
    }

    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

@media (max-width: 768px) {
    .medal-wrapper {
        float: none;
        margin: 0 auto 20px auto;
    }
}

.partner-section {
    width: 100%;
    text-align: center;
}

/* Center the section title underline for this section */
.partner-section .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Reuse section title styles from global */

.partner-slider-container {
    width: 600px;
    /* Show exactly 3 items at 200px each */
    max-width: 100%;
    overflow: hidden;
    position: relative;
    height: 100px;
    margin: 0 auto;
    /* Center the slider */
}

.partner-track {
    display: flex;
    width: calc(200px * 14);
    /* 7 unique * 2 sets * 200px */
    animation: partnerScroll 23s linear infinite;
    align-items: center;
}


.partner-logo {
    width: 200px;
    /* Fixed width per slide */
    padding: 0 20px;
    /* Spacing */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100px;
    /* Larger height */
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    /* Brighter default */
    transition: all 0.3s ease;
}

.partner-section:hover .partner-logo img,
.partner-slider-container:hover .partner-logo img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.partner-track:hover {
    animation-play-state: paused;
}

@keyframes partnerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 7));
    }

    /* Move by 7 items * 200px */
}

/* Partner Lightbox Modal */
.partner-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    /* Top on everything */
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    /* Limit size */
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

/* Partner Modal Enhanced Layout */
.modal-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    /* Ensure full height usage for vertical centering */
}

.modal-text-container {
    color: #fff;
    flex: 1;
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 15px;
    /* Scrollbar space */
    font-family: 'Roboto', sans-serif;
    /* Consistent font */
}

.modal-text-container h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.modal-text-container p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 1rem;
    color: #ddd;
}

/* Specific styling for image when inside wrapper */
.modal-content-wrapper img.modal-content {
    /* User requested "patch somewhat smaller" */
    width: auto;
    max-width: 300px;
    /* Constrain width */
    height: auto;
    max-height: 300px;
    /* Constrain height */
    flex: 0 0 auto;
    /* Don't grow/shrink */
    margin: 0;
    /* Override auto margin from original class */
}

/* Custom Scrollbar for text container */
.modal-text-container::-webkit-scrollbar {
    width: 8px;
}

.modal-text-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.modal-text-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .modal-content-wrapper {
        flex-direction: column;
        gap: 20px;
        padding-top: 50px;
        /* Space for close button */
        justify-content: flex-start;
        /* Start from top */
        overflow-y: auto;
        /* Allow scrolling wrapper if needed */
    }

    .modal-text-container {
        order: 2;
        /* Text below image on mobile usually looks better */
        width: 100%;
        max-height: none;
        /* Let usage define height */
        padding-bottom: 50px;
    }

    .modal-content-wrapper img.modal-content {
        order: 1;
        max-width: 150px;
        max-height: 150px;
    }

    /* Adjust close button for mobile if needed */
    .close-modal {
        top: 20px;
        right: 20px;
        z-index: 10001;
    }
}