:root {
    --primary: #3a86ff;
    --secondary: #e63946;
    --dark: #121212;
    --darker: #0a0a0a;
    --light: #f8f9fa;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--darker);
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--light);
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.service-card {
    background: var(--dark);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.service-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.service-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.service-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: white;
}

.service-url {
    color: var(--gray);
    font-size: 0.9rem;
    word-break: break-all;
    margin-top: auto;
    margin-bottom: 1rem;
}

.service-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), rgba(230, 57, 70, 0.7));
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
    border: none;
}

.service-btn:hover {
    background: linear-gradient(135deg, #2a75e6, rgba(230, 57, 70, 0.8));
    transform: translateY(-2px);
}

.service-btn.disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.section-title {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.subsection-title {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
    color: white;
}

.server-list {
    background: var(--dark);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.server-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.server-name {
    font-weight: 500;
}

.server-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.server-link:hover {
    text-decoration: underline;
}

.server-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.tag-blacklisted {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.tag-offline {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.tag-lobby {
    background-color: rgba(58, 134, 255, 0.2);
    color: var(--primary);
    border: 1px solid rgba(58, 134, 255, 0.3);
    margin-left: 0.5rem;
}

.server-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Login form styles */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-form {
    background: var(--dark);
    padding: 2rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.login-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-badge {
    background: var(--success);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-badge {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.login-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
}

/* Hidden class for toggling content */
.hidden {
    display: none;
}
