﻿
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    margin-top: 0em;
}

body {
    /* Background settings */
    background-image: url('../Images/medals_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    /* Smooth background transition when resizing */
    transition: background 0.5s ease;
    /* Ensure full height */
    min-height: 100vh;
    /* Typography */
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    /* Content spacing */
    margin: 0;
    padding: 20px;
}

/* Semi-transparent overlay for better readability */
.content-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 30px;
    margin: 20px auto;
    max-width: 90%;
    backdrop-filter: blur(5px);
}

/* Fade-in animation for content */
@keyframes fadeIn {
    from {
        opacity: 0;
        /*                transform: translateY(20px);
*/
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-overlay {
    /*            animation: fadeIn 0.8s ease-out;
*/
}

/* Medal-inspired accents */
h1, h2, h3, h4 {
    color: #ffd700; /* Gold */
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    /*            padding-bottom: 5px;
*/
}


/* Podium Grid Layout */
.podium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.podium-category {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.category-title {
    color: #ffd700;
    font-size: 1.4em;
    margin: 0;
}

.podium-position {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
}

.position-1 {
    background: linear-gradient(to right, rgba(255, 215, 0, 0.2), transparent);
    border-left: 4px solid #ffd700;
}

.position-2 {
    background: linear-gradient(to right, rgba(192, 192, 192, 0.2), transparent);
    border-left: 4px solid #c0c0c0;
}

.position-3 {
    background: linear-gradient(to right, rgba(205, 127, 50, 0.2), transparent);
    border-left: 4px solid #cd7f32;
}

.position-number {
    font-size: 1.8em;
    font-weight: bold;
    width: 40px;
    text-align: center;
}

.position-details {
    flex: 1;
}

.rider-name {
    font-weight: bold;
    font-size: 1.4em;
}

.rider-time {
    opacity: 0.8;
    font-size: 1.2em;
    font-weight: bold;
}

.rider-team {
    font-style: italic;
    font-weight: bold;
    font-size: 1.2em;
    opacity: 0.7;
}

/* Bike type icons */
.fa-road {
    color: #4CAF50; /* Green for road bikes */
}

.fa-clock {
    color: #2196F3; /* Blue for TT bikes */
}


.content-overlay {
    transition: opacity 0.3s ease;
}

.updating .content-overlay {
    opacity: 0.5;
}

#loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
    font-size: 3em;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.category-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
}

.status-message {
    display: block;
    font-size: 0.9em;
}

.status-pending {
    color: #ff0000; /* Yellow for pending */
    font-weight: bold;
}

.status-complete {
    color: #4CAF50; /* Green for complete */
    font-weight: bold;
}


/* Updated Medal Styles */
.position-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px; /* Increased width */
    position: relative;
}

.medal {
    font-size: 1.0em;
    margin-right: 8px; /* Space between medal and number */
}

/* Medal colors - now properly applied */
.tt-category .position-1 .medal {
    color: gold;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.tt-category .position-2 .medal {
    color: silver;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.tt-category .position-3 .medal {
    color: #cd7f32; /* bronze */
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.position-number-text {
    font-weight: bold;
    font-size: 1.0em;
}

/* Adjust podium position layout */
.podium-position {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
    gap: 15px; /* Consistent spacing */
}

.position-details {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.speed {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 5px;
    white-space: nowrap;
}

.time-difference {
    font-size: 0.9em;
    color: #ccc;
    margin-left: 28px;
    white-space: nowrap;
}

.update-time {
    text-align: right;
    font-size: 0.9em;
    color: #aaa;
    /*            margin-top: 20px;
*/ padding-right: 20px;
}

/* Footer container */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 5px 0;
    /*    border-top: 1px solid rgba(255, 255, 255, 0.1);
*/ font-size: 0.9em;
}

/* Left-aligned message */
.footer-message {
    color: #aaa;
    color: gold !important;
    font-weight: bold !important;
    flex: 1;
    padding-right: 20px;
}

/* Right-aligned update time */
.update-time {
    color: #aaa;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .update-time i {
        color: #ffd700; /* Gold color for the icon */
    }

/* Responsive adjustment */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        /*        gap: 10px;
*/
    }

    .footer-message {
        padding-right: 0;
    }

    .update-time {
        /*        white-space: normal;
*/
    }
}


#loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
    font-size: 3em;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}


/* Medal winner row styles - nuclear option */
tr.medal-row.gold-medal,
tr.medal-row.gold-medal td {
    background-color: #FFD700 !important;
    font-weight: bold;
    position: relative; /* Helps with z-index if needed */
    z-index: 1; /* Ensures the color appears above other elements */
}

tr.medal-row.silver-medal,
tr.medal-row.silver-medal td {
    background-color: #C0C0C0 !important;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

tr.medal-row.bronze-medal,
tr.medal-row.bronze-medal td {
    background-color: #CD7F32 !important;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

/* Text styling */
tr.medal-row td {
    font-size: 1.1em !important;
    color: #000 !important;
}

/* Hover states */
tr.medal-row:hover td {
    background-color: inherit !important;
    filter: brightness(95%) !important; /* Subtle hover effect */
}


/* Add to BUCSIndividualStyle.css */

/* Rank cell styling */
.rank-cell {
    text-align: left;
    white-space: nowrap;
}

    /* Star icon styling for road bike winners */
    .rank-cell i.fa-star {
        margin-right: 5px;
        text-shadow: 1px 1px 2px black;
    }

    /* Ensure medal icons maintain gold/silver/bronze colors */
    .rank-cell i.fa-medal,
    .rank-cell i.fa-trophy {
        margin-right: 5px;
        text-shadow: 1px 1px 2px black;
    }

    /* Specific color overrides for bronze star (since bronze isn't a standard star color) */
    .rank-cell i.fa-star[style*="color: #cd7f32"] {
        color: #cd7f32 !important;
    }

    /* Ensure all rank icons have proper spacing */
    .rank-cell i {
        margin-right: 5px;
    }