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

:root {
    --mc-green: #7c4dff;
    --mc-dark-green: #4527a0;
    --mc-brown: #311B92;
    --mc-dirt: #512DA8;
    --mc-grass: #b388ff;
    --mc-sky: #64b5f6;
    --mc-dark: #10002b;
    --mc-light: #f5f5f5;
}

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Modern replacement for scroll-margin-top on targets */
}

/* Ensure sections respect the offset */
section[id] {
    scroll-margin-top: 100px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--mc-dark);
    color: #fff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.pixel-text {
    font-family: 'VT323', 'Press Start 2P', cursive;
    text-transform: uppercase;
    font-size: 1.3rem;
}

/* Navbar */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--mc-green);
}



.features-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .features-grid.three-col {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand .nav-logo {
    height: 50px;
    width: auto;
    display: block;
    transition: transform 0.3s;
}

.nav-brand .nav-logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a.active {
    color: var(--mc-grass);
    text-shadow: 0 0 10px rgba(124, 179, 66, 0.4);
}

.hamburger {
    display: none;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--mc-grass);
}

.btn-join {
    background: var(--mc-green);
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 0 var(--mc-dark-green);
    transition: transform 0.1s;
}

.btn-join:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--mc-dark-green);
}

/* Navbar Buttons */
.nav-discord {
    background: #5865F2;
    /* Discord Blurple */
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 0 #4752c4;
    transition: transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-discord:hover {
    background: #4752c4;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #3b429f;
}

.nav-discord i {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: linear-gradient(135deg, #240046 0%, #10002b 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/epic_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
    filter: hue-rotate(150deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.hero-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(124, 77, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

.pixel-title {
    margin-top: 0;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--mc-grass);
    text-shadow: 4px 4px 0 var(--mc-dark-green);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

/* IP Box */
.ip-box {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 3px solid var(--mc-green);
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ip-label {
    font-size: 0.9rem;
    color: var(--mc-grass);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.ip-address {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

#server-ip {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #fff;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    flex: 1;
}

.copy-btn {
    background: var(--mc-green);
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--mc-dark-green);
    transition: all 0.1s;
    font-size: 1rem;
    min-width: 180px;
    /* Prevent layout shift */
    height: 54px;
    /* Prevent vertical shift */
    display: flex;
    justify-content: center;
    align-items: center;
}

.copy-btn:hover {
    background: var(--mc-grass);
}

.copy-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--mc-dark-green);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--mc-green);
    filter: drop-shadow(0 0 10px rgba(157, 78, 221, 0.4));
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mc-grass);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #ccc;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: #0d0d0d;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 4rem;
    color: var(--mc-grass);
    text-shadow: 3px 3px 0 var(--mc-dark-green);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 2px solid var(--mc-green);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s,
        box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.3);
    border-color: var(--mc-grass);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--mc-green);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--mc-grass);
}

.feature-card p {
    color: #ccc;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #240046 0%, #10002b 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 3.5rem;
    color: var(--mc-grass);
    text-shadow: 3px 3px 0 var(--mc-dark-green);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-ip {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.ip-large {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: #fff;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 3px solid var(--mc-green);
}

.btn-large {
    background: var(--mc-green);
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 6px 0 var(--mc-dark-green);
    transition: all 0.1s;
}

.btn-large:hover {
    background: var(--mc-grass);
}

.btn-large:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 var(--mc-dark-green);
}

/* Footer */
.footer {
    background: #0a0a0a;
    padding: 2rem 0;
    text-align: center;
    border-top: 3px solid var(--mc-green);
    margin-top: auto;
}

.footer p {
    margin-bottom: 1rem;
    color: #888;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    color: var(--mc-grass);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero {
        padding-top: 140px;
        /* Increased padding to prevent navbar overlap */
        align-items: flex-start;
        /* Align content to start to avoid centering issues if height is small */
        min-height: auto;
        padding-bottom: 4rem;
        /* Allow background to scale better by removing fixed 100vh height */
    }

    .hero-logo {
        max-width: 150px;
        margin-top: 5rem;
        /* Increased margin to lower logo below navbar */
    }

    .pixel-title {
        font-size: 2rem;
    }

    .ip-address {
        flex-direction: column;
    }

    #server-ip {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        flex: 0 1 auto;
        min-width: 100px;
    }

    .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 0.25rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .cta-ip {
        flex-direction: column;

        .ip-large {
            font-size: 1.2rem;
        }
    }
}

