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

:root {
    --primary-red: #ff0000;
    --dark-red: #cc0000;
    --light-red: #ff4444;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: rgba(20, 20, 20, 0.95);
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --text-dark: #666666;
    --glow-red: 0 0 20px rgba(255, 0, 0, 0.5);
    --glow-strong: 0 0 30px rgba(255, 0, 0, 0.8);
}

body {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 50%, #1a0000 100%);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    background-attachment: fixed;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 0, 0, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    z-index: -1;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 0, 0, 0.9) 100%);
    border: 2px solid var(--primary-red);
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: var(--glow-red);
    backdrop-filter: blur(10px);
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.logo {
    max-width: 180px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--primary-red);
    box-shadow: var(--glow-strong);
    position: relative;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-red) 0%, transparent 70%);
    opacity: 0.3;
    border-radius: 50%;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.2; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 0.4; transform: translate(-50%, -50%) scale(1.1); }
}

.server-name {
    font-size: 3.5em;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(45deg, var(--text-light), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.server-status {
    position: absolute;
    top: 30px;
    right: 30px;
}

.status-online, .status-offline {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9em;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.status-online {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.status-offline {
    color: var(--primary-red);
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--primary-red);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.status-pulse {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.status-online .status-pulse {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

.status-offline .status-pulse {
    background: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 18px 35px;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.connect-btn {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    box-shadow: 0 5px 25px rgba(255, 0, 0, 0.4);
}

.connect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(255, 0, 0, 0.6);
    background: linear-gradient(135deg, var(--light-red) 0%, var(--primary-red) 100%);
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 2px solid var(--primary-red);
}

.refresh-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.connect-btn:hover .btn-glow {
    left: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--glow-red);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-strong);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-red);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.main-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-red);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glow-red);
    backdrop-filter: blur(10px);
}

.card-header {
    margin-bottom: 25px;
}

.card-header h2 {
    color: var(--text-light);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.4em;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.card-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
    border-radius: 2px;
}

/* Players List */
.players-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.player-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.player-item:hover {
    background: rgba(255, 0, 0, 0.1);
    transform: translateX(5px);
}

.player-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.player-id {
    background: var(--primary-red);
    color: #000;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    margin-right: 15px;
    font-size: 0.8em;
    min-width: 60px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

.player-name {
    color: var(--text-light);
    flex-grow: 1;
    font-weight: 500;
}

.player-ping {
    color: var(--text-gray);
    font-size: 0.9em;
    margin-left: 10px;
    font-family: 'Orbitron', sans-serif;
}

/* Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
}

.label {
    color: var(--text-gray);
    font-weight: 500;
}

.value {
    color: var(--text-light);
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
}

/* Loading and Error States */
.loading {
    text-align: center;
    color: var(--primary-red);
    font-size: 1.1em;
    padding: 30px;
    font-style: italic;
    font-family: 'Orbitron', sans-serif;
}

.error {
    text-align: center;
    color: var(--primary-red);
    background: rgba(255, 0, 0, 0.1);
    padding: 20px;
    border: 1px solid var(--primary-red);
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 500;
}

.success {
    text-align: center;
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 20px;
    border: 1px solid #00ff00;
    border-radius: 10px;
    margin: 10px 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 0, 0, 0.9) 100%);
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--glow-red);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
}

.footer-info {
    text-align: right;
}

.server-address {
    margin-bottom: 10px;
}

.address-label {
    color: var(--text-gray);
    font-size: 0.9em;
}

.address-value {
    color: var(--text-light);
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    margin-left: 10px;
}

.copyright {
    color: var(--text-dark);
    font-size: 0.8em;
}

/* Scrollbar */
.players-list::-webkit-scrollbar {
    width: 8px;
}

.players-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb:hover {
    background: var(--light-red);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .server-name {
        font-size: 2.5em;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .server-status {
        position: static;
        margin-top: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .server-name {
        font-size: 2em;
    }
    
    .main-card {
        padding: 20px;
    }
}