@import url('https://fonts.googleapis.com/css?family=Oswald');

/*
 *
 * Colors
 *
 * primary colors
 * #0065BD
 *
 * secondary colors
 * #005293
 * #64A0C8
 * #98C6EA //light-blue
 * #999999
 *
 * tertiary colors
 * #E37222
 * #A2AD00
 *
 *
 */

/* General body styling */
html, body {
    font-family: 'Helvetica', sans-serif;
    margin: 0px;
    height: 100%;
    padding:0px;
    width:100%;
    overflow-y: hidden; /* Disables vertical scrolling */
    height: 100%;
}

/* ------------------ Header Section ------------------ */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #005293;
    color: #FFF;
    z-index: 100; /* Increase the z-index for higher priority */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Adds a shadow for better visual separation */
}

.header h1 {
    font-size: 18pt;
}

/* ------------------ Footer Section ------------------ */
.footer {
    background: #FFF;
    width: 100%;
    height: 20px;
    position: fixed;
    bottom: 0;
    color: #777;
    font-size: small;
    border-top: solid thin;
    border-color: #777;
    z-index: 100; /* Increase the z-index for higher priority */
    text-align: center;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
}

/* Footer text to stay on top */
.footer p {
    position: relative;
    z-index: 102; /* Higher than the progress bar */
    margin: 0;
}

/* Hands on section styling */
#hands-on-section {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
}

#hands-on-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.practice-image {
    width: 225px;
    cursor: grab;
    transition: transform 0.3s ease;
}

.practice-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

#hands-on-dropzones {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    width: 50%;
}

/* Styling for Correct and Flawed Boxes */
.correct-box, .flawed-box {
    width: 75px;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.correct-box {
    background-color: lightgreen;
    border: 2px solid #006400;
}

.flawed-box {
    background-color: lightcoral;
    border: 2px solid #8B0000;
}

/* Drag-over effect */
.correct-box.dragover {
    background-color: #66cc66; /* Lighter green for drag feedback */
    border-color: #33aa33;
    transform: scale(1.1); /* Slightly larger when hovered */
}

.flawed-box.dragover {
    background-color: #ff6666; /* Lighter red for drag feedback */
    border-color: #ff3333;
    transform: scale(1.1);
}

/* Feedback Animation */
.feedback-animation {
    animation: feedback-scale 0.3s ease-in-out;
}

@keyframes feedback-scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2); /* Slightly enlarge */
    }
    100% {
        transform: scale(1);
    }
}


/* Progress bar styling */
#round-progress-bar {
    display: flex;
    position: fixed;
    left: 0;
    width: 100%;
    height: 20px; /* Adjust height as desired */
    margin: 0;
    padding: 0;
}

/* Each segment representing a round */
.round-segment {
    flex: 1;
    height: 100%;
    transition: background-color 0.5s ease-in-out; /* Animation for color change */
}

/* Style for completed rounds */
.round-segment.completed {
    background-color: #B7CDE5; /* Light blue for completed rounds */
    z-index: 101; /* Increase the z-index for higher priority */
}


/* Common button styling */
.button-style {
    display: inline-block;
    width: 220px;
    padding: 10px;
    background-color: #005293;
    color: #FFF;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}

/* Gray-out style for disabled state */
.button-style.disabled {
    background-color: #a9a9a9; /* Light gray */
    color: #FFF;
    cursor: not-allowed;
}

/* ------------------ Overlay Styling ------------------ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.start-button {
    padding: 20px;
    font-size: 24px;
    background-color: red;
    border: none;
    cursor: pointer;
}

/* Styling for the remaining images counter */
#remaining-images {
    font-size: 18px;
    color: #333;
    text-align: center;
    margin-bottom: 30px; /* Space below the remaining images text */
}

/* ------------------ Styling for Timer ------------------ */
#timer-container {
    position: relative;
    width: 120px; /* Adjust size as needed */
    height: 120px;
    margin-top: 80px;
    margin-left: 100px;
    border: 2px solid #ccc; /* Background border color */
    border-radius: 50%; /* Make it circular */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Clip the progress circle to stay inside */
}

#timer {
    position: absolute;
    margin: 0 auto; /* Adds space below the header */
    text-align: right;
    font-size: 24px;
    font-weight: bold;
    color: black; /* Default color */
    transition: all 0.5s ease-in-out; /* Smooth transition for dynamic changes */
}

