/* Servers Page Styles - Hyper Launcher */

/* Import Google Fonts with optimized loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* CSS Custom Properties */
:root {
    /* Color Palette */
    --primary: #1E293B;
    --primary-light: #334155;
    --primary-dark: #0F172A;
    --accent: #FFFFFF;
    --accent-light: #F8FAFC;
    --background-primary: #000000;
    --background-secondary: #0F172A;
    --background-tertiary: #1E293B;
    --background-card: #334155;
    --text-primary: #FFFFFF;
    --text-secondary: #E2E8F0;
    --text-muted: #94A3B8;
    --border-primary: #475569;
    --border-accent: rgba(255, 255, 255, 0.2);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide scrollbars */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-primary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    transition: all 0.3s ease;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 32px;
    height: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1);
}

.logo:hover {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4)) brightness(1.2);
}

.site-name {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.site-name:hover {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

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

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.launcher-button.nav-play-now {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-primary);
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
}

.launcher-button.nav-play-now:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: var(--text-primary);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Content */
.main-container {
    min-height: 100vh;
    padding-top: 70px;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.page-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Server Grid */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(650px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

/* Server Cards */
.server-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.server-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    background: rgba(30, 41, 59, 0.98);
}

.server-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.server-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.server-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    animation: statusPulse 2s infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

@keyframes statusPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.server-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.server-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition-fast);
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Copy-to-clipboard styles */
.copyable-text {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-block;
    font-size: 0.9rem;
    padding: 3px 8px;
    transition: var(--transition-fast);
    user-select: all;
}

.copyable-text:hover,
.copyable-text:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.copyable-text.copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

/* Ping indicator */
.ping-indicator {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-right: 0.5rem;
}

.ping-dot {
    background: #6b7280;
    border-radius: 50%;
    height: 6px;
    margin-right: 4px;
    width: 6px;
    box-shadow: 0 0 6px rgba(107, 114, 128, 0.5);
}

.ping-good { 
    background: #22c55e; 
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.ping-okay { 
    background: #f59e0b; 
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.ping-poor { 
    background: #ef4444; 
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* Loading states */
.loading {
    animation: loadingPulse 2s infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    color: white;
    content: attr(data-tooltip);
    font-size: 0.75rem;
    left: 50%;
    opacity: 0;
    padding: 4px 8px;
    pointer-events: none;
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    transition: opacity var(--transition-normal);
    white-space: nowrap;
    z-index: 1000;
}

.tooltip:hover::before,
.tooltip.show-tooltip::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .servers-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        max-width: 100%;
    }
    
    .main-container {
        max-width: 100%;
        padding: 1.5rem;
    }
}

@media (max-width: 900px) {
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .navbar {
        padding: 0 1.5rem;
        height: 60px;
    }
    
    .main-container {
        padding-top: 60px;
    }
    
    .navbar-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 20px 20px;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: var(--shadow-xl);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
    
    .navbar-right.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .main-container {
        padding-top: 60px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.125rem;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .server-card {
        padding: 1.5rem;
    }
    
    .server-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .server-header {
        flex-direction: column;
        text-align: center;
    }
    
    .server-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .ping-indicator {
        display: none;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
body:not(.keyboard-nav) *:focus {
    outline: none;
}

body.keyboard-nav *:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Text selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
