@font-face {
    font-family: 'CustomFont';
    src: url('assets/font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #fff;
    user-select: none;
    font-family: 'CustomFont', Poppins, sans-serif;
}

body {
    background: #111;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'CustomFont', Poppins, sans-serif;
}

.desert-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(to bottom, #111 0, #222 100%);
    overflow: hidden;
}

.dune {
    position: absolute;
    bottom: 0;
    width: 300%;
    height: 150px;
    background: linear-gradient(90deg, #1a1a1a 0, #2a2a2a 50%, #1a1a1a 100%);
    animation: 60s linear infinite duneMove;
}

.dune:first-child {
    height: 200px;
    bottom: 50px;
    opacity: .8;
    animation-duration: 80s;
}

.dune:nth-child(2) {
    height: 180px;
    bottom: 30px;
    opacity: .6;
    animation-duration: 100s;
    animation-direction: reverse;
}

.dune:nth-child(3) {
    height: 160px;
    bottom: 10px;
    opacity: .4;
    animation-duration: 120s;
}

@keyframes duneMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.star {
    position: absolute;
    background-color: #444;
    border-radius: 50%;
    animation: 5s infinite alternate twinkle;
}

@keyframes twinkle {
    0% { opacity: .2; }
    100% { opacity: .8; }
}

.main-panel {
    background-color: rgba(30, 30, 30, .7);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 30px;
    width: fit-content;
    min-width: 450px;
    max-width: 90vw;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 0, 0, .5);
    transform: scale(.9) translateY(20px);
    opacity: 0;
    transition: 1s cubic-bezier(.175, .885, .32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.main-panel.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.main-panel:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, .1);
}

.main-panel.active:hover {
    transform: perspective(1000px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)) scale(1);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transform: translateX(-50px);
    opacity: 0;
    transition: .8s .3s;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
}

.main-panel.active .profile-header {
    transform: translateX(0);
    opacity: 1;
}

.profile-picture-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    min-width: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    transition: transform .5s;
    transform: scale(0);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.main-panel.active .profile-picture {
    transform: scale(1);
}

.avatar-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 112px;
    height: 112px;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 999;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-panel.active .avatar-decoration {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #1e1e1e;
    padding: 0.5px;
    object-fit: contain;
    border: 1px solid #1e1e1e;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform .3s, opacity .3s;
    z-index: 1000;
    transform: scale(0);
    opacity: 0;
}

.main-panel.active .status-indicator {
    transform: scale(1);
    opacity: 1;
}

.username {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: .8s .4s;
    font-family: 'CustomFont', Orbitron, sans-serif;
    text-decoration: none;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 8px rgba(255, 255, 255, .5);
    white-space: nowrap;
    flex-shrink: 0;
}

.main-panel.active .username {
    transform: translateY(0);
    opacity: 1;
}

.username::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: scaleX(0);
    transition: transform .3s;
}

.username:hover::after {
    transform: scaleX(1);
}

.username:hover {
    text-shadow: 0 0 12px rgba(255, 255, 255, .8);
}

.servers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateY(30px);
    opacity: 0;
    transition: .8s .6s;
    width: 100%;
}

.main-panel.active .servers-container {
    transform: translateY(0);
    opacity: 1;
}

.server-card {
    background-color: rgba(40, 40, 40, .8);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, .1);
    text-decoration: none;
    transform: translateX(30px);
    opacity: 0;
    min-width: 400px;
}

.main-panel.active .server-card {
    transform: translateX(0);
    opacity: 1;
}

.server-card:hover {
    transform: translateY(-5px) !important;
    background-color: rgba(70, 70, 70, .9);
    border-color: #888;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .6);
}

.server-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #666;
    transition: box-shadow .3s;
    flex-shrink: 0;
}

.server-card:hover .server-logo {
    box-shadow: 0 0 15px rgba(255, 255, 255, .1);
}

.server-info {
    flex: 1;
    min-width: 0;
}

.server-name {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #ddd;
    transition: color .3s;
    white-space: nowrap;
}

.server-card:hover .server-name {
    color: #fff;
}

.server-stats {
    display: flex;
    gap: 15px;
    font-size: .9rem;
    color: #aaa;
    font-family: 'Poppins', Arial, Helvetica, sans-serif !important;
}

.server-stats,
.server-stats * {
    font-family: 'Poppins', Arial, Helvetica, sans-serif !important;
}

.server-stats i,
.server-stats .fas,
.server-stats .far,
.server-stats .fab,
.server-stats .fa,
.server-stats [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.server-stats i::before,
.server-stats [class*="fa-"]::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.online-count {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3ba55c;
    margin-right: 5px;
    animation: 2s infinite pulse-dot;
    box-shadow: 0 0 5px #3ba55c;
    flex-shrink: 0;
}

.join-button {
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    transition: .3s;
    transform: scale(.9);
    opacity: .8;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    flex-shrink: 0;
    margin-left: 10px;
    font-family: 'CustomFont', Poppins, sans-serif;
}

.join-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, 0) 55%);
    transform: rotate(30deg);
    opacity: 0;
    transition: .5s;
}

.server-card:hover .join-button {
    background-color: #555;
    transform: scale(.9);
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 255, 255, .2);
}

.server-card:hover .join-button::before {
    animation: 1.5s shine;
}

@keyframes shine {
    0% {
        transform: rotate(30deg) translate(-30%, -30%);
        opacity: 0;
    }
    20% { opacity: .5; }
    100% {
        transform: rotate(30deg) translate(30%, 30%);
        opacity: 0;
    }
}

.enter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.enter-text {
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    animation: 2s infinite pulse;
    color: #fff;
    transition: .5s;
    font-family: 'CustomFont', Poppins, sans-serif;
}

@keyframes pulse {
    0%, 100% { opacity: .7; }
    50% { opacity: 1; }
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: .7;
        box-shadow: 0 0 5px #3ba55c;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 10px #3ba55c;
    }
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: .15;
    display: none;
}

@media (max-width: 600px) {
    .main-panel {
        min-width: unset;
        width: 95vw;
        padding: 20px;
    }

    .username {
        font-size: 1.5rem;
    }

    .profile-picture-wrapper {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }

    .profile-picture {
        width: 70px;
        height: 70px;
        min-width: 70px;
        border: none;
    }

    .avatar-decoration {
        width: 80px;
        height: 80px;
    }

    .status-indicator {
        width: 22px;
        height: 22px;
        border-width: 1px;
        padding: 0.5px;
        bottom: 1px;
        right: 1px;
    }

    .server-card {
        min-width: unset;
        width: 100%;
    }

    .server-stats {
        flex-direction: column;
        gap: 5px;
    }
}