:root {
    --header-height: 12vh;
    --logo-size: clamp(3rem, 5vw, 5rem);
    --primary-color: #524575;
    --text-color: #4f4f4f;
    --border-color: #bababa;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: "Roboto Flex", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background-color: #ffffff;
    margin: 0;
}

.logo img {
    height: var(--logo-size);
    margin: 0 2rem;
}

main {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.content-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.index-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(1.5rem);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 10000;
}

.loading-container,
.links-loading-container {
    position: relative;
}

.links-loading-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 2.5rem;
    z-index: 1000;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0.85) 100%);
    pointer-events: none;
}

.links-loading-container .loading-balls {
    pointer-events: auto;
}

.loading-balls {
    display: flex;
    justify-content: space-between;
    width: 60px;
}

.loading-balls div {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: bounce 0.5s alternate infinite;
}

.loading-balls div:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-balls div:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 12vh;
    }

    .content-wrapper {
        max-width: 100%;
    }

    header {
        padding: 0.5rem;
    }
}

/* Viewport height scaling for shorter displays */
@media (max-height: 900px) {
    body {
        zoom: 0.9;
    }

    .logo-header {
        margin-top: 6rem !important;
    }
}

@media (max-height: 800px) {
    body {
        zoom: 0.85;
    }

    .logo-header {
        margin-top: 4.5rem !important;
    }

    header {
        margin-top: 0.75rem !important;
    }
}

@media (max-height: 700px) {
    body {
        zoom: 0.75;
    }

    .logo-header {
        margin-top: 3rem !important;
    }

    header {
        margin-top: 0.5rem !important;
    }

    .language-header {
        margin-top: 0.5rem !important;
    }
}

@media (max-height: 600px) {
    body {
        zoom: 0.65;
    }

    .logo-header {
        margin-top: 1.5rem !important;
    }

    header {
        margin-top: 0.25rem !important;
    }

    .language-header {
        margin-top: 0.25rem !important;
    }
}