/* When the timer enters the warning stage (last 30 seconds) */
#timer.warning {
    color: orange; /* Orange for warning */
    font-size: 28px; /* Slightly bigger for more visibility */
}

/* When the timer enters the critical stage (last 10 seconds) */
#timer.critical {
    color: red; /* Red for critical stage */
    animation: shake 0.5s infinite, blink 1s infinite; /* Add shaking and blinking */
    font-size: 32px; /* Larger to grab attention */
}

/* Blinking animation for timer */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Shaking animation for critical effect */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-2px); }
}

/* Progress bar for the circular timer */
#progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start from the top */
    z-index: 1;
}

#progress-ring circle {
    fill: none; /* Transparent inside */
    stroke-width: 10; /* Match the container's border width */
    stroke: #005293; /* Default progress color (red for critical) */
    stroke-linecap: round; /* Smooth edges for progress */
    stroke-dasharray: 377; /* Circumference of the circle */
    stroke-dashoffset: 377; /* Start with no progress (hidden) */
    transition: stroke-dashoffset 0.1s linear, stroke 0.5s; /* Smooth progress and color */
}

/* Style for the summary timer, similar to the main timer */
#summary-timer {
    position: relative;
    margin-top: 80px; /* Adds space below the header */
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: black; /* Default color */
    z-index: 101; /* Ensure it stays visible above other elements */
}

/* Blinking animation for summary timer (optional) */
#summary-timer.blinking {
    animation: blink 1s infinite; /* Reuse the same blink animation */
}

/* ------------------ Styling for Drag-and-Drop Message ------------------ */
.drag-drop-message {
    font-size: 18px;
    color: #333;
    text-align: center;
    margin-top: 20px; /* Space below the timer */
    margin-bottom: 30px; /* Space below the message */
}

/* ------------------ Container for Drag-and-Drop Elements ------------------ */
.drag-drop-container {
    display: flex;
    justify-content: space-between; /* Places the items in a row */
    align-items: center; /* Vertically centers items */
    width: 90%; /* Control the width of the container */
    margin: -50px auto; /* Center the container horizontally */
}

/* Correct box on the left */
#correct {
    width: 150px;
    height: 150px;
    background-color: lightgreen;
    border: 2px solid #006400;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    overflow: visible;
}

/* Flawed box on the right */
#flawed {
    width: 150px;
    height: 150px;
    background-color: lightcoral;
    border: 2px solid #8B0000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    overflow: visible;
}

.feedback-animation {
    animation: feedback-scale 0.3s ease-in-out;
}

@keyframes feedback-scale {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }/* Slightly enlarge */
    100% { transform: scale(1); }
}

/* Ensure the image container is centered */
#image-container {
    width: 300px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Image styling */
img {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* Keeps image proportionate */
    cursor: grab; /* Cursor style for dragging */
    transition: transform 0.3s ease; /* Smooth transition for zoom */
}

/* Zoom effect when clicked */
img.zoomed {
    transform: scale(1.85); /* Adjust zoom level*/
    cursor: zoom-out; /* Change cursor to indicate zoom out */
    z-index: 200; /* Increase the z-index for higher priority */
}

/* Spinner styling */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ccc;
    border-top: 4px solid #005293;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Animation for the spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Styles for the compensation container */
#compensation-container {
    text-align: center;
}

/* anything with class of this will stick to the footer, it is used for compensation-container for now. */
.stick-to-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    margin-bottom: 20px;
}

/* Wrapper for euro icons, holding 10 icons per line */
#euro-icons {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping into multiple rows */
    justify-content: center; /* Centers icons horizontally */
    gap: 5px; /* Optional space between icons */
    max-width: 365px; /* Set width for two rows of 10 icons */
    margin: 0 auto; /* Centers the container */
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    color: white;
    padding: 10px;
}

/* Style for each individual euro icon */
.euro-icon {
    width: 30px;
    height: 30px;
    cursor: unset;
}

/* Grayscale effect for the icons */
.grayscale {
    filter: grayscale(100%);
}

/* Add a flashing effect for reduced compensation */
@keyframes flash-red {
    0% { background-color: red; }
    50% { background-color: white; }
    100% { background-color: red; }
}

