*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {

    --reference-width: 1280;
    --reference-height: 720;

    --scale-x: 1;
    --scale-y: 1;
    --scale-font: 1;

    --font-size-normal: calc(16px * var(--scale-font));
    --font-size-button: calc(14px * var(--scale-font));
    --font-size-small: calc(12px * var(--scale-font));

    --spacing-x-small: calc(8px * var(--scale-x));
    --spacing-x-normal: calc(16px * var(--scale-x));

    --spacing-y-small: calc(8px * var(--scale-y));
    --spacing-y-normal: calc(16px * var(--scale-y));

    --header-height: calc(64px * var(--scale-y));
    --footer-height: calc(32px * var(--scale-y));

    --font-family-main: "Inter";
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-family-main), sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at 15% 20%, rgba(0, 170, 255, 0.18), transparent 45%), radial-gradient(ellipse at 85% 80%, rgba(255, 180, 80, 0.12), transparent 40%), linear-gradient(110deg, #061326 0%, #0A2B4A 35%, #075B82 65%, #244F70 85%, #8B6248 100%);
}

.header-container {
    min-width: 0;
    min-height: 0;

    flex: 0 0 var(--header-height);

    width: 100%;

    display: grid;
    grid-template-columns:
        minmax(230px, 2fr)
        minmax(0, 8fr)
        minmax(0, 1fr);

}

.header-container-1 {
    min-width: 0;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-container-1 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-container-2 {
    min-width: 0;
}

.header-container-3 {
    min-width: 0;

    display: flex;
    flex-direction: row;

    justify-content: flex-end;
    align-items: center;

    gap: calc(8px * var(--scale-x));

    padding-right: calc(8px * var(--scale-x));

    overflow: hidden;
}

.login-button {
    padding:
            0
            calc(4px * var(--scale-x));

    font-size: var(--font-size-button);
    font-family: var(--font-family-main), sans-serif;
    font-weight: 600;

    color: #FFFFFF;
    background: transparent;

    border: none;
    outline: none;

    white-space: nowrap;
    cursor: pointer;

    transition:
            color 0.2s ease,
            opacity 0.2s ease;

    flex-shrink: 1;
    min-width: 0;
}

.login-button:hover {
    color: #00D9FF;
}

.login-button:active {
    color: #008EBA;
    opacity: 0.7;
}

.login-button:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 3px;
    border-radius: 4px;
}

.language-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(36px * var(--scale-y));
    flex-shrink: 0;
}

.language-select {
    width: calc(44px * var(--scale-x));
    height: 100%;
    padding-left: calc(4px * var(--scale-x));
    padding-right: calc(14px * var(--scale-x));
    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: #FFFFFF;
    background: transparent;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    white-space: nowrap;
}

.language-select:hover {
    color: #00D9FF;
}

.language-select:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 2px;
    border-radius: 4px;
}

.language-select option {
    color: #FFFFFF;
    background: #081F3B;
}

.language-arrow {
    position: absolute;

    right: calc(6px * var(--scale-x));
    top: 50%;

    width: calc(6px * var(--scale-x));
    height: calc(6px * var(--scale-y));

    border-right: 2px solid #00D9FF;
    border-bottom: 2px solid #00D9FF;

    transform: translateY(-70%) rotate(45deg);

    pointer-events: none;
}

.login-panel {
    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: calc(460px * var(--scale-x));
    height: calc(500px * var(--scale-y));
    max-height: calc(100vh - 32px);

    display: flex;
    flex-direction: column;

    background: #081F3B;

    border: 1px solid rgba(0, 217, 255, 0.6);
    border-radius: 12px;

    z-index: 1000;

    overflow: hidden;
}

.login-panel-header {
    flex: 0 0 calc(52px * var(--scale-y));

    display: flex;
    flex-direction: row;

    justify-content: space-between;
    align-items: center;

    padding:
            0
            calc(16px * var(--scale-x));

    background: #0B2948;

    border-bottom: 1px solid rgba(0, 217, 255, 0.35);
}

.login-panel-title {
    margin: 0;

    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-normal);
    font-weight: 700;

    color: #FFFFFF;
}

.login-close-button {
    width: calc(32px * var(--scale-x));
    height: calc(32px * var(--scale-y));

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;

    font-family: var(--font-family-main), sans-serif;
    font-size: calc(24px * var(--scale-font));

    color: #8CAFC5;
    background: transparent;

    border: none;
    border-radius: 5px;

    cursor: pointer;

    transition:
            color 0.2s ease,
            background 0.2s ease;
}

.login-close-button:hover {
    color: #00D9FF;
    background: rgba(0, 217, 255, 0.1);
}

.login-close-button:active {
    color: #008EBA;
    background: rgba(0, 217, 255, 0.2);
}

.login-close-button:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 2px;
}

.login-panel-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 8px;

    align-items: stretch;
    overflow-y: auto;
    overscroll-behavior: contain;

    padding:
            calc(20px * var(--scale-y))
            calc(20px * var(--scale-x));

    min-height: 0;
    min-width: 0;
}

