* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*::-webkit-scrollbar {
    display: none;
}
* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===============================
   Global Button Spam Cooldown Overlay
   =============================== */
#button-spam-cooldown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.spam-cooldown-content {
    background: linear-gradient(135deg, #2a1a1a 0%, #3a1a1a 50%, #4a1a1a 100%);
    border: 3px solid rgba(255, 68, 68, 0.7);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(255, 68, 68, 0.5);
    animation: spamPulse 1.5s ease-in-out infinite;
}

@keyframes spamPulse {
    0%, 100% { 
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 68, 68, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 68, 68, 0.8);
        transform: scale(1.02);
    }
}

.spam-cooldown-icon {
    font-size: 72px;
    margin-bottom: 25px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.spam-cooldown-content h2 {
    color: #ff4444;
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: bold;
}

.spam-cooldown-message {
    color: #ff8844;
    font-size: 18px;
    margin: 15px 0;
}

.spam-cooldown-timer {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 68, 68, 0.5);
}

.timer-countdown {
    color: #ff4444;
    font-size: 48px;
    font-weight: bold;
    display: block;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow: hidden;
    position: relative;
    background-color: #000000;
    height: 100vh;
}
.background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
    background-color: #000000;
}
.background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.youtube-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
    z-index: -1;
    object-fit: cover;
}
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    padding-top: 15px;
    background-color: transparent;
    gap: 0;
}
.header-brand-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 570px;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 0 0 20px 20px;
    backdrop-filter: blur(10px);
}
.brand-name {
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.header-social-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 0 0 15px 15px;
    backdrop-filter: blur(10px);
    margin-top: -1px;
}
.nav-items {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}
.social-icon {
    width: 28px;
    height: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}
.social-icon svg {
    width: 100%;
    height: 100%;
}
.social-icon:hover {
    opacity: 0.7;
}
.main-content {
    flex: 1;
    position: relative;
    background-color: transparent;
    height: calc(100vh - 200px);
    overflow: hidden;
}
.footer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    padding-bottom: 15px;
    background-color: transparent;
}
.footer-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    width: auto;
    min-width: fit-content;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(10px);
}
.footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    padding: 5px 10px;
}
.footer-link:hover {
    opacity: 0.7;
}
.wipe-countdown {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    z-index: 2;
    text-align: center;
    backdrop-filter: blur(10px);
}
.wipe-countdown h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
#countdown-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}
.time-set {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-top: 5px;
}
.page-content {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.subcategory-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

/* Server Rules navigation - 4 buttons per row */
#server-rules-nav {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Smaller buttons for Server Rules navigation */
#server-rules-nav .subcategory-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    max-width: fit-content;
    width: auto;
    min-width: 0;
}

@media (max-width: 1200px) {
    #server-rules-nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #server-rules-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #server-rules-nav {
        grid-template-columns: 1fr;
    }
}

.subcategory-nav:not(#server-rules-nav) {
    display: grid;
    grid-template-columns: repeat(6, auto);
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.subcategory-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}
.subcategory-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-bottom-color: rgba(0, 0, 0, 0.6);
    text-shadow: 0 2px 6px rgba(255, 255, 255, 1), 0 0 25px rgba(255, 255, 255, 1);
    box-shadow: 0 3px 12px rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}
.subcategory-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-bottom-color: rgb(255, 102, 0);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(255, 255, 255, 1), 0 0 25px rgba(255, 255, 255, 1);
    box-shadow: 0 3px 12px rgba(255, 255, 255, 0.5), 0 0 20px rgba(249, 115, 22, 0.4);
}
.info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 280px);
    position: relative;
}

/* Center server rules page content */
#server-rules-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#server-rules-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}
.info-section {
    margin-bottom: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
    display: none;
}
.info-section.active-section {
    display: block;
}
.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}
.info-content {
    color: #fff;
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    white-space: pre-wrap;
}

.info-content img {
    display: inline !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1 !important;
    width: 31px !important;
    height: 31px !important;
    object-fit: contain !important;
}

/* Default emoji size (31x31) */
.info-content img.serverinfo-emoji {
    width: 31px !important;
    height: 31px !important;
}

/* If the emoji is inside a <size="N">...</size> span, scale it with the text */
.info-content span[style*="font-size"] img.serverinfo-emoji {
    width: 1em !important;
    height: 1em !important;
}

/* Prevent gaps around images in pre-wrap content */
.info-content br + img,
.info-content img + br {
    display: none !important;
}
.info-content strong {
    font-weight: bold;
}
.info-content em {
    font-style: italic;
}
.info-content u {
    text-decoration: underline;
}
.video-content-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 20px;
    overflow: hidden;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.main-video-container {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 8px;
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}
.main-video-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    text-align: center;
}
.main-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 30%; 
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.5);
}
.main-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}
.random-videos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    flex: 1;
    min-height: 0;
    align-content: start;
}
.random-video-box {
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}
.random-video-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}
.random-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    flex: 1;
    min-height: 0;
    max-height: 100%;
}
.random-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}
.video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.staff-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 200px);
    position: relative;
}
.admin-logo-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ff8800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.admin-logo-btn:hover {
    background-color: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}