/* Apply to the compensation container or specific icons */
.compensation-reduced {
    animation: flash-red 1.5s ease-in-out 3; /* Flash three times */
}

#continue-button {
    display: inline-block !important; /* Make sure it's always shown when needed */
    border-radius: 5px;
}

/* ------------------ Styles for Admin Page ------------------ */
.admin {
    position: relative;
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

#player-table {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border-collapse: collapse;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#player-table th, #player-table td {
    padding: 5px 5px;
    text-align: center;
    border: 1px solid #ddd;
    width: auto;
}

#player-table th {
    background-color: #005293;
    color: #FFF;
    font-weight: bold;
    text-transform: uppercase;
}

/* Hover effect for rows */
#player-table tbody tr:hover {
    background-color: #dce7f2;
}

/* Checkbox cell alignment */
#player-table td input[type="checkbox"] {
    transform: scale(1.2); /* Scale up the checkbox for better visibility */
    cursor: pointer;
}

/* Make table responsive */
@media (max-width: 768px) {
    #player-table {
        font-size: 14px;
    }
    #player-table th, #player-table td {
        padding: 8px 10px;
    }
}

/* Highlight for online users in the User ID column */
.online-user {
    background-color: #4CAF50; /* Light green background for online users */
    color: #FFF; /* White text */
    font-weight: bold; /* Make the text bold for emphasis */
}

/* Style for cells with round values of 0 */
.green-background {
    background-color: #A2E695; /* Light green */
    color: #333; /* Dark text for contrast */
    font-weight: bold;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Adjust as needed */
    max-width: 500px;
    text-align: center;
    font-size: 18px;
    color: #333;
    border-radius: 8px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


/* ------------------ Styles for Login Page ------------------ */
.login {
    position: relative;
    margin-top: 120px;
    text-align: center;
    width: 100%;
}

.login input {
    background: rgb(255, 255, 255);
    width: 200px;
    border: none;
    border-bottom: solid thin;
    text-align: center;
}

.login input:focus {
    outline: none;
}

.login button {
    width: 220px;
    font-size: 16px;
    border-radius: 5px;
}

/* ------------------ Summary Screen Styling ------------------ */
/* Styling for the summary container below the header */
#summary-container {
    margin-top: 80px; /* Creates space below the header */
    text-align: center;
    padding: 20px;
}

#summary-message {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px; /* Space below the message */
}

#compensation-message {
    font-size: 20px; /* Adjust size as needed */
    font-weight: bold;
    color: red; /* Default color for compensation message */
    text-align: center;
    margin-bottom: 20px;
    display: none; /* Hidden by default */
}

/* Container for displaying mistaken images in summary */
#mistaken-images {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping to multiple lines */
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: visible;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px; /* Space below the mistaken images section */
    padding: 10px;
    border-radius: 8px;
    position: relative; 
}

/* Hide scrollbars but still allow scrolling */
#mistaken-images::-webkit-scrollbar {
    display: none;
}

#mistaken-images {
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

/* Styling for mistaken images in the summary */
.mistaken-image {
    width: 200px;
    height: auto;
    margin-top: 70px;
    margin-bottom: 70px;
    flex-shrink: 0; /* Prevent shrinking in horizontal layout */
    margin: 5px;
    border: 2px solid #0065BD; /* Highlighted border color for mistaken images */
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adds a subtle shadow */
    cursor: zoom-in;
    transition: transform 0.3s ease, z-index 0.3s ease;
    position: relative; /* Maintain original positioning */
    overflow: visible; /* Ensure no parts of the image are clipped */
}

/* Ensure zoom effect applies to images in mistaken-images container */
.mistaken-image.zoomed {
    transform: scale(1); /* Adjust the scale */
    z-index: 200;
    position: relative;
    cursor: zoom-out; /* Change cursor to indicate zoom out */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); /* Stronger shadow for focus */
    transition: transform 0.3s ease, z-index 0.3s ease;
    height: fit-content; /* Ensure height adjusts properly */
    width: fit-content;
}

/* ------------------ Tooltip Styles ------------------ */
.tooltip {
    position: relative;
    width: 100%;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 50px;
    background-color: #98C6EA;
    color: #000;
    text-align: center;
    padding: 5px 5px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 110%;
    left: 50%;
    margin-left: -25px;
    opacity: 0;
    transition: opacity 1s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}