﻿/* General Styles for Both PC and Mobile */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: auto; /* Prevent scrolling */
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
}

.button-container {
    margin-top: 80px;
    color: yellow;
    text-align: center;
    max-width: 100%;
    width: 100%;
}

.countdown-button, #startCustom, #startGameCountdown {
    padding: 10px 20px;
    font-size: 18px;
    margin: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

.countdown-button:hover, #startCustom:hover, #startGameCountdown:hover {
    background-color: #0056b3;
}

.custom-time, .game-time {
    padding: 10px;
    font-size: 18px;
    width: 80px;
    margin-right: 10px;
    box-sizing: border-box;
}

.background {
    background-color: #005EBB;
    background-image: linear-gradient(135deg, #1a4c99 0%, #1958ba 44%, #10bfe3 100%);
    background-size: cover;
    position: fixed; /* Cố định nền để di chuyển theo cuộn */
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh; /* Đảm bảo nền tràn hết chiều cao */
    z-index: -1; /* Đảm bảo nền ở phía sau */
  }

.overlay-text {
    position: absolute;
    top: 20px; /* Adjust as needed */
    left: 20px; /* Adjust as needed */
    color: white;
    font-size: 36px; /* Adjust as needed */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 10; /* Make sure the text appears on top */
}

#countdownContainer {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Đảm bảo chiều cao bao phủ toàn màn hình */
    display: flex;
    align-items: center; /* Căn giữa theo trục dọc */
    justify-content: center; /* Căn giữa theo trục ngang */
    z-index: 2; /* Đảm bảo nội dung nằm trên nền */
}
.clock {
    position: absolute;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 5px black;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: yellow;
    z-index: 3; /* Ensure it's on top of the video */
}

.defaultFont {
    font-size: 200pt;
}

.bigFont {
    font-size: 280pt;
}

.noteFont {
    font-size: 14pt;
    font-style: italic;
    font-weight: normal;
}

/* Video container adjustments */
#videoContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center horizontally and vertically */
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    z-index: 1; 
    display: none; /* Hide the video by default */
    overflow: hidden; /* Prevent overflow */
}

video {
    width: 100%;
    height: auto; /* Keep aspect ratio */
    object-fit: cover; /* Cover the container while maintaining aspect ratio */
}
/* Responsive Design */
@media only screen and (max-width: 600px) {
    .countdown-button, #startCustom, #startGameCountdown {
        font-size: 16px;
        padding: 8px 16px;
    }

    .custom-time, .game-time {
        font-size: 16px;
        width: 100%;
        margin-right: 0;
        box-sizing: border-box;
    }

    .overlay-text {
        font-size: 24px;
    }

    .clock {
        font-size: 80pt;
    }

    #countdownContainer {
        height: auto; /* Adjust height for smaller screens */
        z-index: 2; 
    }
   .defaultFont {
    font-size: 15vw; /* Kích thước phông chữ điều chỉnh theo chiều rộng màn hình */
    }
        #videoContainer {
        width: 100%;
        height: auto; /* Adjust height to fit smaller screens */
        top: 50%;  /* Ensure centering */
        left: 50%; /* Ensure centering */
    }

    video {
        width: 100%;
        height: auto; /* Maintain aspect ratio on smaller screens */
    }
}

/* For tablets (600px to 900px) */
@media only screen and (min-width: 601px) and (max-width: 900px) {
    .countdown-button, #startCustom, #startGameCountdown {
        font-size: 18px;
        padding: 10px 20px;
    }

    .custom-time, .game-time {
        font-size: 18px;
    }

    .clock {
        font-size: 150pt;
    }
        #countdownContainer {
        height: auto; /* Adjust height for smaller screens */
        z-index: 2; 
    }

        .defaultFont {
        font-size: 20vw; /* Kích thước phông chữ điều chỉnh theo chiều rộng màn hình */
    }
        #videoContainer {
        width: 100%;
        height: auto; /* Maintain aspect ratio */
        top: 50%;  /* Ensure centering */
        left: 50%; /* Ensure centering */
    }

    video {
        width: 100%;
        height: auto;
    }
}
