:root {
    --bg-color: #f3f4f6; /* Matching your User Manager */
    --text-main: #111827;
    --text-sub: #6b7280;
    
    /* Branding - Indigo/Purple */
    --brand-primary: #4f46e5;
    --brand-light: #e0e7ff;
    --brand-dark: #3730a3;
    
    /* Status Colors */
    --success-bg: #dcfce7;
    --success-text: #166534;
    --success-dot: #22c55e;
    
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --error-dot: #ef4444;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

header p {
    color: var(--text-sub);
    font-size: 1.1rem;
    margin: 0;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 1rem;
    opacity: 0.7;
}

/* --- Grid Layout --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* --- The Bubble Card --- */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Card Styles: Operational (Purple Theme) --- */
.card.operational {
    border-color: transparent;
}
.card.operational:hover {
    border-color: var(--brand-light);
}

/* --- Card Styles: Critical (Red Theme) --- */
.card.critical {
    border-color: var(--error-dot);
    background-color: #fff1f2;
    animation: pulse-red 2s infinite;
}

/* --- Card Content --- */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-icon {
    font-size: 2rem;
    background: var(--bg-color);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.service-info h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.url-preview {
    font-size: 0.85rem;
    color: var(--text-sub);
}

.card-body {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* --- Status Badges --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Operational Badge */
.status-badge.success {
    background-color: var(--success-bg);
    color: var(--success-text);
}
.status-badge.success .dot {
    background-color: var(--success-dot);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Error Badge */
.status-badge.error {
    background-color: var(--error-bg);
    color: var(--error-text);
}
.status-badge.error .dot {
    background-color: var(--error-dot);
    animation: blink 1.5s infinite;
}

.error-detail {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--error-text);
    font-family: monospace;
    background: rgba(255,255,255,0.5);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

/* --- Buttons --- */
.launch-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--brand-primary);
    color: white;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.launch-btn:hover {
    background-color: var(--brand-dark);
}

/* --- Animations --- */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .container { padding: 1rem; }
    header h1 { font-size: 2rem; }
}
