.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 20px;
    position: relative;
    background: var(--gradient-tech);
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: particle-float 20s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.captcha-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.captcha-container .input-group {
    flex: 1;
}

.captcha-display {
    background: linear-gradient(135deg, #0f766e 0%, #0891b2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.captcha-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: captcha-shine 2s ease-in-out infinite;
}

@keyframes captcha-shine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

#captcha-text {
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 118, 110, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-help {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: var(--primary-dark);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.message-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-100px);
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 400px;
    min-width: 300px;
    opacity: 0;
    transition: all 0.3s ease;
}

.message-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.toast-icon.success {
    background: #059669;
}

.toast-icon.error {
    background: #dc2626;
}

.toast-icon.warning {
    background: #d97706;
}

.toast-message {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .login-container {
        padding: 80px 16px 16px;
    }
    
    .login-card {
        padding: 30px 24px;
        margin: 0 16px;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .captcha-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .captcha-display {
        min-width: auto;
        justify-content: center;
    }
    
    .message-toast {
        top: 20px;
        left: 16px;
        right: 16px;
        transform: none;
        max-width: none;
        min-width: auto;
        margin: 0;
    }
    
    .message-toast.show {
        transform: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 20px;
    }
    
    .login-title {
        font-size: 1.6rem;
    }
    
    .form-input {
        padding: 14px 14px 14px 44px;
    }
    
    .message-toast {
        top: 10px;
        left: 12px;
        right: 12px;
        padding: 16px 20px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 0.9rem;
    }
}

.login-card {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-input:focus + .input-icon {
    color: var(--primary-color);
}

.login-btn:active {
    transform: scale(0.98);
}

.refresh-btn:active {
    animation: refresh-spin 0.3s ease-in-out;
}

@keyframes refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(180deg); }
} 