html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/index.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    will-change: transform; 
}

body {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

.lang-selector {
    width: 100%;
    padding: 12px 15px; 
    padding-right: 40px; 
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5); 
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    line-height: 1.5; 
    opacity: 1; 
    outline: none;
    cursor: pointer;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
}

.lang-selector:focus {
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.7);
}

.lang-selector option {
    background-color: #222;
    color: #fff;
    padding: 10px;
}

.login-box {
    width: 90%;
    max-width: 420px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    z-index: 2;
    margin: 40px 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-big { 
    font-size: 2.5em; 
    margin-bottom: 10px; 
    font-weight: 800; 
}

.logo-big span { 
    color: var(--primary); 
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 20px;
    justify-content: flex-start;
    padding-left: 5px;
    transition: color 0.3s;
}

.custom-checkbox:hover {
    color: #fff;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 22px;
    width: 22px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(140, 82, 255, 0.2);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.socials-footer {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-icon svg {
    width: 30px;
    height: 30px;
}

.social-icon:hover {
    transform: scale(1.1);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.social-icon.tg:hover { background: #229ED9; border-color: #229ED9; }
.social-icon.tt:hover { background: #000000; border-color: #ff0050; }
.social-icon.inst:hover { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); 
    border-color: transparent;
}
.social-icon.yt:hover { background: #FF0000; border-color: #FF0000; }

@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        height: auto;
        padding-top: 20px;
        padding-bottom: 90px;
    }
    
    .login-box {
        margin-bottom: 20px;
    }

    .socials-footer {
        position: fixed;
        top: auto;
        right: auto;
        bottom: 15px; 
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: row;
        justify-content: center;
        width: auto;
        max-width: 95%;
        margin: 0;
        background: rgba(0, 0, 0, 0.7); 
        backdrop-filter: blur(8px);
        padding: 10px 20px;
        border-radius: 50px;
        border: 1px solid rgba(255,255,255,0.15);
        gap: 15px;
        z-index: 1000;
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    }

    .social-icon {
        width: 48px !important;
        height: 48px !important;
        background: rgba(255, 255, 255, 0.1); 
    }

    .social-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .social-icon:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.3);
    }
}

.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px; 
}

.password-wrapper input {
    width: 100%;
    padding-right: 50px !important; 
    margin-bottom: 0 !important;
    box-sizing: border-box; 
    z-index: 1;
}

.toggle-pass-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%; 
    width: 45px; 
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999; 
    z-index: 10; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    outline: none;
}

.toggle-pass-btn:hover {
    color: #fff; 
}

.toggle-pass-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor; 
}