:root {
    --primary: #00a9ff;
    --secondary: #1a1a1a;
    --background: #171717;
    --card-bg: #1d1d1d;
    --text: #ffffff;
    --text-secondary: #999999;
    --border: #2a2a2a;
    --hover: #252525;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background: var(--background);
    color: var(--text);
}

#app {
    min-height: 100vh;
}

header {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary);
}

main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

input, select {
    padding: 0.75rem 1rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 140, 0.1);
}

input {
    flex: 1;
}

.servers-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    perspective: 1000px;
}

.server-card {
    background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary) 100%);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns:  auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    transform-origin: center top;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.server-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.server-card:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 169, 255, 0.1);
}

.server-card:hover::before {
    opacity: 1;
}

.server-card:nth-child(1) { animation-delay: 0.1s; }
.server-card:nth-child(2) { animation-delay: 0.2s; }
.server-card:nth-child(3) { animation-delay: 0.3s; }
.server-card:nth-child(4) { animation-delay: 0.4s; }
.server-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-5deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.server-info h3 {
    margin-bottom: 0;
    color: var(--text);
    font-size: 1rem;
}

.server-ip {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    background: var(--secondary);
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-block;
}

.server-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    margin: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.players, .map {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.server-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.server-tag {
    padding: 0.1rem 0.4rem;
    background: rgba(0, 255, 140, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 500;
}

.server-name {
    padding-right: 0rem;
}

.copy-ip {
    position: relative;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-left: 0.5rem;
}

.copy-ip:hover {
    opacity: 1;
}

.server-ranks {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.rank-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

.connect-btn {
    height: fit-content;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(145deg, var(--primary) 0%, #0088cc 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    box-shadow: 0 4px 15px rgba(0, 169, 255, 0.3);
    font-size: 0.8rem;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 169, 255, 0.4);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary) 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.top-servers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-server-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr repeat(3, auto);
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--border);
}

.rank-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    width: 60px;
    text-align: center;
}

.detailed-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 169, 255, 0.1);
    transform: translateY(-1px);
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--primary);
    color: var(--background);
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    animation: fade 1.5s ease-in-out infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--hover) 50%, var(--card-bg) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.status-online {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.status-offline {
    background: #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease forwards;
}

.toast-success {
    background: #00ff88;
}

.toast-error {
    background: #ff3366;
}

.toast-info {
    background: var(--primary);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .filters {
        flex-direction: column;
    }
    
    main {
        padding: 0 1rem;
    }
    
    .server-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .server-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}