/* eFootball League 2025 - Enhanced Styles for Online-Only Admin Panel */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff6b6b;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --text-light: #ffffff;
    --text-muted: #b8b8b8;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --notification-info: #17a2b8;
    --notification-warning: #ffc107;
    --notification-success: #28a745;
    --notification-urgent: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    transform: translateY(-2px);
}

/* Connection Status Badge */
#connection-status {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    .navbar-collapse {
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0 0 15px 15px;
        padding: 1rem;
        margin-top: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        transform: translateY(-2px);
    }
    
    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(106, 17, 203, 0.25);
    }

    /* Better touch targets for mobile */
    .navbar-nav .nav-link,
    .navbar-nav .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile player name fixes */
    .player-name {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .table td.player-cell {
        max-width: 120px;
        font-size: 0.8rem;
    }
}

/* Smooth navbar transitions */
.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Tables */
.table {
    color: var(--text-light);
    margin-bottom: 0;
}

.table-dark {
    background: rgba(255, 255, 255, 0.05);
}

.table-dark th {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    padding: 1rem;
}

.table-dark td {
    border-color: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Player Name Fixes */
.player-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table td.player-cell {
    max-width: 150px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
}

.card-body .player-name {
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
}

/* League Table Positions */
.position-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1)) !important;
    border-left: 4px solid gold;
}

.position-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1)) !important;
    border-left: 4px solid silver;
}

.position-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1)) !important;
    border-left: 4px solid #cd7f32;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e83e8c);
    border: none;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
    transform: translateY(-2px);
}

.btn-outline-info {
    border: 2px solid var(--info-color);
    color: var(--info-color);
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: white;
    transform: translateY(-2px);
}

/* Forms */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(106, 17, 203, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Fix dropdown visibility */
.form-select {
    background-color: rgba(45, 55, 72, 0.8) !important;
    border-color: rgba(74, 85, 104, 0.8) !important;
    color: white !important;
    z-index: 1000;
}

.form-select:focus {
    border-color: #4299e1 !important;
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25) !important;
}

/* Ensure dropdown options are visible */
.form-select option {
    background-color: #2d3748 !important;
    color: white !important;
    padding: 10px;
}

/* Fix Bootstrap dropdown z-index */
.dropdown-menu {
    z-index: 1060 !important;
    background-color: #2d3748 !important;
    border: 1px solid #4a5568 !important;
}

.dropdown-item {
    color: white !important;
}

.dropdown-item:hover {
    background-color: #4a5568 !important;
    color: white !important;
}

/* Player Cards */
.player-card {
    text-align: center;
    transition: all 0.3s ease;
    padding: 15px;
}

.player-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.player-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin: 0 auto;
}

/* Match Cards */
.match-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.match-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Countdown Timer */
.countdown {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

/* Prize Pool */
.prize-pool {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
    color: #212529;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Admin Section */
.admin-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.ef-profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

/* Status Badges */
.status-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

/* Tabs */
.nav-pills .nav-link {
    color: var(--text-light);
    border-radius: 10px;
    margin: 0 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Notifications - Enhanced Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
    color: #212529;
}

.alert-danger {
    background: linear-gradient(135deg, var(--danger-color), #e83e8c);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, var(--info-color), #6f42c1);
    color: white;
}

/* Advanced Statistics Styles */
.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.radar-chart {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1), rgba(37, 117, 252, 0.1));
    border-radius: 10px;
    padding: 20px;
    height: 300px;
}

.progress-custom {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.player-comparison {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

/* Bulk Operations Styles */
.admin-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bulk-operation {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1), rgba(37, 117, 252, 0.1));
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.progress-lg {
    height: 12px;
    border-radius: 10px;
}

/* Enhanced Notification System Styles */
.update-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.notification-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.notification-high { 
    border-left-color: var(--notification-urgent);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.notification-medium { 
    border-left-color: var(--notification-warning);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
}

.notification-low { 
    border-left-color: var(--notification-info);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
}

.notification-success {
    border-left-color: var(--notification-success);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
}

.push-notification {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Additional player name fixes for admin page */
.admin-section .player-name {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Database Management Styles */
.server-status-card {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(32, 201, 151, 0.1));
    border-left: 4px solid var(--success-color);
}

.server-offline {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(232, 62, 140, 0.1));
    border-left: 4px solid var(--danger-color);
}

.refresh-button {
    background: linear-gradient(135deg, var(--info-color), #6f42c1);
    border: none;
    color: white;
}

.refresh-button:hover {
    background: linear-gradient(135deg, #138496, #5a3596);
    transform: translateY(-2px);
}

/* Password Strength Indicator */
.password-strength-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.password-strength {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 4px;
}

.password-weak {
    background: var(--danger-color);
    width: 25%;
}

.password-medium {
    background: var(--warning-color);
    width: 50%;
}

.password-strong {
    background: var(--success-color);
    width: 75%;
}

.password-very-strong {
    background: var(--success-color);
    width: 100%;
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Extra small player name fixes */
    .player-name {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .table td.player-cell {
        max-width: 100px;
        font-size: 0.75rem;
    }
    
    /* Mobile admin adjustments */
    .admin-section {
        padding: 1rem;
    }
    
    .nav-pills .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        margin: 0.25rem;
    }
    
    .ef-profile-image {
        width: 60px;
        height: 60px;
    }
}

/* Connection Status Animations */
@keyframes pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

@keyframes pulse-offline {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.badge.bg-success {
    animation: pulse-online 2s infinite;
}

.badge.bg-danger {
    animation: pulse-offline 2s infinite;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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