/**
 * Fighter Page Improvements - Separate from main CSS
 */

/* Enhanced Typography for Fighter Pages */
.fighter-single h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

/* Fighter Stats Improvements */
.fighter-stats .stat-box {
    background: rgba(45,45,45,0.8);
    border: 1px solid rgba(220,38,38,0.3);
    transition: all 0.3s ease;
}

.fighter-stats .stat-box:hover {
    transform: translateY(-5px);
    border-color: #dc2626;
    box-shadow: 0 10px 20px rgba(220,38,38,0.3);
}

/* Gallery Enhancements */
.fighter-gallery .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.fighter-gallery .gallery-item:hover {
    transform: scale(1.05);
}

/* Fight History Cards */
.fight-history .fight-item {
    background: rgba(26,26,26,0.6);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.fight-history .fight-item:hover {
    transform: translateX(10px);
    background: rgba(26,26,26,0.8);
}

/* Keep original header/nav styles intact */

/* Fighter Portrait Size Fix - Override main.css */
.fighter-single-premium .fighter-portrait {
    width: auto !important;
    height: 900px !important;
    max-width: 100% !important;
    background: transparent !important;
}

.fighter-single-premium .fighter-portrait img {
    width: auto !important;
    height: 100% !important;
    max-height: 900px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .fighter-single-premium .fighter-portrait {
        height: 700px !important;
    }
    
    .fighter-single-premium .fighter-portrait img {
        max-height: 700px !important;
    }
}

@media (max-width: 768px) {
    .fighter-single-premium .fighter-portrait {
        height: 500px !important;
    }
    
    .fighter-single-premium .fighter-portrait img {
        max-height: 500px !important;
    }
}

@media (max-width: 480px) {
    .fighter-single-premium .fighter-portrait {
        height: 400px !important;
    }
    
    .fighter-single-premium .fighter-portrait img {
        max-height: 400px !important;
    }
}

/* Ensure the fighter card container adapts */
.fighter-single-premium .fighter-card-premium {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* Adjust showcase grid for larger images */
.fighter-single-premium .fighter-showcase {
    gap: 60px !important;
}

/* Hero Background Improvements */
.fighter-hero-premium .hero-background {
    background: #000;
}

.fighter-hero-premium .hero-image {
    opacity: 0.3 !important; /* Make background image more subtle */
    filter: blur(2px); /* Slight blur for better text readability */
    transform: scale(1.1); /* Prevent edges showing on parallax */
}

.fighter-hero-premium .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.4) 0%,
        rgba(0,0,0,0.7) 50%,
        rgba(0,0,0,0.9) 100%
    ) !important;
}

/* Better contrast for fighter info on hero */
.fighter-hero-premium .fighter-info-premium {
    position: relative;
    z-index: 10;
}

/* Hero Background Optimizations - Override previous settings */
.fighter-hero-premium .hero-image {
    opacity: 0.7 !important; /* Increased from 0.3 to 0.7 for better visibility */
    filter: none !important; /* Remove blur for sharper image */
    transform: scale(1.1); /* Keep scale for parallax edges */
    transition: opacity 0.8s ease;
}

/* Refined overlay gradient for better image visibility */
.fighter-hero-premium .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.2) 0%,     /* Lighter at top */
        rgba(0,0,0,0.3) 30%,    /* Gradual increase */
        rgba(0,0,0,0.5) 70%,    /* Medium in middle */
        rgba(0,0,0,0.8) 100%    /* Darker at bottom for text readability */
    ) !important;
}

/* Additional gradient from sides for better framing */
.fighter-hero-premium .hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 40%,
        rgba(0,0,0,0.4) 100%
    );
    pointer-events: none;
}

/* Ensure fighter info stands out */
.fighter-hero-premium .fighter-info-premium * {
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
}

/* Hover effect for hero image */
.fighter-hero-premium:hover .hero-image {
    opacity: 0.8 !important;
}

/* Dark vignette for CFS style */
.fighter-hero-premium .hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(220,38,38,0.1) 0%,
        transparent 50%,
        rgba(0,0,0,0.3) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Hero Banner Layout Enhancements */
.fighter-hero-banner {
    position: relative;
    background: #000;
    overflow: hidden;
}

