* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #0a0e17;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 80px 120px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 200px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 450px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    animation: starsMove 60s linear infinite;
}

.nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(76, 0, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 0, 200, 0.15) 0%, transparent 50%);
    filter: blur(40px);
    animation: nebulaFloat 20s ease-in-out infinite alternate;
}

@keyframes starsMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

@keyframes nebulaFloat {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.5; }
}

.container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.logo p {
    color: #a0a0a0;
    font-size: 14px;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff6b6b;
}

.alert i {
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.form-group label i {
    color: #00d4ff;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #00d4ff;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00d4ff, #0088ff);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    position: relative;
    background: rgba(10, 14, 23, 0.9);
    padding: 0 15px;
    color: #a0a0a0;
    font-size: 14px;
}

.btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-register:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.back-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: #00d4ff;
}

.floating-telegram {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0088cc;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.3);
    z-index: 1000;
}

.floating-telegram:hover {
    transform: scale(1.1);
    background: #0077b5;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.5);
}

.cf-turnstile-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .btn-login, .btn-register {
        padding: 12px;
        font-size: 14px;
    }
}