/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-container {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.logo-text {
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.nav-brand h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(45deg, #7df9ff, #0067a7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: #d0d0d0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(125, 249, 255, 0.1);
    color: #7df9ff;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(90deg, #0067a7, #7df9ff);
    z-index: 9999;
    transform: translateZ(0);
    will-change: width;
    transition: none;
}

#progressBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(90deg, #0067a7, #7df9ff);
    z-index: 9999;
    transform: translateZ(0);
    will-change: width;
    transition: none;
}

/* Top Status Overview */
.status-overview-top {
    background: rgba(15, 15, 15, 0.95);
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    margin-top: 5px;
    /* Account for progress bar */
}

.status-overview-top .status-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.status-overview-top .status-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 140px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-overview-top .status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(125, 249, 255, 0.15);
}

.status-overview-top .status-number {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #7df9ff;
    margin-bottom: 0.3rem;
}

.status-overview-top .status-label {
    font-size: 0.85rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    /* padding: 3rem 0; */
    margin-bottom: 3rem;
}

.hero h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #7df9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 1rem;
}

.hero-actions {
    margin-bottom: 2rem;
}

.refresh-btn {
    background: linear-gradient(135deg, #7df9ff, #0067a7);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(125, 249, 255, 0.3);
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Status Overview */
.status-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.status-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(125, 249, 255, 0.2);
}

.status-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #7df9ff;
    margin-bottom: 0.5rem;
}

.status-label {
    color: #b0b0b0;
    font-weight: 500;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #333;
    transition: background 0.3s ease;
}

.service-card.up::before {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.service-card.down::before {
    background: linear-gradient(90deg, #F44336, #EF5350);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

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

.service-icon {
    /* width: 50px; */
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.service-icon img {
    max-width: 100px;
    height: 100%;
    /* object-fit: cover; */
}

.service-icon-fallback {
    background: linear-gradient(135deg, #7df9ff, #0067a7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border-radius: 8px;
}

.service-info {
    flex: 1;
}

.service-info h3 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.service-port {
    color: #888;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

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

.service-status i {
    font-size: 1.2rem;
}

.service-card.up .service-status {
    color: #4CAF50;
}

.service-card.down .service-status {
    color: #F44336;
}

.service-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 1rem 0;
    color: #ffcccb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.last-checked {
    color: #888;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.connect-btn {
    background: linear-gradient(45deg, #0067a7, #7df9ff);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(125, 249, 255, 0.3);
}

.connect-btn.btn-discord {
    background: linear-gradient(45deg, #5865F2, #7289da);
}

.connect-btn.btn-discord:hover {
    background: linear-gradient(45deg, #4752C4, #5865F2);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

/* Servers Page Styles */
.game-categories {
    margin-top: 2rem;
}

.category-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    color: #d0d0d0;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(45deg, #0067a7, #7df9ff);
    color: white;
    border-color: #7df9ff;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.server-card {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.banner-placeholder {
    background: linear-gradient(135deg, #0f1419, #1a2030);
    border: 2px dashed #7df9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7df9ff;
    font-size: 1.2rem;
    opacity: 0.7;
    text-align: center;
    padding: 20px;
}

.server-image {
    position: relative;
    /* height: 200px; */
    min-height: 100px;
    overflow: hidden;
}

.server-image img {
    width: 100%;
    /* height: 180px; */
    max-height: 180px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.server-card:hover .server-image img {
    transform: scale(1.05);
}

.server-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.server-status {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.server-status.online {
    color: #4CAF50;
}

.server-status.offline {
    color: #F44336;
}

.server-content {
    padding: 1.25rem;
}

.server-content h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.server-description {
    color: #b0b0b0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.server-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #d0d0d0;
    font-size: 0.9rem;
}

.detail-item i {
    width: 16px;
    color: #7df9ff;
}

.server-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(45deg, #0067a7, #7df9ff);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(125, 249, 255, 0.3);
}

.btn-secondary {
    background: rgba(60, 60, 60, 0.8);
    color: #d0d0d0;
    border: 1px solid #555;
}

.btn-secondary:hover {
    background: rgba(80, 80, 80, 0.8);
    color: white;
}

.btn-discord {
    background: linear-gradient(45deg, #5865F2, #7289da);
    color: white;
}

.btn-discord:hover {
    background: linear-gradient(45deg, #4752C4, #5865F2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.btn-website {
    background: linear-gradient(45deg, #6C757D, #495057);
    color: white;
}

.btn-website:hover {
    background: linear-gradient(45deg, #495057, #343A40);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* For connect-btn variants */
.connect-btn.btn-website {
    background: linear-gradient(45deg, #6C757D, #495057);
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.connect-btn.btn-website:hover {
    background: linear-gradient(45deg, #495057, #343A40);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #333;
    border-radius: 16px;
    width: 80%;
    max-width: 600px;
    position: relative;
    backdrop-filter: blur(10px);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #fff;
}

/* Footer */
.footer {
    background: rgba(20, 20, 20, 0.95);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #333;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #888;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #7df9ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .services-grid,
    .servers-grid {
        grid-template-columns: 1fr;
    }

    .service-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }

    .status-overview-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .status-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .status-overview-top {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1rem;
    }

    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .service-status {
        align-self: flex-end;
    }
}