
:root {
    --navbar-height: 56px;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --telegram-gradient: linear-gradient(135deg, #0088cc 0%, #00aced 100%);
    --transition-speed: 0.3s;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-navbar {
    background: var(--primary-gradient);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    padding: 8px 0;
}

.login-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(var(--navbar-height) + 40px);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform var(--transition-speed);
    background: white;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.login-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 15px;
    background: var(--primary-gradient);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: transform 0.5s;
}

.login-logo:hover {
    transform: rotate(10deg);
}

.login-body {
    padding: 30px;
    background: #f8f9fa;
}

.form-floating {
    margin-bottom: 1.5rem;
}

.form-control {
    border-radius: 10px;
    padding: 1rem 0.75rem;
    border: 2px solid #e9ecef;
    transition: all var(--transition-speed);
    height: calc(3.5rem + 2px);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.btn-login {
    background: var(--primary-gradient);
    border: none;
    padding: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
/*    height: 52px;*/
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-telegram {
    background: var(--telegram-gradient);
    border: none;
    padding: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    height: 52px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
    color: white;
}

.btn-telegram:active {
    transform: translateY(0);
}

.telegram-icon {
    font-size: 20px;
}

.login-footer {
    text-align: center;
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #6c757d;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

.social-login-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.qr-code-container {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    background: #f8f9fa;
}

.telegram-info {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #0088cc;
}

.telegram-info h6 {
    color: #0088cc;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.telegram-steps {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.telegram-steps li {
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.telegram-steps li i {
    color: #0088cc;
    margin-top: 2px;
}

/* Language selector styles */
.language-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 25px;
    padding: 8px 16px;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.language-list::-webkit-scrollbar {
    width: 6px;
}

.language-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.language-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all var(--transition-speed);
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.language-option.selected {
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
}

.language-flag {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.language-name {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 500;
}

.language-check {
    color: #007bff;
    font-weight: bold;
    font-size: 18px;
}

/* Responsive styles */
@media (max-width: 576px) {
    .login-card {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .login-content {
        padding: 10px;
        padding-top: calc(var(--navbar-height) + 20px);
    }
    
    .login-header {
        padding: 30px 20px 20px;
    }
    
    .login-body {
        padding: 20px;
    }
    
    .language-btn span {
        display: none;
    }
    
    .language-btn {
        padding: 8px 12px;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
        padding: 12px;
    }
    
    .qr-code, .qr-placeholder {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .language-btn .language-name-short {
        display: inline;
    }
    
    .language-btn .language-name-full {
        display: none;
    }
}

@media (min-width: 769px) {
    .language-btn .language-name-short {
        display: none;
    }
    
    .language-btn .language-name-full {
        display: inline;
    }
}

/* Animation for language change */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.language-changed *[data-translate] {
    animation: fadeIn 0.5s ease;
}

/* Custom focus styles for accessibility */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.btn-telegram.btn-loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Telegram Web App specific */
.telegram-webapp .login-navbar {
    display: none;
}

.telegram-webapp .login-content {
    padding-top: 20px;
}

/* Telegram login widget */
.telegram-login-widget {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}