body.home-background {
    background-image: url('assets/com.bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff; /* White background, adjust as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
    transition: opacity 1s ease-in-out;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;
    justify-content: center;
}

.splash-content img {
    max-width: 375px; /* Adjust size as needed */
    max-height: 375px;
}

.splash-content h1 {
    font-size: 2.5em;
    color: #333;
}

.login-background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('loginbg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1; /* Ensure it stays behind other content */
}

.login-form-container {
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent white background */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 50px; /* Adjust as needed to center vertically */
}

.custom-navbar {
    padding-top: 0.35rem; /* Roughly 30% less than 0.5rem */
    padding-bottom: 0.35rem; /* Roughly 30% less than 0.5rem */
}

.custom-navbar .nav-link {
    padding-top: 0.2rem; /* Adjust padding to vertically center content */
    padding-bottom: 0.2rem; /* Adjust padding to vertically center content */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for hover effects */
}

.custom-navbar .nav-link:hover {
    background-color: #e9ecef; /* Light grey background on hover */
    color: #007bff; /* Blue text on hover */
    border-radius: 5px; /* Slightly rounded corners on hover */
}

#welcome-text-slider {
    transition: opacity 0.5s ease-in-out;
}

.broadcast-bar {
    overflow: hidden; /* Hide overflowing text */
    white-space: nowrap; /* Prevent text from wrapping */
}

.moving-text {
    display: inline-block; /* Allow animation */
    padding-left: 100%; /* Start text off-screen to the right */
    animation: marquee 15s linear infinite; /* Adjust duration as needed */
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.broadcast-bar:hover .moving-text {
    animation-play-state: paused;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Navigation Dropdowns */
    .navbar-nav .nav-item .nav-link {
        padding-top: 0.75rem; /* Increase touch target */
        padding-bottom: 0.75rem; /* Increase touch target */
        font-size: 1.1rem; /* Slightly larger font for readability */
        line-height: 1.5; /* Improve readability */
    }

    /* Job Cards */
    .card {
        margin-bottom: 1rem; /* Add more space between cards */
    }

    .card-body {
        padding: 1rem; /* Adjust padding within the card */
    }

    .card-title {
        font-size: 1.25rem; /* Ensure title is readable */
        line-height: 1.4; /* Improve readability */
    }

    .card-text {
        font-size: 0.95rem; /* Ensure text is readable */
        line-height: 1.5; /* Improve readability */
    }

    .btn {
        padding: 0.5rem 1rem; /* Increase button touch target */
        font-size: 1rem; /* Ensure button text is readable */
    }

    .splash-content img {
        max-width: 250px;
        max-height: 250px;
    }

    .splash-content h1 {
        font-size: 2em;
    }

    .login-form-container {
        padding: 20px;
        margin-top: 20px;
    }

    #welcome-text-slider h1 {
        font-size: 2rem;
    }

    #welcome-text-slider p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Further refine font sizes for very small screens */
    .navbar-nav .nav-item .nav-link {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Active state for job cards on touch devices */
.card:active {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.left-ad-sidebar {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.right-ad-sidebar {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* Game container styles */
.game-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    aspect-ratio: 4 / 3;
}

.game-container canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .game-container {
        aspect-ratio: 1;
    }
}

/* Memory Game styles */
.memory-game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: auto;
}

.memory-card {
    aspect-ratio: 1;
    background-color: #6c757d;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .memory-game-board {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .memory-game-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Minesweeper Game styles */
.minesweeper-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
}

@media (max-width: 576px) {
    .number-guessing-form .row {
        flex-direction: column;
    }
    .number-guessing-form .col-auto {
        width: 100%;
        margin-bottom: 10px;
    }
    .number-guessing-form .btn {
    }
}

@media (max-width: 576px) {
    .rps-choices .col-auto {
        width: 100%;
        margin-bottom: 10px;
    }
    .rps-choices .btn {
        width: 100%;
    }
}

/* Tic-Tac-Toe Game styles */
.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: auto;
    aspect-ratio: 1;
}

.tictactoe-board .btn {
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    font-weight: bold;
}

/* Tile Puzzle Game styles */
.tile-puzzle-board {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: auto;
    aspect-ratio: 1;
    border: 2px solid #333;
}

@media (max-width: 576px) {
    .word-guess-form .row {
        flex-direction: column;
    }
    .word-guess-form .col-auto {
        width: 100%;
        margin-bottom: 10px;
    }
    .word-guess-form .btn {
        width: 100%;
    }
}