@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
    font-family: 'Orbitron', sans-serif;
    background: #0a0e1a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Effects */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.background-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(0, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 40px 40px;
    z-index: 0;
    animation: dotPulse 4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Background Planets */
.background-planets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.planet {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: planetFloat 20s ease-in-out infinite;
}

@keyframes planetFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Planet 1 - Large orange planet (top right) */
.planet-1 {
    top: 8%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 140, 0, 0.5), rgba(139, 69, 19, 0.3));
    box-shadow: 
        0 0 40px rgba(255, 140, 0, 0.4),
        inset -20px -20px 40px rgba(0, 0, 0, 0.3);
    animation: planetFloat 25s ease-in-out infinite;
}

/* Planet 2 - Small cyan planet (bottom right) */
.planet-2 {
    bottom: 15%;
    right: 8%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.4), rgba(0, 100, 150, 0.3));
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset -15px -15px 30px rgba(0, 0, 0, 0.3);
    animation: planetFloat 18s ease-in-out infinite 2s;
}

/* Planet 3 - Medium purple planet (top left background) */
.planet-3 {
    top: 12%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.4), rgba(75, 0, 130, 0.3));
    box-shadow: 
        0 0 35px rgba(138, 43, 226, 0.3),
        inset -18px -18px 35px rgba(0, 0, 0, 0.3);
    animation: planetFloat 22s ease-in-out infinite 4s;
}

/* Planet 4 - Tiny red planet (middle right) */
.planet-4 {
    top: 45%;
    right: 5%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 69, 0, 0.4), rgba(139, 0, 0, 0.3));
    box-shadow: 
        0 0 25px rgba(255, 69, 0, 0.3),
        inset -12px -12px 25px rgba(0, 0, 0, 0.3);
    animation: planetFloat 16s ease-in-out infinite 1s;
}

/* Planet 5 - Large green planet (bottom left) */
.planet-5 {
    bottom: 10%;
    left: 12%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 38% 38%, rgba(0, 255, 136, 0.4), rgba(0, 100, 68, 0.3));
    box-shadow: 
        0 0 38px rgba(0, 255, 136, 0.3),
        inset -20px -20px 38px rgba(0, 0, 0, 0.3);
    animation: planetFloat 20s ease-in-out infinite 3s;
}

/* Add rings to some planets */
.planet-1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 140, 0, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.2);
}

.planet-5::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    width: 160px;
    height: 160px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90vh;
    padding: 0 40px;
}

/* Globe */
.globe-container {
    position: absolute;
    left: 100px;
    width: 240px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.globe {
    position: relative;
    width: 220px;
    height: 220px;
    border: 4px solid #00ffff;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 100, 150, 0.3), rgba(0, 30, 60, 0.8));
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 40px rgba(0, 255, 255, 0.3);
    animation: globeGlow 3s ease-in-out infinite;
    padding: 12px;
}

.globe-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: 
        radial-gradient(circle at 60% 40%, transparent 30%, rgba(0, 255, 255, 0.2) 60%),
        repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(0, 255, 255, 0.1) 10px, rgba(0, 255, 255, 0.1) 11px);
    position: relative;
    overflow: hidden;
}

.globe-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    width: 140%;
    height: 140%;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

@keyframes globeGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), inset 0 0 40px rgba(0, 255, 255, 0.3); }
    50% { box-shadow: 0 0 50px rgba(0, 255, 255, 1), inset 0 0 50px rgba(0, 255, 255, 0.5); }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.header-section {
    position: relative;
}

.main-title {
    position: relative;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 8px;
    text-align: center;
    color: #ffffff;
    text-shadow: 
        0 0 15px rgba(0, 255, 255, 1),
        0 0 30px rgba(0, 255, 255, 0.8),
        0 0 45px rgba(0, 255, 255, 0.6);
    border: 4px solid #00ffff;
    padding: 25px 50px;
    background: rgba(0, 20, 40, 0.7);
    clip-path: polygon(
        25px 0, calc(100% - 25px) 0, 100% 25px,
        100% calc(100% - 25px), calc(100% - 25px) 100%, 25px 100%,
        0 calc(100% - 25px), 0 25px
    );
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.6),
        inset 0 0 30px rgba(0, 255, 255, 0.2);
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { 
        text-shadow: 
            0 0 10px rgba(0, 255, 255, 0.8),
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 30px rgba(0, 255, 255, 0.4);
    }
    50% { 
        text-shadow: 
            0 0 15px rgba(0, 255, 255, 1),
            0 0 30px rgba(0, 255, 255, 0.8),
            0 0 45px rgba(0, 255, 255, 0.6);
    }
}

