*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; }

a {
    text-decoration: none;
}

.navbar {
    background-color: white;
    position: relative;
    z-index: 1000;
}

.navbar ul {
    display: flex;
    gap: 8%;
    justify-content: center;
    margin: 10px 15px;
    padding: 15px;
    box-shadow: 0 1px red;
}

.navbar ul li {
    list-style-type: none;
}

.navbar ul li a {
    text-decoration: none;
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    position: relative;
    margin: 0 20px;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.navbar ul a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    background: red;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.navbar ul a:hover::after{
    width: 100%;
}

/* Hamburger menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 1001;
}

.bar {
    height: 3px;
    width: 25px;
    background-color: tomato;
    margin: 3px 0;
    transition: 0.4s;
    border-radius: 2px;
}

.heroSection {
    background-image: url(mma\ poster.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 400px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9); /* Vignette effect */
}

.heroSection h1 {
    color: white;
    font-size: 3rem;
    text-shadow: 2px 2px 4px black;
    text-align: center;
    animation: fadeIn 2s ease-in;
}

.mainSection {
    margin: 50px auto;
    width: 90%;
    max-width: 1200px;
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fighter-card {
    padding: 15px;
    text-align: center;
    border: 1px solid hsl(0, 0%, 77%);
    border-radius: 12px;
    box-shadow: 0 5px 15px hsla(0, 0%, 0%, 0.508);
    /* ANIMATION SETUP */
    opacity: 1; /* Hidden initially */
    animation: slideUp 0.8s ease-out backwards;
    
    /* TRANSITION SETUP (For Hover) */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

/* Stagger the animation for each card so they appear one by one */
.fighter-card:nth-child(1) { animation-delay: 0.2s; }
.fighter-card:nth-child(2) { animation-delay: 0.4s; }
.fighter-card:nth-child(3) { animation-delay: 0.6s; }

.fighter-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0);
}

.fighter-card span {
    display: block;
    color: hsl(0, 0%, 40%);
    font-weight: bold;
    text-transform: uppercase;
}

/* --- HOVER & CLICK EFFECTS --- */
.fighter-card:hover {
    transform: scale(1.05) translateY(-5px); /* Zooms and lifts up slightly */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7); /* Deep shadow */
    border-color: red;
}

.fighter-card:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.504);
}

.footer {
    margin-top: auto;
    background-color: #111;
    color: #888;
    padding: 20px;
    text-align: center;
    border-top: 3px solid red;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- Keyframe Animations --- */

/* Fade In for Hero Text */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Slide Up for Cards */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Detail Page CSS */

.detailContainer {
    max-width: 1000px;
    margin: 60px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex; /* Side by side layout */
    gap: 50px;
    align-items: center; 
}

.detail-image {
    flex: 1;
}

.detail-image img {
    width: 100%;
    height: auto;
    max-height: 500px; /* Limit height so it's not massive */
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}

.detail-info {
    flex: 1.5; /* Takes up slightly more space than image */
    padding: 20px;
}

.detail-info h1 {
    font-size: 3rem;
}

.detail-info h3 {
    color: red;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.stats-box {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid #d4d4d4;
    border-bottom: 1px solid #d4d4d4;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}

.stat-item .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
}

.detail-info p {
    font-family: Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .heroSection h1 {
        font-size: 2rem;
    }

    .detailContainer {
        flex-direction: column;
        width: 90%;
        margin: 30px auto;
        padding: 20px;
        gap: 20px;
        margin-top: 100px;
    }
    .detail-info h1 {
        font-size: 1.8rem;
    }
    .detail-info h3 {
        font-size: 1.1rem;
    }
    .detail-info p {
        font-size: 0.9rem;
    }
    .stats-box {
        gap: 20px;
    }
    .stat-item .label {
        font-size: 0.75rem;
    }
    .stat-item .value {
        font-size: 0.95rem;
    }

    .menu-toggle {
        display: flex;
    }
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 0;
        width: 100%;
        background-color: hsl(20, 90%, 80%);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        gap: 20px;
        border-bottom: 2px solid red;
        border-top: 2px solid #eee;
        text-align: center;
    }

    .navbar ul.active {
        display: flex; 
        animation: slideDown 0.6s ease-out forwards;
    }

    /* Hamburger Animation to 'X' */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .footer {
        font-size: 0.7rem;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY((-10px)); }
    to {opacity: 1; transform: translateY(0); }
}

/* --- NEWS & FIGHTS SPECIFIC STYLES --- */
.news-card, .fight-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.myH1 {
    margin: 30px;
    color: black;
    font-size: 3rem;
    text-shadow: 2px 2px 4px gray;
    text-align: center;
    animation: fadeIn 2s ease-in;
}

@media (max-width: 768px){
    .myH1{
        font-size: 2rem;
        margin-top: 80px;
    }
}

.news-card:hover, .fight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: red;
}

/* --- NEWS CARD STYLING --- */
.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #000;
}

.news-card p {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    /* Limit text to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    text-align: right;
    color: red;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* --- FIGHT CARD STYLING --- */
.fight-card {
    text-align: center;
    padding: 20px 10px;
    position: relative;
    border-top: 4px solid red;
}

.event-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000;
    text-transform: uppercase;
}

.fight-matchup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.fighter-name {
    flex: 1;
    font-weight: bold;
    font-size: 0.95rem;
}

.vs-badge {
    background: red;
    color: white;
    padding: 5px 8px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0 5px;
}

.event-date {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 10px;
    font-family: Arial, sans-serif;
}