/* ========================================
   Server Cards - Modern Professional Design
   ======================================== */

.server-card {
    position: relative;
    background: rgba(15, 22, 33, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    backdrop-filter: blur(20px);
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.server-card:hover {
    border-color: rgba(13, 202, 240, 0.3) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(13, 202, 240, 0.1) !important;
}

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

.server-image-wrapper {
    height: 140px;
    position: relative;
    background: rgba(15, 22, 33, 0.9);
    overflow: hidden;
}

.server-map-image {
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.6) contrast(1.1);
}

/* ========================================
   Modal - Modern Design (Reusing existing patterns)
   ======================================== */

.modal-backdrop-blur {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content-modern {
    background: linear-gradient(135deg, rgba(33, 37, 41, 0.95) 0%, rgba(23, 27, 31, 0.95) 100%);
    border: 1px solid rgba(13, 202, 240, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(13, 202, 240, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-header-modern {
    border-bottom: 1px solid rgba(13, 202, 240, 0.2);
}

.modal-footer-modern {
    border-top: 1px solid rgba(13, 202, 240, 0.2);
}

.modal-body-scrollable {
    max-height: 60vh;
}

/* Player list - compact and simple */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
}

.player-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: rgba(15, 22, 33, 0.5);
    transition: all 0.2s ease;
}

.player-list-item:hover {
    background: rgba(13, 202, 240, 0.1);
    padding-left: 1.25rem;
}

.player-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0dcaf0;
    background: rgba(13, 202, 240, 0.15);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.player-list-item:hover .player-number {
    background: rgba(13, 202, 240, 0.25);
    transform: scale(1.05);
}

.player-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Modal animations */
.modal.fade.show {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   Score Display - Modern Design
   ======================================== */

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-badges-inline {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.score-badge {
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.score-badge-t {
    color: #212529;
    background: linear-gradient(135deg, rgb(255, 203, 49) 0%, rgb(230, 183, 44) 100%);
    box-shadow: 0 2px 4px rgba(255, 203, 49, 0.3);
}

.score-badge-ct {
    color: #212529;
    background: linear-gradient(135deg, rgb(13, 202, 240) 0%, rgb(12, 182, 216) 100%);
    box-shadow: 0 2px 4px rgba(13, 202, 240, 0.3);
}

.score-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    font-size: 1rem;
    padding: 0 0.125rem;
}

/* Match Status Badges - Modern Design */
.match-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    border: 1px solid;
    transition: all 0.2s ease;
}

.match-status-badge i {
    font-size: 0.625rem;
}

.match-status-warmup {
    color: rgb(255, 203, 49);
    background: rgba(255, 203, 49, 0.15);
    border-color: rgba(255, 203, 49, 0.3);
}

.match-status-ongoing {
    color: rgb(25, 238, 25);
    background: rgba(25, 238, 25, 0.15);
    border-color: rgba(25, 238, 25, 0.3);
    animation: pulse-subtle 2s ease-in-out infinite;
}

.match-status-ongoing i {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.match-status-waiting {
    color: rgb(13, 202, 240);
    background: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.3);
}

.match-status-unknown {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Subtle animations for ongoing match */
@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(25, 238, 25, 0.4);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(25, 238, 25, 0);
    }
}

@keyframes pulse-icon {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.server-card:hover .server-map-image {
    transform: scale(1.1);
    filter: brightness(0.7) contrast(1.1);
}

.server-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(15, 22, 33, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1;
}

.server-status-text {
    font-size: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-online .status-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.status-online {
    color: #22c55e;
}

.status-offline .status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

.status-offline {
    color: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.server-content {
    position: relative;
}

.server-prefix {
    background: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.server-title {
    font-size: 0.95rem;
}

.detail-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    transition: all 0.3s ease;
}

.server-card:hover .detail-icon {
    background: rgba(13, 202, 240, 0.2);
    transform: scale(1.1);
}

.server-ip-code {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    background: rgba(13, 202, 240, 0.05);
    border: 1px solid rgba(13, 202, 240, 0.25);
    border-radius: 0.375rem;
    color: #0dcaf0;
}

.ip-copy-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.5);
    transition: all 0.2s ease;
}

.ip-copy-btn:hover {
    background: rgba(13, 202, 240, 0.2);
    border-color: rgba(13, 202, 240, 0.5) !important;
    transform: scale(1.05);
}

.ip-copy-btn:active {
    transform: scale(0.95);
}

.connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.connect-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.connect-btn:active {
    transform: translateY(0);
}

.progress-fill-gradient {
    background: linear-gradient(90deg, #22c55e 0%, #0dcaf0 100%);
    box-shadow: 0 0 8px rgba(13, 202, 240, 0.5);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2) 0%, rgba(13, 202, 240, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.server-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.player-count-cell {
    min-width: 150px;
}

.player-count-badge {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2) 0%, rgba(13, 202, 240, 0.1) 100%);
    border: 1px solid rgba(13, 202, 240, 0.3);
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
}

.player-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    width: 100px;
}

.player-progress .progress-bar {
    transition: width 0.3s ease;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid;
    transition: all 0.2s ease;
}

.status-indicator-online {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

.status-indicator-offline {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

/* 5-column grid for XXL screens */
@media (min-width: 1400px) {
    .col-xxl-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .server-image-wrapper {
        height: 120px;
    }
}

@media (max-width: 575px) {
    .server-ip-code {
        font-size: 0.75rem !important;
    }
    
    .connect-btn {
        padding: 0.4rem 0.625rem;
        font-size: 0.75rem !important;
    }
}

/* ========================================
   Server Dropdown Menu
   ======================================== */

.server-dropdown-menu {
    background: rgba(15, 22, 33, 0.7) !important;
    backdrop-filter: blur(2px) !important;
}

.server-dropdown-item {
    background: transparent !important;
}

.server-dropdown-item:hover {
    background: rgba(31, 41, 54, 0.8) !important;
    transition: ease-in-out;
}

.server-dropdown-span {
    line-height: 1.2 !important;
}

/* ========================================
   Server Table - Glassy Design
   ======================================== */

.server-table-glassy {
    background: rgba(15, 22, 33, 0.6) !important;
    backdrop-filter: blur(10px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
}

.server-table-glassy:hover {
    border-color: rgba(13, 202, 240, 0.3) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), 0 0 20px rgba(13, 202, 240, 0.1) !important;
}

.server-table-header {
    background: rgba(13, 202, 240, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(13, 202, 240, 0.3) !important;
}

.server-table-row {
    transition: all 0.2s ease !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: transparent !important;
}

.server-table-row:hover {
    background: rgba(13, 202, 240, 0.08) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.server-table {
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-active-bg: transparent !important;
    --bs-table-border-color: transparent !important;
    margin-bottom: 0 !important;
    border: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
