/* ===========================
   PLAYER AVATARS & TOOLTIP
   =========================== */
.player-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.player-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid theme('colors.white');
    background-color: theme('colors.gray.200');
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out, z-index 0.2s ease-in-out, border-color 0.2s ease-in-out;
    cursor: pointer;
}

.player-avatar:hover {
    transform: translateY(-5px);
    z-index: 20;
}

.player-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-avatar::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--tooltip-bg);
    color: var(--tooltip-text); 
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    transition: opacity 0.2s ease; 
}

.player-avatar::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: var(--tooltip-bg); 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Show Tooltip on Hover */
.player-avatar:hover::after,
.player-avatar:hover::before {
    opacity: 1;
}

/* Base image styling */
.player-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* +N Avatar */
.player-avatar.plus-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    border: 2px dashed theme('colors.gray.400');
    background-color: theme('colors.gray.100');
    color: theme('colors.gray.600');
}

/* Dark Mode Adjustments */
.dark .player-avatar {
    border-color: theme('colors.gray.800');
    background-color: theme('colors.gray.600');
}

.dark .player-avatar.plus-avatar {
    border-color: theme('colors.gray.600');
    background-color: theme('colors.gray.700');
    color: theme('colors.gray.300');
}

/* ===========================
   SERVER ICON
   =========================== */
.server-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

/* ===========================
   SERVICE CARDS
   =========================== */
.main-content-wrapper {
    background-color: theme('colors.white');
    border: 1px solid theme('colors.gray.200');
    border-radius: 0.75rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dark .main-content-wrapper {
    background-color: theme('colors.gray.800');
    border-color: theme('colors.gray.700');
}

.service-card {
    background-color: theme('colors.white');
    border: 1px solid theme('colors.gray.200');
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dark .service-card {
    background-color: theme('colors.gray.700');
    border-color: theme('colors.gray.600');
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: theme('colors.blue.500');
}

.dark .service-card:hover {
    border-color: theme('colors.blue.400');
}

.service-card-status-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    text-align: center;
    border-radius: 9999px;
    font-weight: 600;
    color: white;
    min-width: 80px;
}

/* ===========================
   STATUS COLORS
   =========================== */
.status-up { background-color: #22c55e; }
.status-down { background-color: #ef4444; }
.status-maintenance { background-color: #f59e0b; }

.status-operational-text { color: #16a34a; }
.status-down-text { color: #dc2626; }
.status-maintenance-text { color: #d97706; }

.list-group-item-success { background-color: #d1fae5; }
.dark .list-group-item-success { background-color: #064e3b; }

.list-group-item-danger { background-color: #fee2e2; }
.dark .list-group-item-danger { background-color: #7f1d1d; }

.list-group-item-maintenance { background-color: #fffbeb; }
.dark .list-group-item-maintenance { background-color: #78350f; }

/* ===========================
   HERO SECTION
   =========================== */
.hero-section-gradient {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, theme('colors.blue.50'), theme('colors.blue.100'));
}

.dark .hero-section-gradient {
    background: linear-gradient(to bottom, theme('colors.gray.900'), theme('colors.gray.800'));
}

.hero-section-gradient::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    transform: translate(-50%, -50%) scale(0.1);
    animation: background-pulse 4s infinite cubic-bezier(0.66, 0, 0.34, 1);
    z-index: 0;
}

.dark .hero-section-gradient::after {
    background: radial-gradient(circle, rgba(66,153,225,0.1) 0%, rgba(66,153,225,0) 70%);
}

@keyframes background-pulse {
    0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* ===========================
   OVERALL STATUS INDICATOR BAR
   =========================== */
#overall-status-indicator-bar {
    height: 6px;
    border-radius: 9999px;
    background-color: theme('colors.gray.400');
}

#overall-status-indicator-bar.status-up { background-color: #22c55e; }
#overall-status-indicator-bar.status-down { background-color: #ef4444; }
#overall-status-indicator-bar.status-maintenance { background-color: #f59e0b; }
#overall-status-indicator-bar.status-unknown { background-color: #6b7280; }

#main-status-phrase.status-operational-text { color: #22c55e; }
#main-status-phrase.status-down-text { color: #ef4444; }
#main-status-phrase.status-maintenance-text { color: #f59e0b; }
#main-status-phrase.status-unknown-text { color: #6b7280; }

/* ===========================
   GENERAL CLEANUP
   =========================== */
header, footer, .main-content-wrapper, .service-card, .service-card-status-pill {
    box-shadow: none !important;
}

.info-details {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}
.dark .info-details {
    color: #d1d5db;
}

ul.list-disc ul.list-disc {
    list-style-type: circle;
    margin-left: 1rem;
}

/* ===========================
   SKELETON LOADERS
   =========================== */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: theme('colors.gray.200');
}

.dark .skeleton {
    background-color: theme('colors.gray.700');
}

/* Pulse Animation */
.skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading {
    0% { left: -150%; }
    100% { left: 100%; }
}

/* Skeleton Variants */
.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.skeleton-card {
    height: 100px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 12px;
    width: 80%;
    margin-bottom: 6px;
    border-radius: 4px;
}
.skeleton-text.short { width: 40%; }