/* --- MODES SECTION --- */
.modes-section {
    padding: 4rem 0;
    background: #15002b;
    /* Changed from #1a1a1a to match theme */
    border-bottom: 4px solid var(--mc-dirt);
}

.modes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.mode-card {
    flex: 1 1 300px;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 4px solid var(--mc-dirt);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s,
        border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--mc-green);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: var(--mc-green);
}

.mode-card:hover::before {
    transform: scaleX(1);
}

.mode-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--mc-green);
    animation: float-icon 4s ease-in-out infinite;
}

.mode-card h3 {
    color: var(--mc-green);
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.mode-card p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.mode-players {
    font-size: 1rem;
    color: #fff;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    background: rgba(157, 78, 221, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(157, 78, 221, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.mode-players:hover {
    background: rgba(157, 78, 221, 0.3);
    border-color: var(--mc-grass);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.2);
}

.mode-players i {
    color: var(--mc-grass);
    filter: drop-shadow(0 0 5px rgba(224, 176, 255, 0.6));
}

/* --- SURVIVAL (GREEN) --- */
.mode-survival {
    border-color: #388e3c;
}

.mode-survival:hover {
    border-color: #4caf50;
}

.mode-survival::before {
    background: #4caf50;
}

.mode-survival .mode-icon {
    color: #4caf50;
}

.mode-survival h3 {
    color: #4caf50;
}

.mode-survival .mode-players {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.mode-survival .mode-players:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
}

.mode-survival .mode-players i {
    color: #81c784;
    filter: drop-shadow(0 0 5px rgba(129, 199, 132, 0.6));
}

/* --- DUELS (RED) --- */
.mode-duels {
    border-color: #c62828;
}

.mode-duels:hover {
    border-color: #e53935;
}

.mode-duels::before {
    background: #e53935;
}

.mode-duels .mode-icon {
    color: #e53935;
}

.mode-duels h3 {
    color: #e53935;
}

.mode-duels .mode-players {
    background: rgba(229, 57, 53, 0.2);
    border: 1px solid rgba(229, 57, 53, 0.4);
}

.mode-duels .mode-players:hover {
    background: rgba(229, 57, 53, 0.3);
    border-color: #e53935;
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.2);
}

.mode-duels .mode-players i {
    color: #ef5350;
    filter: drop-shadow(0 0 5px rgba(239, 83, 80, 0.6));
}

/* --- BEDWARS (BLUE) --- */
.mode-bedwars {
    border-color: #1565c0;
}

.mode-bedwars:hover {
    border-color: #2196f3;
}

.mode-bedwars::before {
    background: #2196f3;
}

.mode-bedwars .mode-icon {
    color: #2196f3;
}

.mode-bedwars h3 {
    color: #2196f3;
}

.mode-bedwars .mode-players {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.4);
}

.mode-bedwars .mode-players:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: #2196f3;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
}

.mode-bedwars .mode-players i {
    color: #42a5f5;
    filter: drop-shadow(0 0 5px rgba(66, 165, 245, 0.6));
}

/* --- ANIMATIONS --- */

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

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

/* Staggered delays for grid items */
.features-grid .feature-card:nth-child(1) {
    transition-delay: 0.1s;
}

.features-grid .feature-card:nth-child(2) {
    transition-delay: 0.2s;
}

.features-grid .feature-card:nth-child(3) {
    transition-delay: 0.3s;
}

.features-grid .feature-card:nth-child(4) {
    transition-delay: 0.4s;
}

.features-grid .feature-card:nth-child(5) {
    transition-delay: 0.5s;
}

.features-grid .feature-card:nth-child(6) {
    transition-delay: 0.6s;
}

/* 3D Tilt Effect Base */
.feature-card {
    /* Keep existing styles */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-icon,
.feature-card h3,
.feature-card p {
    transform: translateZ(20px);
    /* Pop out effect */
}

/* Particle System */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--mc-grass);
    border-radius: 50%;
    opacity: 0.6;
    animation: float-up linear infinite;
    box-shadow: 0 0 10px var(--mc-green);
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
        transform: translateY(90vh) scale(1);
    }

    90% {
        opacity: 0.8;
        transform: translateY(10vh) scale(1);
    }

    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* --- ADVANCED ANIMATIONS --- */