/* Parallax effect for hero background */
.hero-bg-image {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.fighter-hero-banner:hover .hero-bg-image {
    transform: scale(1.15);
}

/* Enhanced fighter portrait */
.hero-fighter-image {
    border: 3px solid rgba(220,38,38,0.3);
    transition: all 0.3s ease;
}

.hero-fighter-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
    border-color: #dc2626;
}

/* Animated stats on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-info h1 {
    animation: fadeInUp 0.8s ease;
}

.hero-nickname {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Win rate animation */
@keyframes fillBar {
    from {
        width: 0;
    }
}

.win-rate-fill {
    animation: fillBar 1.5s ease-out;
}

/* Stat cards hover effects */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220,38,38,0.2), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

/* Country flag support */
.stat-card img.country-flag {
    width: 40px;
    height: auto;
    margin-top: 10px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-info h1 {
        text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card p {
        font-size: 1.5rem;
    }
}

/* Fighter Portrait Below Hero - Enhanced Styling */
.fighter-portrait-section {
    position: relative;
    margin-top: -100px;
    z-index: 20;
}

.fighter-portrait-wrapper {
    background: radial-gradient(ellipse at center, rgba(220,38,38,0.2) 0%, transparent 60%);
    padding: 20px;
    border-radius: 50%;
}

.fighter-portrait {
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
    transition: all 0.4s ease;
}

.fighter-portrait:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.9));
}

/* Hero Title Animation */
@keyframes heroTitleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255,255,255,0.5),
            0 0 20px rgba(255,255,255,0.3),
            0 0 30px rgba(220,38,38,0.3);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255,255,255,0.8),
            0 0 30px rgba(255,255,255,0.5),
            0 0 40px rgba(220,38,38,0.5);
    }
}

.hero-title {
    animation: heroTitleGlow 3s ease-in-out infinite;
}

/* Red accent line under nickname */
.hero-nickname::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: #dc2626;
    margin: 20px auto 0;
}

/* Enhanced stat cards with icons */
.stat-card h3::before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
    background: rgba(220,38,38,0.2);
    border-radius: 50%;
}

/* Win percentage number animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.win-rate-value {
    animation: countUp 0.8s ease-out;
}

/* Parallax scrolling for hero background */
.hero-bg-image {
    will-change: transform;
}

/* Mobile optimizations for portrait below */
@media (max-width: 768px) {
    .fighter-portrait-section {
        margin-top: -50px;
    }
    
    .fighter-portrait {
        width: 250px;
        height: 375px;
    }
    
    .hero-banner {
        height: 350px;
    }
}

/* Final Polish for Fighter Page */

/* 1. Fighter Image Enhancement - Remove the odd glow */
.fighter-portrait-wrapper {
    background: none !important;
    padding: 0 !important;
}

.fighter-portrait-section {
    margin-top: -80px !important;
}

/* 2. Add subtle red accent to fighter image */
.fighter-portrait {
    border: 2px solid rgba(220,38,38,0.5) !important;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.8),
        0 0 60px rgba(220,38,38,0.1) !important;
}

.fighter-portrait:hover {
    border-color: #dc2626 !important;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.9),
        0 0 80px rgba(220,38,38,0.2) !important;
}

/* 3. Improve hero text readability */
.hero-content {
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 70%);
}

/* 4. Better spacing for hero meta items */
.hero-meta {
    margin-top: 30px;
    font-size: 1rem;
    opacity: 0.9;
}

.hero-meta-label {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* 5. Enhance stat cards with subtle animation */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, #dc2626, transparent);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 0.3;
    animation: shimmer 0.5s ease;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 6. Remove excessive glow from title */
.hero-title {
    animation: none !important;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.8),
        0 0 20px rgba(255,255,255,0.1) !important;
}

/* 7. Improve nickname styling */
.hero-nickname {
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-nickname::after {
    width: 60px;
    height: 2px;
    margin: 15px auto 0;
}

/* 8. Better win rate presentation */
.win-rate-section {
    max-width: 800px;
    margin: 0 auto 60px;
}

/* 9. Add CFS branding touch */
.fighter-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dc2626, transparent);
}

/* 10. Mobile improvements */
@media (max-width: 768px) {
    .fighter-portrait {
        width: 280px !important;
        height: 420px !important;
    }
    
    .win-rate-value {
        font-size: 4rem !important;
    }
    
    .hero-meta {
        font-size: 0.9rem;
    }
}
