
        body {
            background-color: #f0f2f5;
            font-family: Arial, sans-serif;
        }
        .court-card {
            min-width: 250px;
            margin-bottom: 30px;
            /* Adjusted height from 450px to 400px */
            height: 400px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden; /* Prevent overflow */
        }
        .card-header {
            background-color: transparent;
            border-bottom: none;
            padding: 10px 0;
        }
        .court-badge {
            font-size: 1rem;
            padding: 0.5em 1em;
        }
        .time-remaining {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .singles {
            background-color: #e2f0cb;
        }
        .doubles {
            background-color: #e2f0cb; /* Changed from #cce5ff to #e2f0cb as per your edit */
        }
        .available {
            background-color: #d4edda;
        }
        .under-maintenance {
            background-color: #f8d7da;
        }
        .reserved-league {
            background-color: #fff3cd; /* Example color for Reserved for League Play */
        }
        .alert-warning {
            border: 3px solid #ffc107;
            animation: pulse 2s infinite;
        }
        /* Pulse Animation for Warning Border */
        @keyframes pulse {
            0% { border-color: red; } /* Changed from #ffc107 to red */
            50% { border-color: #ffecb5; }
            100% { border-color: red; }
        }
        /* Flashing Animation */
        @keyframes flash {
            0% { opacity: 1; }
            50% { opacity: 0; }
            100% { opacity: 1; }
        }
        /* Apply the flash animation to elements with the 'flash' class */
        .flash {
            animation: flash 1s infinite;
        }
        .court-status-icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }
        .court-status-text {
            font-size: 1.2rem;
        }
        .card-body {
            flex: 1; /* Ensure card-body takes up remaining space */
            position: relative; /* For absolute positioning of child elements */
            padding: 15px;
            overflow: hidden; /* Prevent content overflow */
        }
        /* Transition for smooth visibility toggling */
        .fade-section {
            transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
            position: absolute; /* Overlay sections */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            text-align: center;
        }
        .match-visible {
            opacity: 1;
            transform: translate(-50%, -50%) translateY(0);
            pointer-events: all; /* Enable interactions */
        }
        .match-hidden {
            opacity: 0;
            transform: translate(-50%, -50%) translateY(-20px);
            pointer-events: none; /* Disable interactions */
        }
        .status-visible {
            opacity: 1;
            transform: translate(-50%, -50%) translateY(0);
            pointer-events: all;
        }
        .status-hidden {
            opacity: 0;
            transform: translate(-50%, -50%) translateY(20px);
            pointer-events: none;
        }
        /* Placeholder for flashing message to maintain space */
        .flashing-message {
            min-height: 30px; /* Reserve space for the message */
        }
        /* Ensuring status sections are centered */
        .status-center {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100%;
        }
        /* Right-align Start Time and End Time with reduced padding */
        .time-info {
            text-align: left; /* Changed from right to left as per your edit */
            margin-bottom: 2px; /* Reduced from default to minimize spacing */
            padding-left:10px;
        }
        /* Updated color for flashing message for better readability */
        .flashing-message .text-danger {
            color: #dc3545 !important; /* Bootstrap's danger color (red) */
        }