/* 1. Glitch Effect */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 15px, 0);
    }

    20% {
        clip: rect(65px, 9999px, 79px, 0);
    }

    40% {
        clip: rect(12px, 9999px, 34px, 0);
    }

    60% {
        clip: rect(89px, 9999px, 4px, 0);
    }

    80% {
        clip: rect(32px, 9999px, 95px, 0);
    }

    100% {
        clip: rect(54px, 9999px, 18px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(12px, 9999px, 5px, 0);
    }

    40% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 85px, 0);
    }

    80% {
        clip: rect(45px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(75px, 9999px, 40px, 0);
    }
}

.glitch-hover:hover {
    position: relative;
}

.glitch-hover:hover::before,
.glitch-hover:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
}

.glitch-hover:hover::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-hover:hover::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

/* 2. Typing Effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

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

/* 3. Floating Icons */
.feature-icon {
    display: inline-block;
    animation: float-icon 3s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float-icon {

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

    50% {
        transform: translateY(-10px) translateZ(20px);
    }
}

/* 4. Pulse Button */
.btn-pulse {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 179, 66, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(124, 179, 66, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(124, 179, 66, 0);
    }
}

/* Enhanced Buttons */
.btn-join,
.btn-large,
.copy-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-join:hover,
.btn-large:hover,
.copy-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 0 var(--mc-dark-green);
}

.btn-large:hover {
    box-shadow: 0 8px 0 var(--mc-dark-green);
}

.copy-btn:active,
.btn-join:active,
.btn-large:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--mc-dark-green);
}

@media (max-width: 768px) {

    .navbar {
        padding-top: 1rem;
        height: auto;
    }

    .hero {
        padding-top: 1rem;
        height: 100vh;
        /* Force full viewport height */
        min-height: 100vh;
    }

    .hero-bg {
        height: 100%;
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
        /* Fix for some mobile browsers */
    }

    /* Mobile Menu Updates */
    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: white;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(26, 26, 26, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-bottom: 4px solid var(--mc-green);
        padding: 2rem 0;
        gap: 2rem;

    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-item {
        margin: 2.5rem 0;
    }

    .pixel-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }
}

