/* Main Layout Styles */
body { 
    background-color: var(--bg-color); 
    background-image: radial-gradient(circle at top right, rgba(13, 110, 253, 0.15), transparent 400px),
                      radial-gradient(circle at bottom left, rgba(13, 110, 253, 0.1), transparent 400px);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .font-outfit {
    font-family: 'Outfit', sans-serif;
}

/* Navbar Glassmorphism */
.navbar-glass {
    background: rgba(11, 15, 25, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: color 0.3s ease;
}
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}

/* Glass Surface / Cards */
.glass-card, .card {
    background: var(--surface-color) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border) !important;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.card-header {
    background: rgba(0,0,0,0.2) !important;
    border-bottom: 1px solid var(--surface-border) !important;
}

.list-group-item {
    background: transparent !important;
    color: inherit !important;
    border-color: var(--surface-border) !important;
}

.table {
    color: inherit !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,0.02);
    --bs-table-hover-bg: rgba(255,255,255,0.05);
    border-color: var(--surface-border);
}

/* Fix rounded corners bleed/leak in tables inside cards */
.card .table-responsive,
.glass-card .table-responsive {
    border-radius: inherit;
}

.card .table tr:last-child td:first-child,
.glass-card .table tr:last-child td:first-child {
    border-bottom-left-radius: 19px;
}

.card .table tr:last-child td:last-child,
.glass-card .table tr:last-child td:last-child {
    border-bottom-right-radius: 19px;
}


/* Auto-convert hardcoded light classes to dark */
.bg-white, .bg-light, .table-light { background-color: transparent !important; color: inherit !important; }
.text-dark { color: #e2e8f0 !important; }
.text-muted { color: rgba(255,255,255,0.5) !important; }
.border-bottom, .border-top, .border { border-color: var(--surface-border) !important; }

.footer { 
    background: rgba(0, 0, 0, 0.3); 
    border-top: 1px solid var(--surface-border);
    color: rgba(255,255,255,0.5); 
    padding: 3rem 0; 
    text-align: center; 
    margin-top: auto; 
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

/* Helpers */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary-glow {
    background: var(--primary-color);
    border: none;
    color: #fff;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.4);
    transition: all 0.3s ease;
}
.btn-primary-glow:hover {
    box-shadow: 0 0 25px rgba(13, 110, 253, 0.6);
    transform: translateY(-2px);
    color: #fff;
}

/* --- home/index.php --- */
/* Hero animations */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.2) 0%, transparent 70%);
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 8rem 0 6rem 0;
}

/* Card Enhancements */
.card-campeonato {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    position: relative;
}
.card-campeonato::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s ease;
}
.card-campeonato:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(13, 110, 253, 0.15);
    border-color: rgba(255,255,255,0.3) !important;
}
.card-campeonato:hover::before {
    background: linear-gradient(135deg, var(--primary-color) 0%, transparent 50%, rgba(255,255,255,0.3) 100%);
}
.card-banner-wrapper {
    position: relative;
}
.card-banner-wrapper .banner-img-wrap img, .card-banner-wrapper .banner-img-wrap > div {
    transition: transform 0.6s ease;
    height: 100%;
    width: 100%;
}
.card-campeonato:hover .banner-img-wrap img, .card-campeonato:hover .banner-img-wrap > div {
    transform: scale(1.05);
}
.card-logo-overlap {
    position: absolute;
    bottom: -25px;
    left: 24px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #141a29;
    background: linear-gradient(135deg, var(--surface-color), #0b0f19);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}
.card-logo-overlap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-logo-overlap i {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.5);
}

/* --- championship/detail.php & matches.php --- */
.transition-all {
    transition: all 0.2s ease-in-out;
}
.hover-scale:hover {
    transform: scale(1.05);
}
.hover-primary:hover {
    color: var(--bs-primary) !important;
}
.score-pill {
    background: linear-gradient(135deg, var(--primary-color) 0%, #000 150%);
    color: white;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4) !important;
}
.vs-pill {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
    border: 2px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}
.match-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.match-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color) !important;
    background: rgba(0,0,0,0.6) !important;
}
.list-group-item {
    transition: background-color 0.2s ease;
}
.list-group-item:hover {
    background-color: rgba(255,255,255,0.02) !important;
}
.blink_me { animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* --- match/detail.php --- */
.tracking-wide { letter-spacing: 0.1em; }
.hover-opacity-100:hover { opacity: 1 !important; }
.hover-primary:hover h3 { color: var(--bs-primary) !important; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}
.pulse-animation {
    animation: pulse 2s infinite;
}
.score-pill-large {
    background: linear-gradient(135deg, var(--primary-color) 0%, #000 150%);
    color: white;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.5) !important;
    letter-spacing: 2px;
}

/* --- team/detail.php --- */
.team-player-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.team-player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}