.login-input-group {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: calc(6px * var(--scale-y));
}

.login-input-group label {
    font-size: var(--font-size-small);
    font-weight: 600;

    color: #B9D5E8;
}

.login-input {
    width: 100%;
    height: calc(40px * var(--scale-y));

    padding:
            0
            calc(12px * var(--scale-x));

    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-normal);

    color: #FFFFFF;
    background: #102D4A;

    border: 1px solid #34708F;
    border-radius: 6px;

    outline: none;

    transition:
            border-color 0.2s ease,
            background 0.2s ease;
}

.login-input::placeholder {
    color: #7896AC;
}

.login-input:hover {
    border-color: #00A9D0;
}

.login-input:focus {
    border-color: #00D9FF;
    background: #123552;
}

.login-password-container {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
}

.login-password-container .login-input {
    padding-right: calc(44px * var(--scale-x));
}

.toggle-password {
    position: absolute;

    right: calc(8px * var(--scale-x));

    display: flex;
    align-items: center;
    justify-content: center;

    width: calc(30px * var(--scale-x));
    height: calc(30px * var(--scale-y));

    padding: 0;

    color: #8CAFC5;
    background: transparent;

    border: none;

    font-size: var(--font-size-normal);

    cursor: pointer;
}

.toggle-password:hover {
    color: #00D9FF;
}

.toggle-password:focus-visible {
    outline: 2px solid #00D9FF;
    border-radius: 4px;
}

.login-forgot-container {
    width: 100%;

    display: flex;
    justify-content: flex-end;
}

.login-register-container {
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: calc(5px * var(--scale-x));

    font-size: var(--font-size-small);
    color: #B9D5E8;
}

.login-text-button {
    padding: 0;

    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-small);
    font-weight: 600;

    color: #00D9FF;
    background: transparent;

    border: none;

    cursor: pointer;

    transition: color 0.2s ease;
}

.login-text-button:hover {
    color: #FFFFFF;
}

.login-text-button:active {
    color: #008EBA;
}

.login-text-button:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 3px;
    border-radius: 3px;
}

.login-confirm-button {
    width: 100%;
    height: calc(42px * var(--scale-y));

    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-button);
    font-weight: 700;

    color: #FFFFFF;
    background: #087BA5;

    border: 1px solid #00A9D0;
    border-radius: 6px;

    cursor: pointer;

    transition: background 0.2s ease, border-color 0.2s ease;
}

.login-confirm-button:hover {
    background: #099AC8;
    border-color: #00D9FF;
}

.login-confirm-button:active {
    background: #065C80;
}

.login-confirm-button:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 3px;
}

.login-error {
    width: 100%;
    padding: calc(8px * var(--scale-y))
    calc(10px * var(--scale-x));

    font-size: var(--font-size-small);
    color: #FF7777;
    text-align: center;

    background: rgba(255, 60, 60, 0.10);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 5px;
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999;
}

.main-container {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(230px, 2fr) minmax(0, 8fr) minmax(0, 1fr);
    gap: calc(12px * var(--scale-x));
    padding: calc(12px * var(--scale-y)) calc(12px * var(--scale-x));
}

.main-container-1,
.main-container-3 {
    min-width: 0;
    min-height: 0;
}

.main-container-1 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: calc(18px * var(--scale-y));
}

.main-navigation {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: calc(12px * var(--scale-y));
}

.main-nav-button {
    min-height: calc(48px * var(--scale-y));
    width: 100%;
    display: grid;
    grid-template-columns: calc(24px * var(--scale-x)) minmax(0, 1fr) 12px;
    align-items: center;
    gap: calc(10px * var(--scale-x));
    padding: 0 calc(13px * var(--scale-x));
    color: #D9F4FF;
    font-size: var(--font-size-button);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(110deg, rgba(7, 35, 61, 0.94), rgba(8, 73, 105, 0.78));
    border: 1px solid rgba(0, 217, 255, 0.32);
    border-left: 3px solid rgba(0, 217, 255, 0.72);
    border-radius: 8px;
    box-shadow: 0 5px 16px rgba(0, 8, 22, 0.18);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.main-nav-button:hover,
.main-nav-button:focus-visible {
    color: #FFFFFF;
    background: linear-gradient(110deg, rgba(0, 105, 145, 0.96), rgba(8, 83, 120, 0.92));
    border-color: rgba(0, 217, 255, 0.9);
    transform: translateX(3px);
    outline: none;
}

.main-nav-button:active {
    background: rgba(0, 65, 96, 0.98);
    transform: translateX(1px);
}

.nav-icon {
    color: #00D9FF;
    font-size: calc(19px * var(--scale-font));
    text-align: center;
}

.nav-chevron {
    color: #75DFFF;
    font-size: calc(22px * var(--scale-font));
    text-align: right;
}

.main-container-2 {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 19, 37, 0.32);
    border: 1px solid rgba(0, 217, 255, 0.24);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 8, 22, 0.24);
}

