/* ==========================================================================
   BowlingStat.com - Premium Dark Neon Theme
   ========================================================================== */

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

:root {
    --bg-dark: #0D1117;
    --bg-card: #161B22;
    --bg-card-hover: #1F2631;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --crypto-green: #00E676;
    --crypto-green-glow: rgba(0, 230, 118, 0.2);
    --crypto-green-border: rgba(0, 230, 118, 0.3);
    
    --electric-blue: #00B0FF;
    --electric-blue-glow: rgba(0, 176, 255, 0.2);
    --electric-blue-border: rgba(0, 176, 255, 0.3);
    
    --optical-white: #FFFFFF;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-muted: #58A6FF;
}

/* Global resets & Typography */
body, .page-wrapper, .main-container, .app-container, .app-body {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--optical-white) !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-weight: 700;
}

.text-dark {
    color: var(--optical-white) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #30363D;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* App Header Styling */
.app-header {
    background: var(--bg-dark) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px);
}

.app-header .btn-outline-light {
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.app-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Sidebar Wrapper & Brand */
#sidebar {
    background-color: var(--bg-dark) !important;
    border-right: 1px solid var(--border-color) !important;
}

.app-brand {
    background-color: var(--bg-dark) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 15px !important;
}

.app-brand .logo {
    max-width: 200px !important;
    max-height: 45px !important;
}

/* Sidebar Navigation Menu */
.sidebar-menu {
    padding: 15px 10px !important;
}

.sidebar-menu > li {
    margin-bottom: 4px !important;
}

.sidebar-menu > li > a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 12px 16px !important;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-left: 3px solid transparent !important;
    background: transparent !important;
}

.sidebar-menu > li > a i {
    font-size: 1.25rem !important;
    margin-right: 12px !important;
    color: var(--text-secondary) !important;
    transition: color 0.3s;
}

/* Hover & Active States */
.sidebar-menu > li:hover > a {
    color: var(--electric-blue) !important;
    background: rgba(0, 176, 255, 0.06) !important;
}

.sidebar-menu > li:hover > a i {
    color: var(--electric-blue) !important;
}

.sidebar-menu > li.active > a,
.sidebar-menu > li.current-page > a {
    color: var(--crypto-green) !important;
    background: rgba(0, 230, 118, 0.08) !important;
    border-left: 3px solid var(--crypto-green) !important;
    font-weight: 600;
}

.sidebar-menu > li.active > a i,
.sidebar-menu > li.current-page > a i {
    color: var(--crypto-green) !important;
}

/* Modern Card Layouts */
.card, .modern-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    overflow: hidden;
}

/* Glow Cards */
.card-glow-green {
    border: 1px solid var(--crypto-green-border) !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.04) !important;
}

.card-glow-green:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 230, 118, 0.18) !important;
    border-color: var(--crypto-green) !important;
}

.card-glow-blue {
    border: 1px solid var(--electric-blue-border) !important;
    box-shadow: 0 0 15px rgba(0, 176, 255, 0.04) !important;
}

.card-glow-blue:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 176, 255, 0.18) !important;
    border-color: var(--electric-blue) !important;
}

.card-glow-white {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.02) !important;
}

.card-glow-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1) !important;
    border-color: var(--optical-white) !important;
}

/* Card Headers & Footers */
.card .card-header, .modern-card .card-header {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem !important;
}

.card .card-body, .modern-card .card-body {
    padding: 1.5rem !important;
    background-color: transparent !important;
}

/* Analyst Data Tables - "El Tablero del Analista" */
.table-responsive {
    border-radius: 12px;
}

.table, .table-hover-custom {
    background-color: var(--bg-card) !important;
    margin-bottom: 0;
}

.table thead th, .table th {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: var(--text-secondary) !important;
    font-family: 'Roboto Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 14px 16px !important;
}

.table tbody td, .table td {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    font-family: 'Roboto Mono', monospace !important;
    font-size: 13px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    vertical-align: middle !important;
}

.table-hover-custom tbody tr, .table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover-custom tbody tr:hover td, .table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: var(--optical-white) !important;
}

/* Hyperlinks in grids */
.table a, .table-responsive a {
    color: var(--electric-blue) !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.2s;
}

.table a:hover, .table-responsive a:hover {
    color: var(--crypto-green) !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

/* Forms & Input Controls */
.form-control, select, input[type="text"], input[type="password"], input[type="email"] {
    background-color: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    transition: all 0.3s;
}

.form-control:focus, select:focus, input:focus {
    border-color: var(--electric-blue) !important;
    box-shadow: 0 0 10px var(--electric-blue-glow) !important;
    outline: none;
}

/* Buttons */
.btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, #0091EA 0%, var(--electric-blue) 100%) !important;
    border: none !important;
    color: var(--optical-white) !important;
}