/* --- SUBPAGE STYLES (Header & Glitch) --- */
.page-header {
    background: transparent;
    padding: 160px 0 60px;
    text-align: center;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.hero-style .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fixed path for CSS file location */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/epic_bg.png');
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    z-index: 1;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    text-shadow: 4px 4px 0 var(--mc-dark-green), -2px -2px 0 var(--mc-green);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

/* Glitch Effect */
.glitch-effect {
    position: relative;
}

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

.glitch-effect::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-effect::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    5% {
        clip: rect(70px, 9999px, 11px, 0);
    }

    10% {
        clip: rect(29px, 9999px, 6px, 0);
    }

    15% {
        clip: rect(62px, 9999px, 69px, 0);
    }

    20% {
        clip: rect(11px, 9999px, 11px, 0);
    }

    25% {
        clip: rect(78px, 9999px, 98px, 0);
    }

    30% {
        clip: rect(24px, 9999px, 1px, 0);
    }

    35% {
        clip: rect(80px, 9999px, 2px, 0);
    }

    40% {
        clip: rect(55px, 9999px, 2px, 0);
    }

    45% {
        clip: rect(51px, 9999px, 32px, 0);
    }

    50% {
        clip: rect(60px, 9999px, 50px, 0);
    }

    55% {
        clip: rect(9px, 9999px, 4px, 0);
    }

    60% {
        clip: rect(21px, 9999px, 91px, 0);
    }

    65% {
        clip: rect(50px, 9999px, 3px, 0);
    }

    70% {
        clip: rect(16px, 9999px, 34px, 0);
    }

    75% {
        clip: rect(53px, 9999px, 57px, 0);
    }

    80% {
        clip: rect(92px, 9999px, 7px, 0);
    }

    85% {
        clip: rect(21px, 9999px, 28px, 0);
    }

    90% {
        clip: rect(43px, 9999px, 86px, 0);
    }

    95% {
        clip: rect(96px, 9999px, 89px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 65px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    5% {
        clip: rect(52px, 9999px, 74px, 0);
    }

    10% {
        clip: rect(79px, 9999px, 85px, 0);
    }

    15% {
        clip: rect(75px, 9999px, 5px, 0);
    }

    20% {
        clip: rect(67px, 9999px, 61px, 0);
    }

    25% {
        clip: rect(14px, 9999px, 79px, 0);
    }

    30% {
        clip: rect(1px, 9999px, 66px, 0);
    }

    35% {
        clip: rect(86px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(23px, 9999px, 98px, 0);
    }

    45% {
        clip: rect(85px, 9999px, 72px, 0);
    }

    50% {
        clip: rect(71px, 9999px, 75px, 0);
    }

    55% {
        clip: rect(2px, 9999px, 48px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 16px, 0);
    }

    65% {
        clip: rect(59px, 9999px, 50px, 0);
    }

    70% {
        clip: rect(41px, 9999px, 62px, 0);
    }

    75% {
        clip: rect(2px, 9999px, 82px, 0);
    }

    80% {
        clip: rect(47px, 9999px, 73px, 0);
    }

    85% {
        clip: rect(3px, 9999px, 27px, 0);
    }

    90% {
        clip: rect(26px, 9999px, 55px, 0);
    }

    95% {
        clip: rect(42px, 9999px, 97px, 0);
    }

    100% {
        clip: rect(38px, 9999px, 49px, 0);
    }
}

/* Vote List Styles (Restored) */
.vote-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.vote-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--mc-dirt);
    border-left: 5px solid var(--mc-green);
    border-radius: 8px;
    padding: 20px 30px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.vote-item:hover {
    background: rgba(40, 40, 40, 0.6);
    border-color: var(--mc-green);
    box-shadow: -5px 5px 20px rgba(124, 179, 66, 0.2);
}

.vote-number-box {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    margin-right: 30px;
    min-width: 50px;
    text-align: center;
}

.vote-item:hover .vote-number-box {
    color: var(--mc-grass);
}

.vote-info {
    flex: 1;
}

.vote-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.vote-icon-small {
    font-size: 1.5rem;
    color: var(--mc-green);
}

.vote-info h3 {
    font-size: 1.5rem;
    margin: 0;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.vote-info p {
    margin: 0;
    color: #aaa;
    font-size: 1rem;
}

.vote-action {
    margin-left: 30px;
}

.vote-btn-wide {
    background: var(--mc-green);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 0 var(--mc-dark-green);
}

.vote-item:hover .vote-btn-wide {
    background: var(--mc-grass);
    box-shadow: 0 6px 0 var(--mc-dark-green);
}

.vote-item:active .vote-btn-wide {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--mc-dark-green);
}

/* Vote Info Box */
.vote-info-box {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    margin-top: -10px;
    text-align: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
}

.info-item i {
    font-size: 1.1rem;
    color: var(--mc-grass);
}

.cmd-code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Responsive List */
@media (max-width: 768px) {
    .vote-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .vote-number-box {
        margin: 0 0 15px 0;
    }

    .vote-title-row {
        justify-content: center;
    }

    .vote-action {
        margin: 20px 0 0 0;
        width: 100%;
    }

    .vote-btn-wide {
        width: 100%;
        justify-content: center;
    }
}

/* --- RULES SECTION --- */
.rules-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.rule-card {
    flex: 1 1 300px;
    max-width: 380px;
    /* Prevent them from being too wide */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content horizontally */
    min-height: 100%;
    /* Ensure full height for flex stretch */
}

/* Ensure feature-content expands so button goes to bottom */
.rule-card p {
    flex-grow: 1;
    /* Push the button down */
    margin-bottom: 2rem !important;
    /* Visual spacing before button */
}

.rule-card .vote-btn-wide {
    margin-top: auto;
    width: 100%;
    max-width: 200px;
}

.btn-blue {
    background: #5865F2 !important;
    box-shadow: 0 4px 0 #4752c4 !important;
}

.btn-blue:hover {
    background: #4752c4 !important;
    box-shadow: 0 6px 0 #3b429f !important;
}

.btn-blue:active {
    box-shadow: 0 2px 0 #3b429f !important;
}

:root {
    /* Stats Specific Colors */
    --survival-green: #4caf50;
    --pvp-red: #e53935;
    --bedwars-blue: #2196f3;
}

/* Scroll adjustments if needed, otherwise rely on global */


/* --- STATY SPECIFIC STYLES --- */

/* Global variables and stats specific colors are at the top */
/* Modes grid spacing for stats page */
.modes-grid {
    margin-bottom: 80px;
}

/* Modes Grid */
/* Modes Grid */
/* Modes grid handled by global CSS */

/* Mode card handled by global CSS */

.mode-card:hover,
.mode-card.active {
    transform: translateY(-5px);
    border-color: var(--mc-green);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.mode-card.active {
    background: rgba(124, 179, 66, 0.1);
}

.mode-card.active.survival {
    border-color: var(--survival-green);
}

.mode-card.active.pvp {
    border-color: var(--pvp-red);
}

.mode-card.active.bedwars {
    border-color: var(--bedwars-blue);
}


.mode-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    color: var(--mc-grass);
    transition: transform 0.3s;
}

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

.mode-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Specific Mode Colors */
.mode-card.survival .mode-icon,
.mode-card.survival h3 {
    color: var(--survival-green);
}

.mode-card.pvp .mode-icon,
.mode-card.pvp h3 {
    color: var(--pvp-red);
}

.mode-card.bedwars .mode-icon,
.mode-card.bedwars h3 {
    color: var(--bedwars-blue);
}

/* Search Bar */
.search-container {
    margin: 80px auto 40px;
    text-align: center;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border: 3px solid var(--mc-green);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-form {
    display: flex;
    gap: 15px;
}

.search-input {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--mc-dirt);
    border-radius: 5px;
    color: white;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--mc-grass);
    box-shadow: 0 0 10px rgba(124, 179, 66, 0.2);
}

.search-btn {
    background: var(--mc-green);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 0 var(--mc-dark-green);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-btn:hover {
    background: var(--mc-grass);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--mc-dark-green);
}

.search-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--mc-dark-green);
}