.staff-page-title {
    display: none;
}
#staff-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.staff-role-section {
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.staff-role-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f97316;
    margin-bottom: 15px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(249, 115, 22, 0.3);
    padding-bottom: 10px;
}
.staff-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.staff-member {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}
.staff-member:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.staff-member-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 8px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}
.staff-member-id {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.banned-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 200px);
}
.banned-page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}
.steam-id-input-container {
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}
.steam-id-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}
.steam-id-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}
.steam-id-input {
    flex: 1;
    padding: 12px 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: all 0.3s ease;
}
.steam-id-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.steam-id-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.search-ban-btn {
    padding: 12px 30px;
    background-color: rgba(249, 115, 22, 0.3);
    border: 2px solid rgba(249, 115, 22, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.search-ban-btn:hover {
    background-color: rgba(249, 115, 22, 0.5);
    border-color: rgba(249, 115, 22, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.ban-log-container {
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.ban-log-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}
.ban-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ban-entry {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 2fr 1fr;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}
.ban-entry:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}
.ban-field {
    color: #fff;
    font-size: 0.95rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.ban-field-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.ban-field-value {
    font-family: 'Courier New', monospace;
    color: #fff;
}
.ban-duration {
    color: #ff6b6b;
    font-weight: 600;
}
.ban-reason {
    color: #ffd93d;
}
@media (max-width: 768px) {
    .ban-entry {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .steam-id-input-wrapper {
        flex-direction: column;
    }
    .search-ban-btn {
        width: 100%;
    }
}
@media (max-width: 1200px) {
    .random-videos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}
@media (max-width: 768px) {
    .video-content-container {
        padding: 20px 15px;
        gap: 20px;
    }
    .main-video-container {
        padding: 15px;
    }
    .main-video-title {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    .random-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .random-video-box {
        padding: 12px;
    }
}
.footer-link.active {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        width: auto;
    }
    .nav-items {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .brand-logo {
        height: 30px;
    }
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .footer-link {
        font-size: 0.9rem;
        padding: 5px 8px;
    }
}
.admin-logo-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #f97316;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.admin-logo-btn:hover {
    background-color: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}
.leaderboard-content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    overflow-y: auto;
    overflow-x: auto;
    height: calc(100vh - 200px);
}
.leaderboard-page-title {
    font-size: 2.2rem;
    font-weight: 800;
    font-style: italic;
    color: #f97316;
    text-align: left;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5), 2px 2px 8px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}
.leaderboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.leaderboard-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(45, 21, 21, 0.9);
    border-radius: 25px;
    padding: 8px 15px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    transition: all 0.3s ease;
}
.leaderboard-search:focus-within {
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}
.search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}
.tribe-search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    padding: 8px 10px;
    width: 180px;
    outline: none;
}
.tribe-search-input::placeholder {
    color: rgba(249, 115, 22, 0.4);
}
.tribe-search-btn {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.6) 0%, rgba(239, 68, 68, 0.6) 100%);
    border: none;
    color: #fff;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tribe-search-btn:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.8) 0%, rgba(239, 68, 68, 0.8) 100%);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}
.leaderboard-filters {
    display: flex;
    gap: 15px;
}
.filter-dropdown {
    position: relative;
}
.filter-select {
    background-color: rgba(45, 21, 21, 0.9);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: #fff;
    padding: 12px 40px 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    min-width: 180px;
    transition: all 0.3s ease;
}
.filter-select:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}
.filter-select option {
    background-color: #2d1515;
    color: #fff;
}
.leaderboard-table-container {
    background-color: rgba(15, 20, 30, 0.95);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 25px rgba(249, 115, 22, 0.15);
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
.leaderboard-table thead {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
}
.leaderboard-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f97316;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.3);
}
.leaderboard-table td {
    padding: 16px 20px;
    font-size: 0.95rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.leaderboard-table tbody tr {
    transition: all 0.2s ease;
    background-color: rgba(60, 20, 20, 0.5);
}
.leaderboard-table tbody tr:nth-child(even) {
    background-color: rgba(80, 25, 25, 0.5);
}
.leaderboard-table tbody tr:hover {
    background-color: rgba(249, 115, 22, 0.15);
    box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.1);
}
.rank-col {
    width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}