.btn-primary:hover {
    box-shadow: 0 0 15px var(--electric-blue-glow) !important;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #00C853 0%, var(--crypto-green) 100%) !important;
    border: none !important;
    color: var(--bg-dark) !important;
}

.btn-success:hover {
    box-shadow: 0 0 15px var(--crypto-green-glow) !important;
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #FF9F00 0%, #FFCA28 100%) !important;
    border: none !important;
    color: var(--bg-dark) !important;
}

.btn-warning:hover {
    transform: translateY(-2px);
}

/* Footer Section */
.app-footer {
    background-color: var(--bg-dark) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 15px 30px !important;
}

/* Custom KPI styles to replace solid gradients */
.kpi-wrapper {
    display: flex;
    flex-direction: column;
}

.kpi-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.kpi-number {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.kpi-number-green {
    color: var(--crypto-green) !important;
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.kpi-number-blue {
    color: var(--electric-blue) !important;
    text-shadow: 0 0 15px rgba(0, 176, 255, 0.2);
}

.kpi-number-white {
    color: var(--optical-white) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.kpi-icon-container {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.kpi-icon-green {
    background: rgba(0, 230, 118, 0.1);
    color: var(--crypto-green);
}

.kpi-icon-blue {
    background: rgba(0, 176, 255, 0.1);
    color: var(--electric-blue);
}

.kpi-icon-white {
    background: rgba(255, 255, 255, 0.08);
    color: var(--optical-white);
}

/* Sidebar collapsed brand logo toggle */
@media (min-width: 768px) {
    /* When the sidebar is pinned and NOT hovered (collapsed) */
    .page-wrapper.pinned:not(.sidebar-hovered) .app-brand {
        padding: 15px 5px !important;
    }
    .page-wrapper.pinned:not(.sidebar-hovered) .logo-full {
        display: none !important;
    }
    .page-wrapper.pinned:not(.sidebar-hovered) .logo-icon {
        display: block !important;
        max-width: 42px !important;
        max-height: 42px !important;
        margin: 0 auto !important;
    }
    
    /* When the sidebar is pinned but HOVERED (expanded) */
    .page-wrapper.pinned.sidebar-hovered .logo-full {
        display: block !important;
    }
    .page-wrapper.pinned.sidebar-hovered .logo-icon {
        display: none !important;
    }
}

/* ==========================================================================
   Liga.aspx Specific Styles
   ========================================================================== */
.table-custom th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.header-gradient {
    background: linear-gradient(135deg, #1abc9c 0%, #2980b9 100%);
    border-radius: 12px;
}

/* Estilos para el Podio Top 3 */
.podium-card {
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.podium-1 {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    transform: scale(1.1);
    z-index: 3;
    position: relative;
}

.podium-2 {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    z-index: 2;
    position: relative;
}

.podium-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e67e22 100%);
    z-index: 1;
    position: relative;
}

.podium-1:hover {
    transform: scale(1.15);
}

.podium-2:hover,
.podium-3:hover {
    transform: scale(1.05);
}

.podium-avatar {
    width: 90px;
    height: 90px;
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    object-fit: cover;
    background: white;
}

.podium-1 .podium-avatar {
    width: 115px;
    height: 115px;
    border-width: 4px;
}

.podium-rank {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.podium-1 .podium-rank {
    font-size: 28px;
}

.podium-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.podium-1 .podium-name {
    font-size: 16px;
}

.podium-stats {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 5px;
}

.podium-1 .podium-stats {
    font-size: 14px;
    padding: 8px;
}

.podium-pts {
    font-size: 22px;
    font-weight: 900;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    margin-bottom: 4px;
    line-height: 1.1;
}

.podium-1 .podium-pts {
    font-size: 28px;
    color: #ffeb3b;
}

.podium-detail {
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0.9;
}

.flex-order-0 {
    order: 2;
}

.flex-order-1 {
    order: 1;
}

.flex-order-2 {
    order: 3;
}

/* Ocultar los 3 primeros de la tabla */
.gv-hide-top3 tbody tr:nth-child(2),
.gv-hide-top3 tbody tr:nth-child(3),
.gv-hide-top3 tbody tr:nth-child(4) {
    display: none !important;
}

/* Redimensionar podio para móviles */
@media (max-width: 768px) {
    .podium-card {
        padding: 10px 5px;
    }

    .podium-avatar {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }

    .podium-1 .podium-avatar {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }

    .podium-rank {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .podium-1 .podium-rank {
        font-size: 20px;
    }

    .podium-name {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .podium-1 .podium-name {
        font-size: 13px;
    }

    .podium-pts {
        font-size: 16px;
    }

    .podium-1 .podium-pts {
        font-size: 18px;
    }

    .podium-detail {
        flex-direction: column;
        gap: 2px;
        font-size: 10px;
    }

    .podium-detail span:nth-child(2) {
        display: none;
    }
}
