/* Reset & Base */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glow: 0 0 20px rgba(99, 102, 241, 0.5);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

/* Hero Section */
.finder-hero {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease-out;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search Box */
.search-wrapper {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.input-group {
    display: flex;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 24px;
    color: var(--text);
    font-size: 1.1rem;
    font-family: var(--font-mono);
    outline: none;
}

input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

button#searchBtn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

button#searchBtn:hover {
    background: var(--primary-dark);
}

.input-hint {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--accent);
}

/* Result Card */
.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    margin-top: 40px;
    animation: slideUp 0.5s ease-out;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.server-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.server-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.server-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

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

.stat-box {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.stat-value.mono {
    font-family: var(--font-mono);
    color: var(--accent);
}

.stat-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy-mini {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.copy-mini:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

/* Connect Command Box */
.connect-box {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.connect-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.command-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.command-row code {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
    overflow-x: auto;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

/* Players Section */
.section-divider {
    display: flex;
    align-items: center;
    margin: 40px 0 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider span {
    padding: 0 16px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.player-card:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.player-ping {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
}

/* SEO Content */
.seo-content {
    margin-top: 80px;
    padding: 40px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.seo-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text);
}

.seo-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.features-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text);
}

.f-icon {
    font-size: 1.5rem;
}

/* Footer */
.app-footer {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lang-select select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Utilities */
.hidden { display: none !important; }

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

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

.loading-state, .error-state {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    margin-top: 40px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .navbar { flex-direction: column; gap: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .command-row { flex-direction: column; }
    .copy-btn { width: 100%; }
    .features-list { flex-direction: column; align-items: flex-start; }
}