﻿/* ===========================================
   LIONTRUST COMPETITION - FULL RESTORATION
   WITH POST-COMPETITION ENHANCEMENTS
   =========================================== */

/* --- GLOBAL --- */
body {
    background: #bbe2f6 !important;
    font-family: Arial, Helvetica, sans-serif;
}

/* Background animation */
.background {
    animation-name: backgroundColorPalette;
    animation-duration: 15s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: linear;
}

@keyframes backgroundColorPalette {
    0% {
        background: #e5eeff;
    }

    25% {
        background: #e7e5ff;
    }

    50% {
        background: #ffe8f2;
    }

    75% {
        background: #ffedd6;
    }

    100% {
        background: #e5ffef;
    }
}

/* --- LAYOUT --- */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    margin: 0 auto;
}

.competition-container {
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding-left: 0px;
    padding-right: 0px;
}

/* Hide both sections initially */
#competitionInfoSection,
#leaderboardSection {
    display: none;
}

/* --- TOGGLE BUTTONS --- */
.competition-toggle-buttons {
    margin: 2rem 0;
    text-align: center;
}

.toggle-btn {
    background: #4183d7;
    color: white;
    border: none;
    padding: 1rem 2rem;
    margin: 0 0.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .toggle-btn:hover {
        background: #62a0ed;
    }

    .toggle-btn.active {
        background: #2d6fc1;
    }

/* --- COMPETITION HEADING --- */
.competition-heading {
    display: flex;
    width: 100%;
}

    .competition-heading #top-left,
    .competition-heading #top-right {
        width: 50%;
    }

    .competition-heading #top-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .competition-heading #top-right img {
        width: 100%;
        height: auto;
    }

.page-banner {
    background: none !important;
}

/* Headings */
#comp_heading {
    color: #4183d7 !important;
    font-size: 2rem;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 5rem;
    text-align: center;
    text-decoration: none;
}

#page-banner-title {
    color: #4183d7 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 4rem !important;
}

/* --- COMPETITION INFO SECTION --- */
.competition-info-body {
    color: #333;
}

/* Info card grid */
.competition-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.info-card p,
.info-card strong,
.info-card li {
    font-size: 1.5rem;
}

.competition-sections .col-md-6.col-lg-4 {
    flex: 1 1 35%;
    max-width: 45%;
    min-width: 30%;
}

/* --- INFO CARDS --- */
.info-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid black; /* ✅ black border restored */
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px blue !important;
    padding: 1.5rem;
}

    .info-card:hover {
        transform: scale(1.02);
    }

.competition-sections h4 {
    color: #4183d7;
    margin-bottom: 10px;
}

/* Headline */
.competition-info-body h2 {
    color: #0056b3;
    font-weight: 600;
}

/* --- GET STARTED BUTTON --- */
#get-started-button a {
    font-size: 1.6rem;
    background: #4183d7;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

    #get-started-button a:hover {
        background: #62a0ed;
    }

/* --- TABLES --- */
table {
    width: 90%;
    border-collapse: collapse;
    overflow: hidden;
    box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.2);
    background-color: rgba(65,131,215,0.7);
    color: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 15px;
}

th {
    text-align: left;
    background-color: rgba(65,131,215,0.7);
    font-size: 22px;
    color: white;
}

/* --- MEDAL COLORS --- */
#bronze, #gold, #silver {
    text-shadow: 2px 2px 4px #000000;
}

#bronze {
    background: linear-gradient(to bottom, #ca7345, #ffdeca, #ca7345);
}

#gold {
    background: linear-gradient(to bottom, #B38728, #FCF6BA, #B38728);
}

#silver {
    background: linear-gradient(to bottom, #bcc6cc, #eee, #bcc6cc);
}

/* --- BUTTONS --- */
.buttonContainers {
    display: flex;
    text-align: center;
    justify-content: space-around;
    margin: auto;
    width: 100%;
}

.buttonLinks {
    background-image: linear-gradient(to right, #528edb 0%, #7aa8e3 51%, #528edb 100%);
    margin: 10px;
    padding: 15px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;
    box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
}

    .buttonLinks:hover {
        background-position: right center;
        color: #fff;
        text-decoration: none;
    }

/* --- GAME BUTTONS --- */
.gameButtons, .btnExtras {
    background-color: #e5eeff;
    color: #528edb;
    border-radius: 10px;
    border: solid 2px #528edb;
    font-weight: bold;
}

.btnExtras {
    min-height: 225px;
    max-width: 300px;
    max-height: 225px;
}

.gameButtons:hover {
    background-color: white;
}

/* ===========================================
   FINAL LEADERBOARDS (After Competition)
   =========================================== */

.final-leaderboards {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap; /* allows stacking on smaller screens */
}

.leaderboard-half {
    flex: 1 1 45%;
    max-width: 45%;
    min-width: 300px;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.final-leaderboard-title {
    text-align: center;
    color: #4183d7;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* Responsive fallback: stack vertically on mobile */
@media (max-width: 900px) {
    .final-leaderboards {
        flex-direction: column;
        align-items: center;
    }

    .leaderboard-half {
        max-width: 90%;
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .competition-sections .col-md-6.col-lg-4 {
        flex: 1 1 45%;
        max-width: 45%;
    }
}

@media (max-width: 600px) {

    .competition-heading #top-left,
    .competition-heading #top-right {
        width: 100%;
    }

    .page-banner {
        height: unset!important;
    }

    .competition-heading {
        flex-direction: column;
    }

    .competition-sections .col-md-6.col-lg-4 {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .toggle-btn {
        display: block;
        width: 80%;
        margin: 0.5rem auto;
    }
}
