/* VBN AAU Inspired Styles */

/* Import a clean, highly-readable system-like font similar to the AAU site */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --vbn-blue: #003d73;
    /* primary VBN/AAU blue */
    --vbn-blue-dark: #211a52;
    --vbn-accent: #007bff;
    --page-bg: #f8f9fa;
    --surface: #ffffff;
}

#top-bar {

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--vbn-blue-dark);
    /* VBN Blue */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Change to space-between */
    /* Keep left padding at 30px but increase right padding so the right logo sits inside the page */
    padding: 0 60px 0 30px;
    /* Add some padding */
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#top-bar img {
    height: 40px;
    /* Adjust logo size */
}

body {
    /* Use Inter first, then fall back to common system fonts */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--page-bg);
    color: #212529;
    padding-top: 60px;
    /* Add padding to body to avoid content being hidden by the fixed top bar */
}

#main-container {
    display: flex;
}

#content {
    flex-grow: 1;
    padding: 30px;
}

#leaderboard-container {
    width: 350px;
    padding: 30px;
    background-color: #ffffff;
    border-left: 1px solid #dee2e6;
    height: calc(100vh - 60px);
    /* Adjust height to account for the top bar */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 60px;
}

h1,
h2 {
    /* Headings use the VBN primary blue */
    color: var(--vbn-blue);
    font-weight: 600;
}

#goals-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.goal {
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.goal:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.goal img {
    width: 100%;
    display: block;
}

.goal.selected {
    border-color: #007bff;
    /* A bright blue to indicate selection */
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

#submit-button,
#join-game {
    background-color: var(--vbn-blue);
    /* VBN Blue */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#submit-button:hover,
#join-game:hover {
    background-color: var(--vbn-blue-dark);
    /* Darker VBN Blue */
}

#leaderboard {
    list-style-type: none;
    padding: 0;
}

#leaderboard li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

#leaderboard li .confetti-icon {
    display: inline-block;
    animation: fadeOutConfetti 10s ease-out forwards;
    font-size: 18px;
    margin-right: 6px;
    flex-shrink: 0;
}

@keyframes fadeOutConfetti {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

#leaderboard li .username {
    flex-grow: 1;
}

.score {
    font-weight: bold;
}

input[type="text"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-right: 10px;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 200px;
    background-color: transparent;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

#splash-screen.show {
    animation: flyToLeaderboard 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flyToLeaderboard {
    0% {
        opacity: 1;
        font-size: 200px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        font-size: 24px;
        top: 120px;
        left: calc(100% - 60px);
        transform: translate(-100%, 0);
    }
}