:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1419;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-accent: #58a6ff;
    --border-color: #30363d;
    --esa-blue: #003d7a;
    --esa-blue-light: #0969da;
    --success-color: #2ea043;
    --warning-color: #d29922;
    --error-color: #da3633;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    background-image: radial-gradient(circle at 20% 30%, rgba(0, 61, 122, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Subtle starfield effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 60px 70px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90px 10px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    background-position: 0 0, 40px 60px, 70px 100px, 150px 50px;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Tab Navigation */
.tabs-navigation {
    margin-bottom: 2rem;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tabs-container {
    display: flex;
    gap: 0;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border-right: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.tab-item:last-child {
    border-right: none;
}

.tab-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.tab-item.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom: 2px solid var(--esa-blue);
}

.tab-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-label {
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.tab-badge {
    padding: 0.15rem 0.4rem;
    background: rgba(139, 148, 158, 0.2);
    color: var(--text-secondary);
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(139, 148, 158, 0.3);
}

@media (max-width: 768px) {
    .tab-item {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.75rem 1rem;
    }

    .tab-label {
        font-size: 0.7rem;
    }

    .tab-badge {
        font-size: 0.55rem;
    }
}

header {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--esa-blue);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-esa-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    opacity: 0.6;
    margin-bottom: 1rem;
    transition: opacity 0.2s ease;
}

.footer-esa-logo:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .footer-esa-logo {
        height: 28px;
    }
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.title-section p {
    color: var(--esa-blue-light);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

#status-text {
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

main {
    flex: 1;
}

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

.service-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--esa-blue);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--esa-blue-light);
    background: var(--bg-card-hover);
}

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

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

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
    padding: 10px;
}

.service-card:hover .service-icon {
    border-color: var(--esa-blue-light);
    background: var(--esa-blue);
    color: white;
}

.service-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.service-card:hover .service-logo {
    filter: brightness(0) invert(1) !important;
}

.service-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    position: relative;
    z-index: 2;
}

.service-status.checking {
    background: var(--warning-color);
}

.service-status.offline {
    background: var(--error-color);
}

.service-status.development {
    background: var(--text-secondary);
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    position: relative;
    z-index: 2;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.service-url {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    position: relative;
    z-index: 2;
}

.service-card:hover .service-url {
    color: var(--text-accent);
}

.service-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 61, 122, 0.2);
    color: var(--esa-blue-light);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
    border: 1px solid rgba(0, 61, 122, 0.3);
    position: relative;
    z-index: 2;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--esa-blue-light);
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    font-weight: 400;
}

.footer-mission {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    margin: 0.5rem 0 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .title-section h1 {
        font-size: 1.8rem;
    }

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

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Under Development styling */
.service-card.in-development {
    opacity: 0.75;
    position: relative;
}

.service-card.in-development::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(139, 148, 158, 0.03) 10px,
        rgba(139, 148, 158, 0.03) 20px
    );
    pointer-events: none;
}

.service-card.in-development:hover {
    opacity: 0.85;
    cursor: not-allowed;
}

.dev-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(139, 148, 158, 0.2);
    color: var(--text-secondary);
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
    border: 1px solid rgba(139, 148, 158, 0.3);
    vertical-align: middle;
}

/* Development Notice Page */
.development-notice {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--esa-blue);
}

.dev-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.development-notice h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    font-weight: 600;
}

.dev-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.dev-features {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 6px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.dev-features h3 {
    color: var(--esa-blue-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-features ul {
    list-style: none;
    padding: 0;
}

.dev-features li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.dev-features li:last-child {
    border-bottom: none;
}

.dev-features li::before {
    content: '▸ ';
    color: var(--esa-blue-light);
    font-weight: bold;
    margin-right: 0.5rem;
}

.back-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--esa-blue);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid var(--esa-blue-light);
}

.back-button:hover {
    background: var(--esa-blue-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
