/* Import Modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --primary-glow: rgba(13, 110, 253, 0.4);
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.04);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Soccer Field Overlay */
.bg-field-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.75) 100%), 
                url('../img/soccer_field.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
    transform: scale(1.02);
    filter: blur(1px);
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.glass-card:hover {
    border-color: rgba(13, 110, 253, 0.3);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(13, 110, 253, 0.1);
}

.glass-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 1.5rem;
}

/* Custom Premium Buttons */
.btn-premium {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd 0%, #024ebb 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6), 0 0 10px rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-premium:active {
    transform: translateY(1px);
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-premium:hover::after {
    opacity: 1;
}

/* Form Styling */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-light) !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.25s ease;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
    outline: none;
}

.form-control::placeholder {
    color: #64748b;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Video Modal Styling */
.modal-video-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.modal-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Disabled video controls layer (blocking user click hacks) */
.video-overlay-blocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 50px); /* Blocks the video area while leaving progress bar accessible if visible */
    background: transparent;
    z-index: 10;
}

/* Clean Custom Video Control Indicator */
.video-progress-indicator {
    height: 6px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.video-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.1s linear;
}

/* Custom SwAlert Customization */
.swal2-popup {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
}

.swal2-title {
    color: #f8fafc !important;
    font-family: 'Outfit', sans-serif !important;
}

/* Admin Dashboard Specific */
.admin-sidebar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    min-height: 100vh;
}

.nav-link-admin {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    margin: 0.25rem 1rem;
    transition: all 0.2s ease;
}

.nav-link-admin i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.nav-link-admin:hover, .nav-link-admin.active {
    color: var(--text-light);
    background-color: rgba(13, 110, 253, 0.15);
    border-left: 4px solid var(--primary-color);
}

.kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Footer styling */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(15, 23, 42, 0.8);
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Custom Override for text-muted to make it white */
.text-muted {
    --bs-text-opacity: 1;
    color: #fff !important;
}

/* Subscriptions Row Colors */
tr.row-unpaid {
    background-color: rgba(239, 68, 68, 0.08) !important;
    border-left: 4px solid #ef4444 !important;
}
tr.row-partial {
    background-color: rgba(245, 158, 11, 0.08) !important;
    border-left: 4px solid #f59e0b !important;
}
tr.row-paid {
    background-color: rgba(16, 185, 129, 0.08) !important;
    border-left: 4px solid #10b981 !important;
}

/* Collapsible Sidebar Styles */
.admin-sidebar {
    width: 250px;
    min-height: 100vh;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    white-space: nowrap;
}

.admin-sidebar.collapsed {
    width: 75px !important;
}

/* Sync root class to avoid flash of uncollapsed sidebar */
.sidebar-is-collapsed .admin-sidebar {
    width: 75px !important;
}

.sidebar-is-collapsed .admin-sidebar .logo-text,
.sidebar-is-collapsed .admin-sidebar .logo-subtext,
.sidebar-is-collapsed .admin-sidebar span {
    display: none !important;
}

.admin-sidebar .nav-link-admin span {
    transition: opacity 0.2s ease;
    opacity: 1;
}

.admin-sidebar.collapsed .nav-link-admin span {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.admin-sidebar.collapsed .logo-text,
.admin-sidebar.collapsed .logo-subtext,
.admin-sidebar.collapsed .p-3 h6,
.admin-sidebar.collapsed .p-3 small {
    display: none !important;
}

.admin-sidebar.collapsed .logo-img {
    height: 35px;
    margin-top: 15px;
}

.admin-sidebar.collapsed #sidebar-toggle {
    position: static !important;
    margin: 0 auto 10px auto;
    display: block;
}

.admin-sidebar.collapsed .p-4 {
    padding: 1.5rem 0.5rem !important;
}

.admin-sidebar.collapsed .p-3 {
    padding: 1rem 0.5rem !important;
}

.admin-sidebar.collapsed .nav-link-admin {
    text-align: center;
    padding: 0.75rem 0 !important;
    justify-content: center;
}

.admin-sidebar.collapsed .nav-link-admin i {
    margin-right: 0 !important;
    font-size: 1.35rem;
}

/* Hide sign out button text when collapsed */
.admin-sidebar.collapsed .btn-outline-danger {
    padding: 0.5rem 0 !important;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.admin-sidebar.collapsed .btn-outline-danger span {
    display: none !important;
}

/* Responsive Layout Fixes */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body .row.d-flex.flex-nowrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.admin-sidebar {
    flex-shrink: 0 !important;
}

.flex-grow-1 {
    min-width: 0 !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
}

/* Mobile Navbar & Responsive Drawer Styles */
.mobile-navbar {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-navbar {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 1030;
        background: #111827;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #374151;
        align-items: center;
        justify-content: space-between;
    }
    
    body .row.d-flex.flex-nowrap {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .admin-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: -270px;
        width: 260px !important;
        height: 100vh !important;
        z-index: 1040 !important;
        background: #1f2937 !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .admin-sidebar.mobile-show {
        left: 0 !important;
    }
    
    /* Ensure sidebar elements show correctly inside mobile view */
    .admin-sidebar span,
    .admin-sidebar .logo-text {
        display: inline !important;
    }
    
    .admin-sidebar .logo-subtext {
        display: none !important;
    }
    
    .admin-sidebar.collapsed {
        width: 260px !important;
    }
    
    .sidebar-is-collapsed .admin-sidebar .logo-text,
    .sidebar-is-collapsed .admin-sidebar span {
        display: inline !important;
    }
    
    /* Hide desktop collapse controls on mobile */
    #sidebar-toggle {
        display: none !important;
    }
    
    /* Main content padding updates for mobile viewports */
    .flex-grow-1 {
        padding: 1.5rem 1rem !important;
    }
    
    /* Backdrop styling */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.65);
        z-index: 1035;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
    
    .admin-sidebar .close-drawer-btn {
        display: block !important;
    }
}

.admin-sidebar .close-drawer-btn {
    display: none;
}
