@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Reset default styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Body styling */
body {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    justify-content: center;
    background-image: url('img/_25fb5341-2868-477d-9635-75a946dffd2f.jpg');
    background-size: cover;
}

/* Heading */
h1 {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #0056b3;
}

/* Container styling */
.container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 420px;
    color: #333;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Score and settings */
#score, #highscore{
    font-size: 1.2em;
    font-weight: bold;
}
#selected-speed {
    font-size: 15px;
    font-weight: bold;
}

/* Form elements */
select, input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: 0.3s;
}

select:focus, input:focus {
    border-color: #007bff;
    outline: none;
}

/* Button styling */
.btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Semaphore container */
#semaphore-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 250px;
    margin-top: 5px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f9f9f9;
}

/* Image styling */
#semaphore-img {
    max-width: 200px;
    max-height: 2000px;
    transition: opacity 0.3s ease-in-out;
    border-radius: 10px;
}

/* Countdown */
#countdown {
    font-size: 2em;
    font-weight: bold;
    margin-top: 10px;
    color: red;
}

/* Popup styling */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    display: none;
    text-align: center;
    color: #333;
    transition: 0.3s;
}

.popup.show {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

.popup h2 {
    color: green;
}

.popup button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 10px;
}

.popup button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Hidden elements */
.hidden {
    display: none;
}

.skor{
    display: flex;
    position: relative;
    justify-content:space-between;
    align-items: center;
    width: 100%;
}
.skorpermainan{
    padding: 10px;
    border-radius: 5px;
    background-color: green;
}
.skorpermainan p{
    color: white;
}

.skoreterbaik{
    padding: 10px;
    border-radius: 5px;
    background-color: rgb(214, 182, 0);
}
.skoreterbaik p{
    color: white;
}

.reset{
    background-color: rgb(119, 0, 0);
}
.reset:hover{
    background-color: rgb(153, 0, 0);
}
/* Popup Countdown */
#popup-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    display: none;
    text-align: center;
    color: #333;
    font-size: 2em;
    font-weight: bold;
    transition: 0.3s;
    z-index: 999;
}

#popup-countdown.show {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

