* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Звездный фон */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.stars {
    background: #000 url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000"%3E%3Ccircle cx="100" cy="100" r="2" fill="white"/%3E%3Ccircle cx="500" cy="300" r="1.5" fill="white"/%3E%3Ccircle cx="800" cy="700" r="2" fill="white"/%3E%3Ccircle cx="1200" cy="400" r="1" fill="white"/%3E%3Ccircle cx="1500" cy="900" r="2.5" fill="white"/%3E%3Ccircle cx="300" cy="1200" r="1.5" fill="white"/%3E%3Ccircle cx="900" cy="1500" r="2" fill="white"/%3E%3Ccircle cx="1700" cy="1100" r="1" fill="white"/%3E%3C/svg%3E') repeat;
    background-size: 200px 200px;
    animation: starsMove 200s linear infinite;
    opacity: 0.6;
}

.twinkling {
    background: transparent url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000"%3E%3Ccircle cx="200" cy="200" r="1" fill="white" opacity="0.8"/%3E%3Ccircle cx="600" cy="800" r="1.2" fill="white" opacity="0.6"/%3E%3Ccircle cx="1000" cy="400" r="0.8" fill="white" opacity="0.9"/%3E%3Ccircle cx="1400" cy="1200" r="1" fill="white" opacity="0.7"/%3E%3Ccircle cx="1800" cy="600" r="1.1" fill="white" opacity="0.8"/%3E%3C/svg%3E') repeat;
    background-size: 300px 300px;
    animation: twinkling 4s ease-in-out infinite;
}

@keyframes starsMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -2000px 2000px;
    }
}

@keyframes twinkling {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
}

.container {
    position: relative;
    z-index: 1;
    padding: 20px;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.space-icon {
    font-size: 60px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo h1 {
    font-size: 32px;
    color: #333;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.login-form {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    right: 15px;
    bottom: 12px;
    font-size: 18px;
    opacity: 0.5;
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
}

.checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text, .btn-loader {
    display: inline-block;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.message.error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.message.success {
    background-color: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    color: #764ba2;
}

.info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.info p {
    margin: 5px 0;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}