/* Global CSS for Redirection Page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full viewport height */
    overflow: auto; /* Allow scrolling at page level */
}

/* Responsive dimensions for the page */
:root {
    --header-height: 40px; /* Static height for header */
    --footer-height: 40px; /* Static height for footer */
    --container-width: 90%; /* Responsive width for container */
    --container-max-width: 800px; /* Maximum width for larger screens */
    --container-height: calc(100vh - var(--header-height) - var(--footer-height)); /* Static height for container */
}

/* Header for legal mentions */
.legal-header {
    width: 100%;
    height: var(--header-height);
    background-color: transparent; /* Invisible for now */
    /* Uncomment to make visible for testing */
    /* background-color: rgba(0, 0, 0, 0.1); */
}

/* Footer for legal mentions */
.legal-footer {
    width: 100%;
    height: var(--footer-height);
    background-color: transparent; /* Invisible for now */
    /* Uncomment to make visible for testing */
    /* background-color: rgba(0, 0, 0, 0.1); */
}

.container {
    width: var(--container-width);
    max-width: var(--container-max-width);
    height: var(--container-height);
    margin: 0 auto;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent scrollbars in container */
}

/* Top spacer - 10% of display height */
.container::before {
    content: "";
    flex: 0 0 10%;
}

.logo {
    flex: 0 0 20%; /* 20% of display height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
}

.message {
    flex: 0 0 30%; /* 30% of display height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 18px;
    padding: 0 20px;
}

#countdown {
    font-weight: bold;
    color: #e74c3c;
}

.target-link {
    flex: 0 0 10%; /* 10% of display height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.target-link a {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.target-link a:hover {
    background: #2980b9;
}

/* Styling for inline target URL links */
.target-url-inline {
    color: #3498db;
    text-decoration: underline;
    font-weight: normal;
    transition: color 0.3s;
}

.target-url-inline:hover {
    color: #2980b9;
}

.language-selector {
    flex: 0 0 20%; /* 20% of display height */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Bottom spacer - 10% of display height */
.container::after {
    content: "";
    flex: 0 0 10%;
}

.language-option {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.language-option:hover,
.language-option.active {
    opacity: 1;
}

.language-option img {
    width: 30px;
    height: 20px;
    border: 1px solid #ddd;
}


/* Responsive design with media queries */
/* Media query for tablets */
@media (max-width: 768px) {
    :root {
        --container-width: 95%;
    }

    .logo img {
        max-width: 80%;
    }

    .message {
        font-size: 16px;
        padding: 0 15px;
    }

    .language-selector {
        gap: 8px;
    }
}

/* Media query for smartphones */
@media (max-width: 480px) {
    :root {
        --container-width: 98%;
    }

    .logo {
        flex: 0 0 15%;
    }

    .logo img {
        max-width: 70%;
    }

    .message {
        flex: 0 0 35%;
        font-size: 14px;
        padding: 0 10px;
    }

    .target-link a {
        padding: 8px 16px;
        font-size: 14px;
    }

    .language-selector {
        flex: 0 0 25%;
        flex-wrap: wrap;
        gap: 5px;
    }

    .language-option img {
        width: 25px;
        height: 15px;
    }
}
