/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header styles */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.app-logo {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.app-title {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Service cards grid */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Service card styles */
.service-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.service-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Service card content */
.service-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.service-card__title {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.service-card__status {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-card__status--active {
    background: #d4edda;
    color: #155724;
}

.service-card__status--inactive {
    background: #f8d7da;
    color: #721c24;
}

.service-card__status--maintenance {
    background: #fff3cd;
    color: #856404;
}

.service-card__description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

.service-card__version {
    font-size: 0.9rem;
    color: #888;
    font-family: 'Monaco', 'Consolas', monospace;
}

.service-card__port {
    font-size: 0.9rem;
    color: #667eea;
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    margin-left: 0.5rem;
}

.service-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-card__tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.service-card__actions {
    margin-top: auto;
}

.service-card__button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.service-card__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.service-card__button:active {
    transform: translateY(0);
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Error message */
.error-message {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.error-details {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.error-retry {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.error-retry:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .service-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .service-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 1.5rem 1rem;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #333;
    }
    
    .service-card__button {
        border: 2px solid #333;
    }
}