/* Server List Container */
.server-list-container {
    position: relative;
    border: 4px solid #00ffff;
    background: rgba(0, 20, 40, 0.7);
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    clip-path: polygon(
        35px 0, calc(100% - 35px) 0, 100% 35px,
        100% calc(100% - 35px), calc(100% - 35px) 100%, 35px 100%,
        0 calc(100% - 35px), 0 35px
    );
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.5),
        inset 0 0 40px rgba(0, 255, 255, 0.15);
}

.table-header {
    position: relative;
}

/* Scanning line effect moved to a pseudo element on table-header */
.table-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00ffff 30%, 
        #00ffff 70%, 
        transparent 100%);
    box-shadow: 0 0 15px rgba(0, 255, 255, 1);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 25px 40px;
    background: rgba(0, 255, 255, 0.15);
    border-bottom: 3px solid #00ffff;
}

.header-item {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 1);
    position: relative;
}

.header-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, transparent);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}

.server-list-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px;
}

.no-servers {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 6px;
    color: #ff3366;
    text-shadow: 
        0 0 15px rgba(255, 51, 102, 1),
        0 0 30px rgba(255, 51, 102, 0.8),
        0 0 45px rgba(255, 51, 102, 0.6);
    animation: redPulse 2s ease-in-out infinite;
}

@keyframes redPulse {
    0%, 100% { 
        color: #ff3366;
        text-shadow: 
            0 0 15px rgba(255, 51, 102, 1),
            0 0 30px rgba(255, 51, 102, 0.8),
            0 0 45px rgba(255, 51, 102, 0.6);
        opacity: 0.7;
    }
    50% { 
        color: #ff0033;
        text-shadow: 
            0 0 25px rgba(255, 0, 51, 1),
            0 0 50px rgba(255, 0, 51, 1),
            0 0 75px rgba(255, 0, 51, 0.8);
        opacity: 1;
    }
}

/* Buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.game-button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    padding: 22px 60px;
    background: rgba(0, 20, 40, 0.7);
    border: 4px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    position: relative;
    clip-path: polygon(
        20px 0, calc(100% - 20px) 0, 100% 20px,
        100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%,
        0 calc(100% - 20px), 0 20px
    );
    transition: all 0.3s ease;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.15);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.game-button:hover {
    background: rgba(0, 255, 255, 0.25);
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 1),
        inset 0 0 25px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 15px rgba(0, 255, 255, 1);
    transform: translateY(-5px) scale(1.05);
}

.game-button:hover::before {
    left: 100%;
}

.game-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 15px rgba(0, 255, 255, 0.2);
}

.join-btn {
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.4),
        inset 0 0 15px rgba(0, 255, 136, 0.15);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.join-btn::before {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
}

.join-btn:hover {
    background: rgba(0, 255, 136, 0.25);
    box-shadow: 
        0 0 50px rgba(0, 255, 136, 1),
        inset 0 0 25px rgba(0, 255, 136, 0.4);
    text-shadow: 0 0 15px rgba(0, 255, 136, 1);
}

/* Decorative corner elements */
.server-list-container::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-right: 4px solid #00ffff;
    border-bottom: 4px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    animation: cornerPulse 2s ease-in-out infinite;
}

/* Additional top-left corner - moved to avoid clash with header */
.main-title::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    border-left: 4px solid #00ffff;
    border-top: 4px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    animation: cornerPulse 2s ease-in-out infinite;
    z-index: 1;
}

.main-title {
    position: relative;
}

@keyframes cornerPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .main-title {
        font-size: 2.5rem;
        padding: 15px 30px;
    }

    .table-header {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        font-size: 0.9rem;
    }

    .no-servers {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .table-header {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        font-size: 0.8rem;
    }

    .header-item:nth-child(n+3) {
        display: none;
    }

    .button-container {
        flex-direction: column;
        gap: 20px;
    }

    .game-button {
        width: 100%;
        font-size: 1rem;
        padding: 15px 30px;
    }
}