.rank-col .trophy {
    margin-right: 5px;
}
.rank-col.gold {
    color: #ffd700;
}
.rank-col.silver {
    color: #c0c0c0;
}
.rank-col.bronze {
    color: #cd7f32;
}
.tribe-col {
    min-width: 220px;
    font-weight: 600;
}
.player-name-clickable {
    transition: all 0.2s ease;
}
.player-name-clickable:hover {
    color: #ff8787 !important;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
}
.score-col {
    min-width: 120px;
    font-weight: 600;
}
.stat-col {
    min-width: 100px;
    text-align: left;
}
.loading-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 40px !important;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 50%, rgba(15, 52, 96, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 2px solid rgba(0, 191, 255, 0.3);
    border-radius: 20px;
    padding: 50px 45px;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(0, 191, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 191, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.login-modal-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(0, 191, 255, 0.5);
    letter-spacing: 1px;
    position: relative;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00bfff, transparent);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    border: 2px solid rgba(0, 191, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    border-color: #00bfff;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4),
                inset 0 0 10px rgba(0, 191, 255, 0.1);
    transform: translateY(-2px);
}

.form-group input[type="text"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.6'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 18px;
}

.form-group input[type="password"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.6'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 18px;
}

.form-group input:focus {
    background-image: none;
}

.form-group input:focus + label::after,
.form-group:has(input:focus) label::after {
    opacity: 1;
}

.error-message {
    color: #ff6b6b;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 77, 77, 0.15) 100%);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.btn-primary {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.4),
                0 0 30px rgba(0, 191, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 191, 255, 0.6),
                0 0 40px rgba(0, 191, 255, 0.3);
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 191, 255, 0.4);
}

.login-modal-content a {
    color: rgba(0, 191, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 8px;
}

.login-modal-content a:hover {
    color: #00bfff;
    background: rgba(0, 191, 255, 0.1);
    transform: translateX(-3px);
}

/* ==================== LOGIN LOADING ANIMATION ==================== */
.login-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 50%, rgba(15, 52, 96, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
    animation: fadeOut 0.5s ease-in-out 1.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #00bfff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #00bfff;
    animation-duration: 1.5s;
    animation-timing-function: linear;
}

.spinner-ring:nth-child(2) {
    border-top-color: #0080ff;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    border-top-color: #00d4ff;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-duration: 1s;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
}

.loading-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00bfff, transparent);
    border-radius: 2px;
    animation: expand 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes expand {
    0%, 100% {
        width: 50px;
        opacity: 0.5;
    }
    50% {
        width: 150px;
        opacity: 1;
    }
}

/* Enhanced modal animation when loading completes */
.modal.show {
    animation: modalFadeIn 0.6s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.dashboard-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px 20px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
}
.dashboard-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}
.logout-btn {
    padding: 10px 20px;
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.logout-btn:hover {
    background-color: #ff1a1a;
    transform: translateY(-2px);
}
.dashboard-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    border: 2px solid rgba(255, 193, 7, 0.5);
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 20px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    animation: slideIn 0.3s ease-out;
}
.dashboard-warning strong {
    color: #ffc107;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.dashboard-tabs {
    display: flex;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    z-index: 10;
}
.dashboard-tab {
    padding: 12px 25px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dashboard-tab:hover {
    background-color: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}
.dashboard-tab.active {
    background-color: rgba(249, 115, 22, 0.3);
    border-color: #f97316;
    color: #f97316;
}
.dashboard-content {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 20px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
.file-editor {
    display: none;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.file-editor.active-editor {
    display: block;
}
.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}
.content-subtab {
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.content-subtab:hover {
    background-color: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    color: #f97316;
}
.content-subtab.active {
    background-color: rgba(249, 115, 22, 0.3);
    border-color: #f97316;
    color: #f97316;
}
.content-section {
    display: none;
}
.content-section.active-content {
    display: block;
}
.file-editor h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f97316;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}
.editor-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.editor-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.editor-field label {
    color: #fff;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.editor-field input,
.editor-field textarea {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Courier New', monospace;
}
.editor-field input:focus,
.editor-field textarea:focus {
    border-color: #f97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}
.editor-field textarea {
    min-height: 150px;
    resize: vertical;
}
.save-btn {
    padding: 12px 30px;
    background-color: #f97316;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
    margin-top: 10px;
}
.save-btn:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}
.success-message {
    color: #00ff00;
    padding: 10px;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 5px;
    margin-top: 10px;
    display: none;
}
.success-message.show {
    display: block;
}
.error-message {
    color: #ff4444;
    padding: 10px;
    background-color: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 5px;
    margin-top: 10px;
    display: none;
}
.editor-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.field-group {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}
.field-group-title {
    color: #f97316;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.array-item {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}
.array-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.remove-item-btn {
    padding: 5px 15px;
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.remove-item-btn:hover {
    background-color: #ff1a1a;
}
.add-item-btn {
    padding: 8px 20px;
    background-color: #f97316;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
.add-item-btn:hover {
    background-color: #ea580c;
}

.cave-marker {
    transition: transform 0.2s ease, z-index 0.2s ease;
}

.cave-marker:hover {
    filter: brightness(1.3);
}

#custom-caves-map-container {
    max-height: 70vh;
    overflow: auto;
}

#dashboard-custom-caves-map-container {
    max-height: 70vh;
    overflow: auto;
}