/* Stats Cards (Features Grid Style) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

.card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--mc-dirt);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--mc-green);
}

.card h2 {
    color: var(--mc-grass);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* Player Entries */
.player-entry {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    /* Ensure it stays flex */
    /* Prevent overflow */
}

/* Top 3 Highlighting - Premium Gradients */
/* 1st Place - Subtle Gold */
.entries .player-entry:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(0, 0, 0, 0) 90%);
    border-left: 4px solid #FFD700;
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.05);
}

.entries .player-entry:nth-child(1) .rank {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    font-size: 1.2rem;
}

/* 2nd Place - Subtle Silver/Platinum */
.entries .player-entry:nth-child(2) {
    background: linear-gradient(90deg, rgba(224, 224, 224, 0.08), rgba(0, 0, 0, 0) 90%);
    border-left: 4px solid #E0E0E0;
    border-color: rgba(224, 224, 224, 0.2);
}

.entries .player-entry:nth-child(2) .rank {
    color: #E0E0E0;
    text-shadow: 0 0 10px rgba(224, 224, 224, 0.3);
}

/* 3rd Place - Subtle Bronze */
.entries .player-entry:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08), rgba(0, 0, 0, 0) 90%);
    border-left: 4px solid #CD7F32;
    border-color: rgba(205, 127, 50, 0.2);
}

.entries .player-entry:nth-child(3) .rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

/* Hover effects - keep interactive but subtle */
.entries .player-entry:nth-child(1):hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(0, 0, 0, 0) 90%);
}

.entries .player-entry:nth-child(2):hover {
    background: linear-gradient(90deg, rgba(224, 224, 224, 0.12), rgba(0, 0, 0, 0) 90%);
}

.entries .player-entry:nth-child(3):hover {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12), rgba(0, 0, 0, 0) 90%);
}

.player-entry:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--mc-green);
    transform: translateX(5px);
}

.rank {
    width: 30px;
    font-weight: bold;
    color: #888;
}

.rank-1 {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    color: #C0C0C0;
}

.rank-3 {
    color: #CD7F32;
}

.avatar {
    width: 32px;
    height: 32px;
    margin: 0 15px;
    border-radius: 4px;
}