.main-background-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.footer-container {
    min-width: 0;
    min-height: 0;
    flex: 0 0 auto;
    width: 100%;
    min-height: calc(54px * var(--scale-y));
    display: grid;
    grid-template-columns: minmax(230px, 2fr) minmax(0, 8fr) minmax(0, 1fr);
    gap: calc(12px * var(--scale-x));
    padding: 0 calc(12px * var(--scale-x)) calc(10px * var(--scale-y));
}

.footer-container-1,
.footer-container-3 {
    min-width: 0;
}

.footer-container-2 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(18px * var(--scale-x));
    padding: calc(7px * var(--scale-y)) calc(14px * var(--scale-x));
    background: rgba(4, 23, 43, 0.62);
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.footer-links,
.footer-socials {
    display: flex;
    align-items: center;
}

.footer-links {
    flex-wrap: wrap;
    gap: calc(22px * var(--scale-x));
}

.footer-links a {
    color: #C3DCEB;
    font-size: var(--font-size-small);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #00D9FF;
    outline: none;
}

.footer-socials {
    gap: calc(9px * var(--scale-x));
}

.social-button {
    width: calc(32px * var(--scale-x));
    height: calc(32px * var(--scale-y));
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #B9D5E8;
    background: rgba(0, 217, 255, 0.06);
    border: 1px solid rgba(0, 217, 255, 0.28);
    border-radius: 8px;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-button svg .social-fill {
    fill: currentColor;
    stroke: none;
}

.social-button svg .social-dot {
    fill: currentColor;
    stroke: none;
}

.social-button:hover,
.social-button:focus-visible {
    color: #FFFFFF;
    background: rgba(0, 180, 225, 0.22);
    border-color: #00D9FF;
    transform: translateY(-2px);
    outline: none;
}

.social-button:active {
    transform: translateY(0);
}

@media (max-width: 760px) {
    .main-container,
    .footer-container {
        grid-template-columns: minmax(150px, 2fr) minmax(0, 8fr);
    }

    .main-container-3,
    .footer-container-3 {
        display: none;
    }

    .main-nav-button {
        grid-template-columns: 20px minmax(0, 1fr);
        padding: 0 8px;
        gap: 6px;
    }

    .nav-chevron {
        display: none;
    }

    .footer-container-2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
        gap: 10px 16px;
    }
}

@media (max-width: 480px) {
    .main-container,
    .footer-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .main-container-1 {
        padding-top: 0;
    }

    .main-navigation {
        flex-direction: row;
        gap: 6px;
    }

    .main-nav-button {
        min-height: 40px;
        grid-template-columns: 18px minmax(0, 1fr);
        font-size: 11px;
    }

    .footer-container-1 {
        display: none;
    }
}

[hidden] {display: none !important;}



/* ------------------------------------------------------------
   Authentication views: login, registration, password reset
   ------------------------------------------------------------ */

.auth-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: calc(10px * var(--scale-y));
}

.auth-view[hidden] {
    display: none !important;
}

.auth-description {
    width: 100%;
    margin: 0;
    color: #B9D5E8;
    font-size: var(--font-size-small);
    line-height: 1.55;
}

.auth-message {
    width: 100%;
    padding: calc(9px * var(--scale-y)) calc(10px * var(--scale-x));
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: var(--font-size-small);
    line-height: 1.45;
    text-align: center;
}

.auth-message.is-error {
    color: #FF9999;
    background: rgba(255, 60, 60, 0.10);
    border-color: rgba(255, 80, 80, 0.4);
}

.auth-message.is-success {
    color: #8EF0B5;
    background: rgba(50, 220, 120, 0.10);
    border-color: rgba(50, 220, 120, 0.4);
}

.login-confirm-button:disabled,
.login-secondary-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.login-secondary-button {
    width: 100%;
    min-height: calc(38px * var(--scale-y));
    font-family: var(--font-family-main), sans-serif;
    font-size: var(--font-size-button);
    font-weight: 600;
    color: #B9D5E8;
    background: transparent;
    border: 1px solid rgba(140, 175, 197, 0.45);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.login-secondary-button:hover {
    color: #FFFFFF;
    border-color: #00D9FF;
    background: rgba(0, 217, 255, 0.08);
}

.login-secondary-button:focus-visible {
    outline: 2px solid #00D9FF;
    outline-offset: 3px;
}

.login-panel-content::-webkit-scrollbar {
    width: 6px;
}

.login-panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.35);
    border-radius: 6px;
}

.login-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.12);
}


/* Additional account and download views */
.download-view-buttons {
    display: flex;
    flex-direction: column;
    gap: calc(10px * var(--scale-y));
    width: 100%;
}
.main-nav-button > span:nth-child(2) {
    min-width: 0;
    overflow-wrap: anywhere;
}
@media (max-width: 760px) {
    .main-nav-button { font-size: clamp(10px, 1.1vw, 14px); }
}
