html,
body {
    padding: 0;
    border: 0;
    margin: 0;
    background-color: rgb(58, 58, 58);
    flex-direction: column;
}

main,
section.games-section,
section.hero,
#hero {
    flex: 1 0 auto;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* Base size: 16px on most browsers */
}

body {
    font-family: "Roboto", Helvetica, Arial, sans-serif;
    color: white;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    background: none;
    width: 80%;
    margin: auto;
    overflow: visible;
}

button {
    background: grey;
    border: none;
    color: white;
    padding: 3px 15px;
    border-radius: 15px;
}

p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 18px;
}

h2 {
    font-size: 32px;
    margin: 20px 0 10px;
    color: rgb(0, 183, 255);
}

button {
    background: rgb(0, 183, 255);
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: rgb(0, 150, 210);
}

.collapsible-content {
    display: none;
    transition: all 0.3s ease;
}

.collapsible-content.visible {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    color: white;
    box-shadow: 0 0 20px rgba(0, 183, 255, 0.5);
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #cce7ff;
    cursor: pointer;
}

/* ====================== */
/* Footer Styles */
/* ====================== */

#mainFooter {
    background: linear-gradient(to right, #ffffff, #cce7ff);
    color: #333;
    text-align: center;
    padding: 10px 20px;
    margin-top: 0;
    font-size: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Footer links */
#mainFooter a {
    color: rgb(0, 122, 204);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

/* Hover effect on footer links */
#mainFooter a:hover {
    color: rgb(0, 100, 180);
    text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #mainFooter {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* ====================== */
/* Responsive Typography */
/* ====================== */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem; /* Around 32px */
    }

    h2 {
        font-size: 1.6rem; /* Around 26px */
    }

    p {
        font-size: 1rem; /* 16px */
    }

    #mainFooter {
        font-size: 14px; /* Slightly smaller footer text on mobile */
    }
}

#sessionExpiredModal .modal-content {
    text-align: center;
    background-color: #fff8f0;
    color: #333;
}

/* ====================== */
/* === TOAST HANDLING === */
/* ====================== */

.toast-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw;
    z-index: 2147483647; /* Max z-index */
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 20px;
    box-sizing: border-box;
}

.toast {
    background: rgb(0, 183, 255);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 8px 24px rgba(0, 123, 204, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInToast 0.3s ease-out forwards;
    pointer-events: auto;
    max-width: 600px;
    width: fit-content;
    text-align: center;
}

.toast.hide {
    animation: fadeOutToast 0.3s ease-in forwards;
}

@keyframes fadeInToast {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutToast {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.toast.success {
    background: rgb(0, 183, 255);
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

.toast.info {
    background: rgb(0, 183, 255);
}

.toast .toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    margin-left: 12px;
    cursor: pointer;
    font-weight: bold;
    pointer-events: auto;
}