.name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    min-width: 0;
}

.player-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.player-link:hover {
    color: var(--mc-green);
}

.value {
    font-weight: bold;
    color: var(--mc-grass);
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    white-space: nowrap;
}

/* Player Profile Card */
.player-profile {
    max-width: 800px;
    margin: 40px auto;
    background: rgba(0, 0, 0, 0.3);
    border: 4px solid var(--mc-green);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.player-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--mc-green), var(--mc-grass));
}

.player-profile img {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    border: 4px solid var(--mc-dirt);
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.player-name {
    font-size: 2.5rem;
    color: var(--mc-grass);
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 var(--mc-dark-green);
}

.stats-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-box strong {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-box span {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(40, 40, 40, 0.8);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.back-btn:hover {
    background: var(--mc-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 179, 66, 0.3);
    border-color: var(--mc-green);
}

/* Footer handled by global CSS */

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-btn {
        padding: 15px;
        justify-content: center;
    }
}

/* --- ANIMATIONS --- */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

/* Loading */
.loading-placeholder {
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* --- NAVBAR UPDATES (Hamburger & Mobile) --- removed duplicates to rely on global style.css */

/* --- PLAYER PROFILE REDESIGN --- */
.profile-container {
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding: 20px;
    /* Removed background/box styling per user request */
}

/* Pseudo element removed */
.profile-hero::before {
    display: none;
}

.player-model {
    height: 300px;
    filter: drop-shadow(0 0 20px rgba(124, 179, 66, 0.4));
    transition: transform 0.3s;
    z-index: 1;
}

.player-model:hover {
    transform: scale(1.05) rotate(2deg);
}

.profile-name {
    font-size: 3rem;
    margin-top: 1rem;
    color: #ffffff;
    text-shadow: 3px 3px 0 #000, 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1;
    font-family: 'Poppins', sans-serif;
}

.profile-badges {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    z-index: 1;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    color: #ccc;
}

.mode-section {
    margin-bottom: 4rem;
}

.mode-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding-bottom: 5px;
    border-bottom: 3px solid;
}

.stats-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 30, 30, 1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 15px;
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.stat-label {
    font-size: 0.85rem;
    color: #ddd;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.6rem;
    font-family: 'VT323', monospace;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Mode Specific Theming */
.mode-section.survival .mode-title {
    border-color: var(--survival-green);
    color: var(--survival-green);
}

.mode-section.survival .stat-card {
    border-top: 3px solid var(--survival-green);
}

.mode-section.survival .stat-icon {
    color: var(--survival-green);
}

.mode-section.pvp .mode-title {
    border-color: var(--pvp-red);
    color: var(--pvp-red);
}

.mode-section.pvp .stat-card {
    border-top: 3px solid var(--pvp-red);
}

.mode-section.pvp .stat-icon {
    color: var(--pvp-red);
}

.mode-section.bedwars .mode-title {
    border-color: var(--bedwars-blue);
    color: var(--bedwars-blue);
}

.mode-section.bedwars .stat-card {
    border-top: 3px solid var(--bedwars-blue);
}

.mode-section.bedwars .stat-icon {
    color: var(--bedwars-blue);
}

/* --- NEW RANK BADGE STYLES --- */
.profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    z-index: 2;
    max-width: 90%;
}

.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.badge i {
    font-size: 1rem;
}

/* Rank Specific Styles */
.badge-default {
    border-color: #777;
    color: #aaa;
}

.badge-rank {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.badge-verified {
    background: rgba(88, 101, 242, 0.15);
    /* Discord Blurple Tint */
    border: 1px solid #5865F2;
    color: #fff;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
}

.badge-verified i {
    color: #5865F2;
}

/* Mode Identifiers within badges */
.mode-indicator {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-right: 4px;
    padding-right: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* Rank Groups Layout */
.rank-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-group-title {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.expiry-tag {
    font-size: 0.7em;
    opacity: 0.7;
    margin-left: 6px;
    font-weight: normal;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 5px;
    border-radius: 4px;
}

/* --- NEW RANK BADGE STYLES (REFINED) --- */
.profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    /* More space between groups */
    margin-top: 2rem;
    z-index: 2;
    width: 100%;
}

/* Group Container - Clean & Glassmorphic */
.rank-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Quieter border */
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 160px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.rank-group:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Title that sits "on" the border or nicely atop */
.rank-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.5);
    /* Muted default */
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle divider */
    padding-bottom: 6px;
    width: 100%;
    justify-content: center;
}

.rank-group-title i {
    font-size: 0.9rem;
}

/* Badge itself */
.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    /* Slightly sharper than pill */
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    margin-bottom: 4px;
    /* Space between multiple badges in same group */
    width: 100%;
    /* Fill the group width */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
}

.badge:hover {
    filter: brightness(1.2);
}

.badge:last-child {
    margin-bottom: 0;
}

/* Verified Badge - Standalone */
.badge-verified {
    background: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
    border: 1px solid #7983F5;
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    padding: 10px 24px;
    /* Larger */
    font-size: 0.95rem;
    /* Larger */
    margin-bottom: 10px;
    /* Separate from other groups */
    border-radius: 8px;
    width: auto !important;
    /* Allow natural width */
}

.badge-default {
    background: rgba(255, 255, 255, 0.05);
    color: #999;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Rank Styling - Premium Dark */
.badge-rank {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #444;
    /* Dark grey border */
    color: #FFD700;
    /* Gold text */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Small Expiry Tag inside badge */
.expiry-tag {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    /* Push to right if we used flex */
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* --- NEW RANK CARD SYSTEM --- */
.profile-ranks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    width: 100%;
}

.verified-badge-container {
    margin-bottom: 5px;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #5865F2, #4752c4);
    border: 1px solid #7983F5;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.badge-verified:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.server-ranks-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.rank-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rank-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Rank Card Elements */
.rank-card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.rank-card-server {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    letter-spacing: 1px;
    font-weight: 600;
}

.rank-card-value {
    font-size: 1.1rem;
    font-family: 'VT323', monospace;
    /* Or Poppins bold */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.rank-card-expiry {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Specific Colors */
.rank-card.survival {
    border-bottom: 3px solid var(--survival-green);
}

.rank-card.survival .rank-card-icon,
.rank-card.survival .rank-card-value {
    color: var(--survival-green);
}

.rank-card.pvp {
    border-bottom: 3px solid var(--pvp-red);
}

.rank-card.pvp .rank-card-icon,
.rank-card.pvp .rank-card-value {
    color: var(--pvp-red);
}

.rank-card.bedwars {
    border-bottom: 3px solid var(--bedwars-blue);
}

.rank-card.bedwars .rank-card-icon,
.rank-card.bedwars .rank-card-value {
    color: var(--bedwars-blue);
}

.rank-card.default .rank-card-icon {
    color: #888;
}

.rank-card.default {
    border-bottom: 3px solid #888;
}


/* Badges Container - Clean Row */
.profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* Rank Tag - Compact Pill */
.rank-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    /* Full pill shape */
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #eee;
    transition: all 0.2s;
    cursor: default;
}

.rank-tag:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tag-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

/* Server Rank Specifics */
.tag-server {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-server-name {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #bbb;
}

.tag-rank-name {
    color: #ffd700;
    /* Gold */
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Discord Tag */
.tag-discord {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.4);
    color: #fff;
}

.tag-discord i {
    color: #5865F2;
}

/* Expiry Date Text */
.tag-expiry {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0.3rem;
    padding-left: 0.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 400;
}

/* Base Badge Style - Compact & Stacked */
.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    /* Space between icon and text */
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-align: left;
    /* Align text left inside badge */
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.badge-icon {
    font-size: 1.5rem;
    /* Larger icon */
    flex-shrink: 0;
}

.badge-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.badge-server {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;
}

.badge-value {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-expiry {
    font-size: 0.6rem;
    font-weight: 400;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 0.3rem;
}

/* Rank Tag Colors by Mode */

/* Specific Rank Overrides (Take priority over Mode) */

/* VIP / SZLACHCIC & VIP+ / SZLACHCIC+ - Gold */
.tag-rank-vip .tag-rank-name,
.tag-rank-vip-plus .tag-rank-name {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.tag-rank-vip,
.tag-rank-vip-plus {
    border-color: rgba(255, 215, 0, 0.4);
}

/* SPONSOR / MAGNAT & SPONSOR+ / MAGNAT+ - Blue */
.tag-rank-sponsor .tag-rank-name,
.tag-rank-sponsor-plus .tag-rank-name {
    color: #00BFFF !important;
    /* Deep Sky Blue */
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.4);
}

.tag-rank-sponsor,
.tag-rank-sponsor-plus {
    border-color: rgba(0, 191, 255, 0.4);
}

/* SVIP / ARYSTOKRATA - Platinum/Diamond */
.tag-rank-svip .tag-rank-name {
    color: #E5E4E2 !important;
    text-shadow: 0 0 10px rgba(229, 228, 226, 0.5);
}

.tag-rank-svip {
    border-color: rgba(229, 228, 226, 0.5);
}

/* WSPIERAJĄCY - Light Purple */
.tag-rank-wspierajacy .tag-rank-name {
    color: #d45dff !important;
    text-shadow: 0 0 10px rgba(212, 93, 255, 0.4);
}

.tag-rank-wspierajacy {
    border-color: rgba(212, 93, 255, 0.4);
}

/* STAFF (Owner, Admin) - Red */
.tag-rank-wlasciciel .tag-rank-name,
.tag-rank-owner .tag-rank-name,
.tag-rank-admin .tag-rank-name,
.tag-rank-administrator .tag-rank-name {
    color: #FF0000 !important;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

.tag-rank-wlasciciel,
.tag-rank-owner,
.tag-rank-admin,
.tag-rank-administrator {
    border-color: rgba(255, 0, 0, 0.6);
    background: rgba(255, 0, 0, 0.1);
}

/* MODERATOR - Dark Green */
.tag-rank-mod .tag-rank-name,
.tag-rank-moderator .tag-rank-name {
    color: #00AA00 !important;
    text-shadow: 0 0 10px rgba(0, 170, 0, 0.4);
}

.tag-rank-mod,
.tag-rank-moderator {
    border-color: rgba(0, 170, 0, 0.4);
}

/* HELPER - Dark Blue */
.tag-rank-helper .tag-rank-name,
.tag-rank-pomocnik .tag-rank-name {
    color: #2979FF !important;
    text-shadow: 0 0 10px rgba(41, 121, 255, 0.4);
}

.tag-rank-helper,
.tag-rank-pomocnik {
    border-color: rgba(41, 121, 255, 0.4);
}

/* Survival - Green */
.tag-survival {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.15);
}

.tag-survival .tag-server-name {
    color: #81c784;
}

.tag-survival .tag-rank-name {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* PvP/Duels - Red */
.tag-pvp {
    border-color: rgba(229, 57, 53, 0.5);
    background: rgba(229, 57, 53, 0.15);
}

.tag-pvp .tag-server-name {
    color: #ef5350;
}

.tag-pvp .tag-rank-name {
    color: #e53935;
    text-shadow: 0 0 10px rgba(229, 57, 53, 0.3);
}

/* Bedwars - Blue */
.tag-bedwars {
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(33, 150, 243, 0.15);
}

.tag-bedwars .tag-server-name {
    color: #42a5f5;
}

.tag-bedwars .tag-rank-name {
    color: #2196f3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

/* Rank Badge Theme */
.badge-rank {
    border-left: 3px solid #ffd700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.badge-rank .badge-icon {
    color: #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}

.badge-rank .badge-server {
    color: #ffd700;
}

.badge-rank .badge-value {
    color: #fff;
}

/* Discord Badge Theme */
.badge-discord {
    border-left: 3px solid #5865F2;
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.badge-discord .badge-icon {
    color: #5865F2;
    filter: drop-shadow(0 0 8px rgba(88, 101, 242, 0.4));
}

.badge-discord .badge-server {
    color: #5865F2;
}

/* Responsive */
@media (max-width: 480px) {
    .badge {
        width: 100%;
        justify-content: flex-start;
        /* Left align on mobile list */
    }
}

/* Default / Gracz - White/Cream */
.tag-default {
    border-color: rgba(255, 253, 208, 0.5);
    background: rgba(255, 253, 208, 0.1);
}

.tag-default .tag-server-name {
    color: #f0f0f0;
}

.tag-default .tag-rank-name {
    color: #fffdd0;
    text-shadow: 0 0 10px rgba(255, 253, 208, 0.4);
}